GstBitReader: GStreamer 1.0 Library Reference Manual

## GstBitReader GstBitReader |

## Functions

#define | GST_BIT_READER_INIT()
GstBitReader * | gst_bit_reader_new ()
void | gst_bit_reader_free ()
void | gst_bit_reader_init ()
guint | gst_bit_reader_get_pos ()
guint | gst_bit_reader_get_remaining ()
gboolean | gst_bit_reader_set_pos ()
guint | gst_bit_reader_get_size ()
gboolean | gst_bit_reader_skip ()
gboolean | gst_bit_reader_skip_to_byte ()
gboolean | gst_bit_reader_get_bits_uint16 ()
gboolean | gst_bit_reader_get_bits_uint32 ()
gboolean | gst_bit_reader_get_bits_uint64 ()
gboolean | gst_bit_reader_get_bits_uint8 ()
gboolean | gst_bit_reader_peek_bits_uint16 ()
gboolean | gst_bit_reader_peek_bits_uint32 ()
gboolean | gst_bit_reader_peek_bits_uint64 ()
gboolean | gst_bit_reader_peek_bits_uint8 ()
void | gst_bit_reader_skip_unchecked ()
void | gst_bit_reader_skip_to_byte_unchecked ()
guint16 | gst_bit_reader_get_bits_uint16_unchecked ()
guint32 | gst_bit_reader_get_bits_uint32_unchecked ()
guint64 | gst_bit_reader_get_bits_uint64_unchecked ()
guint8 | gst_bit_reader_get_bits_uint8_unchecked ()
guint16 | gst_bit_reader_peek_bits_uint16_unchecked ()
guint32 | gst_bit_reader_peek_bits_uint32_unchecked ()
guint64 | gst_bit_reader_peek_bits_uint64_unchecked ()
guint8 | gst_bit_reader_peek_bits_uint8_unchecked ()

## Types and Values

| GstBitReader

## Includes

    #include <gst/base/gstbitreader.h>

## Description

## Functions

### GST_BIT_READER_INIT()

    #define GST_BIT_READER_INIT(data, size) {data, size, 0, 0}

### gst_bit_reader_new ()

    GstBitReader *
    gst_bit_reader_new (const guint8 *data,
                        guint size);

### gst_bit_reader_free ()

    void
    gst_bit_reader_free (GstBitReader *reader);

### gst_bit_reader_init ()

    void
    gst_bit_reader_init (GstBitReader *reader,
                         const guint8 *data,
                         guint size);

### gst_bit_reader_get_pos ()

    guint
    gst_bit_reader_get_pos (const GstBitReader *reader);

### gst_bit_reader_get_remaining ()

    guint
    gst_bit_reader_get_remaining (const GstBitReader *reader);

### gst_bit_reader_set_pos ()

    gboolean
    gst_bit_reader_set_pos (GstBitReader *reader,
                            guint pos);

### gst_bit_reader_get_size ()

    guint
    gst_bit_reader_get_size (const GstBitReader *reader);

### gst_bit_reader_skip ()

    gboolean
    gst_bit_reader_skip (GstBitReader *reader,
                         guint nbits);

### gst_bit_reader_skip_to_byte ()

    gboolean
    gst_bit_reader_skip_to_byte (GstBitReader *reader);

### gst_bit_reader_get_bits_uint16 ()

    gboolean
    gst_bit_reader_get_bits_uint16 (GstBitReader *reader,
                                    guint16 *val,
                                    guint nbits);

### gst_bit_reader_get_bits_uint32 ()

    gboolean
    gst_bit_reader_get_bits_uint32 (GstBitReader *reader,
                                    guint32 *val,
                                    guint nbits);

### gst_bit_reader_get_bits_uint64 ()

    gboolean
    gst_bit_reader_get_bits_uint64 (GstBitReader *reader,
                                    guint64 *val,
                                    guint nbits);

### gst_bit_reader_get_bits_uint8 ()

    gboolean
    gst_bit_reader_get_bits_uint8 (GstBitReader *reader,
                                   guint8 *val,
                                   guint nbits);

### gst_bit_reader_peek_bits_uint16 ()

    gboolean
    gst_bit_reader_peek_bits_uint16 (const GstBitReader *reader,
                                     guint16 *val,
                                     guint nbits);

### gst_bit_reader_peek_bits_uint32 ()

    gboolean
    gst_bit_reader_peek_bits_uint32 (const GstBitReader *reader,
                                     guint32 *val,
                                     guint nbits);

### gst_bit_reader_peek_bits_uint64 ()

    gboolean
    gst_bit_reader_peek_bits_uint64 (const GstBitReader *reader,
                                     guint64 *val,
                                     guint nbits);

### gst_bit_reader_peek_bits_uint8 ()

    gboolean
    gst_bit_reader_peek_bits_uint8 (const GstBitReader *reader,
                                    guint8 *val,
                                    guint nbits);

### gst_bit_reader_skip_unchecked ()

    void
    gst_bit_reader_skip_unchecked (GstBitReader *reader,
                                   guint nbits);

### gst_bit_reader_skip_to_byte_unchecked ()

    void
    gst_bit_reader_skip_to_byte_unchecked (GstBitReader *reader);

### gst_bit_reader_get_bits_uint16_unchecked ()

    guint16
    gst_bit_reader_get_bits_uint16_unchecked
                                   (GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_get_bits_uint32_unchecked ()

    guint32
    gst_bit_reader_get_bits_uint32_unchecked
                                   (GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_get_bits_uint64_unchecked ()

    guint64
    gst_bit_reader_get_bits_uint64_unchecked
                                   (GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_get_bits_uint8_unchecked ()

    guint8
    gst_bit_reader_get_bits_uint8_unchecked
                                   (GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_peek_bits_uint16_unchecked ()

    guint16
    gst_bit_reader_peek_bits_uint16_unchecked
                                   (const GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_peek_bits_uint32_unchecked ()

    guint32
    gst_bit_reader_peek_bits_uint32_unchecked
                                   (const GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_peek_bits_uint64_unchecked ()

    guint64
    gst_bit_reader_peek_bits_uint64_unchecked
                                   (const GstBitReader *reader,
                                    guint nbits);

### gst_bit_reader_peek_bits_uint8_unchecked ()

    guint8
    gst_bit_reader_peek_bits_uint8_unchecked
                                   (const GstBitReader *reader,
                                    guint nbits);

## Types and Values

### GstBitReader

    typedef struct {
      const guint8 *data;
      guint size;

      guint byte;  /* Byte position */
      guint bit;   /* Bit position in the current byte */
    } GstBitReader;