## GstByteReader

GstByteReader — Reads different integer, string and floating point types from a memory buffer

## Functions

#define | GST_BYTE_READER_INIT ()
GstByteReader * | gst_byte_reader_new ()
void | gst_byte_reader_free ()
void | gst_byte_reader_init ()
guint | gst_byte_reader_get_pos ()
guint | gst_byte_reader_get_remaining ()
gboolean | gst_byte_reader_set_pos ()
guint | gst_byte_reader_get_size ()
gboolean | gst_byte_reader_skip ()
gboolean | gst_byte_reader_get_int8 ()
gboolean | gst_byte_reader_get_int16_be ()
gboolean | gst_byte_reader_get_int16_le ()
gboolean | gst_byte_reader_get_int24_be ()
gboolean | gst_byte_reader_get_int24_le ()
gboolean | gst_byte_reader_get_int32_be ()
gboolean | gst_byte_reader_get_int32_le ()
gboolean | gst_byte_reader_get_int64_be ()
gboolean | gst_byte_reader_get_int64_le ()
gboolean | gst_byte_reader_get_uint8 ()
gboolean | gst_byte_reader_get_uint16_be ()
gboolean | gst_byte_reader_get_uint16_le ()
gboolean | gst_byte_reader_get_uint24_be ()
gboolean | gst_byte_reader_get_uint24_le ()
gboolean | gst_byte_reader_get_uint32_be ()
gboolean | gst_byte_reader_get_uint32_le ()
gboolean | gst_byte_reader_get_uint64_be ()
gboolean | gst_byte_reader_get_uint64_le ()
gboolean | gst_byte_reader_peek_int8 ()
gboolean | gst_byte_reader_peek_int16_be ()
gboolean | gst_byte_reader_peek_int16_le ()
gboolean | gst_byte_reader_peek_int24_be ()
gboolean | gst_byte_reader_peek_int24_le ()
gboolean | gst_byte_reader_peek_int32_be ()
gboolean | gst_byte_reader_peek_int32_le ()
gboolean | gst_byte_reader_peek_int64_be ()
gboolean | gst_byte_reader_peek_int64_le ()
gboolean | gst_byte_reader_peek_uint8 ()
gboolean | gst_byte_reader_peek_uint16_be ()
gboolean | gst_byte_reader_peek_uint16_le ()
gboolean | gst_byte_reader_peek_uint24_be ()
gboolean | gst_byte_reader_peek_uint24_le ()
gboolean | gst_byte_reader_peek_uint32_be ()
gboolean | gst_byte_reader_peek_uint32_le ()
gboolean | gst_byte_reader_peek_uint64_be ()
gboolean | gst_byte_reader_peek_uint64_le ()
gboolean | gst_byte_reader_get_float32_le ()
gboolean | gst_byte_reader_get_float32_be ()
gboolean | gst_byte_reader_get_float64_le ()
gboolean | gst_byte_reader_get_float64_be ()
gboolean | gst_byte_reader_peek_float32_le ()
gboolean | gst_byte_reader_peek_float32_be ()
gboolean | gst_byte_reader_peek_float64_le ()
gboolean | gst_byte_reader_peek_float64_be ()
gboolean | gst_byte_reader_get_data ()
gboolean | gst_byte_reader_dup_data ()
gboolean | gst_byte_reader_peek_data ()
guint | gst_byte_reader_masked_scan_uint32 ()
#define | gst_byte_reader_get_string ()
gboolean | gst_byte_reader_get_string_utf8 ()
#define | gst_byte_reader_peek_string ()
gboolean | gst_byte_reader_peek_string_utf8 ()
#define | gst_byte_reader_dup_string ()
gboolean | gst_byte_reader_dup_string_utf8 ()
gboolean | gst_byte_reader_dup_string_utf16 ()
gboolean | gst_byte_reader_dup_string_utf32 ()
#define | gst_byte_reader_skip_string ()
gboolean | gst_byte_reader_skip_string_utf8 ()
gboolean | gst_byte_reader_skip_string_utf16 ()
gboolean | gst_byte_reader_skip_string_utf32 ()
void | gst_byte_reader_skip_unchecked ()
gint8 | gst_byte_reader_get_int8_unchecked ()
gint16 | gst_byte_reader_get_int16_be_unchecked ()
gint16 | gst_byte_reader_get_int16_le_unchecked ()
gint32 | gst_byte_reader_get_int24_be_unchecked ()
gint32 | gst_byte_reader_get_int24_le_unchecked ()
gint32 | gst_byte_reader_get_int32_be_unchecked ()
gint32 | gst_byte_reader_get_int32_le_unchecked ()
gint64 | gst_byte_reader_get_int64_be_unchecked ()
gint64 | gst_byte_reader_get_int64_le_unchecked ()
guint8 | gst_byte_reader_get_uint8_unchecked ()
guint16 | gst_byte_reader_get_uint16_be_unchecked ()
guint16 | gst_byte_reader_get_uint16_le_unchecked ()
guint32 | gst_byte_reader_get_uint24_be_unchecked ()
guint32 | gst_byte_reader_get_uint24_le_unchecked ()
guint32 | gst_byte_reader_get_uint32_be_unchecked ()
guint32 | gst_byte_reader_get_uint32_le_unchecked ()
guint64 | gst_byte_reader_get_uint64_be_unchecked ()
guint64 | gst_byte_reader_get_uint64_le_unchecked ()
gint8 | gst_byte_reader_peek_int8_unchecked ()
gint16 | gst_byte_reader_peek_int16_be_unchecked ()
gint16 | gst_byte_reader_peek_int16_le_unchecked ()
gint32 | gst_byte_reader_peek_int24_be_unchecked ()
gint32 | gst_byte_reader_peek_int24_le_unchecked ()
gint32 | gst_byte_reader_peek_int32_be_unchecked ()
gint32 | gst_byte_reader_peek_int32_le_unchecked ()
gint64 | gst_byte_reader_peek_int64_be_unchecked ()
gint64 | gst_byte_reader_peek_int64_le_unchecked ()
guint8 | gst_byte_reader_peek_uint8_unchecked ()
guint16 | gst_byte_reader_peek_uint16_be_unchecked ()
guint16 | gst_byte_reader_peek_uint16_le_unchecked ()
guint32 | gst_byte_reader_peek_uint24_be_unchecked ()
guint32 | gst_byte_reader_peek_uint24_le_unchecked ()
guint32 | gst_byte_reader_peek_uint32_be_unchecked ()
guint32 | gst_byte_reader_peek_uint32_le_unchecked ()
guint64 | gst_byte_reader_peek_uint64_be_unchecked ()
guint64 | gst_byte_reader_peek_uint64_le_unchecked ()
gfloat | gst_byte_reader_get_float32_le_unchecked ()
gfloat | gst_byte_reader_get_float32_be_unchecked ()
gdouble | gst_byte_reader_get_float64_le_unchecked ()
gdouble | gst_byte_reader_get_float64_be_unchecked ()
gfloat | gst_byte_reader_peek_float32_le_unchecked ()
gfloat | gst_byte_reader_peek_float32_be_unchecked ()
gdouble | gst_byte_reader_peek_float64_le_unchecked ()
gdouble | gst_byte_reader_peek_float64_be_unchecked ()
guint8 * | gst_byte_reader_dup_data_unchecked ()
const guint8 * | gst_byte_reader_get_data_unchecked ()
const guint8 * | gst_byte_reader_peek_data_unchecked ()

## Types and Values

| GstByteReader

## Includes

    #include <gst/base/gstbytereader.h>

## Description

GstByteReader provides a byte reader that can read different integer and floating point types from a memory buffer. It provides functions for reading signed/unsigned, little/big endian integers of 8, 16, 24, 32 and 64 bits and functions for reading little/big endian floating points numbers of 32 and 64 bits. It also provides functions to read NUL-terminated strings in various character encodings.

## Functions

### GST_BYTE_READER_INIT()

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

A GstByteReader must be initialized with this macro, before it can be used. This macro can used be to initialize a variable, but it cannot be assigned to a variable. In that case you have to use `gst_byte_reader_init()`.

#### Parameters

data | Data from which the GstByteReader should read |
size | Size of `data` in bytes |

### gst_byte_reader_new ()

    GstByteReader *
    gst_byte_reader_new (const guint8 *data,
                         guint size);

Create a new GstByteReader instance, which will read from `data` .

Free-function: gst_byte_reader_free

#### Parameters

data | data from which the GstByteReader should read. | [in][transfer none][array length=size]
size | Size of `data` in bytes |

#### Returns

a new GstByteReader instance.

[transfer full]

### gst_byte_reader_free ()

    void
    gst_byte_reader_free (GstByteReader *reader);

Frees a GstByteReader instance, which was previously allocated by `gst_byte_reader_new()`.

#### Parameters

reader | a GstByteReader instance. | [in][transfer full]

### gst_byte_reader_init ()

    void
    gst_byte_reader_init (GstByteReader *reader,
                          const guint8 *data,
                          guint size);

Initializes a GstByteReader instance to read from `data` . This function can be called on already initialized instances.

#### Parameters

reader | a GstByteReader instance |
data | data from which the GstByteReader should read. | [in][transfer none][array length=size]
size | Size of `data` in bytes |

### gst_byte_reader_get_pos ()

    guint
    gst_byte_reader_get_pos (const GstByteReader *reader);

Returns the current position of a GstByteReader instance in bytes.

#### Parameters

reader | a GstByteReader instance |

#### Returns

The current position of `reader` in bytes.

### gst_byte_reader_get_remaining ()

    guint
    gst_byte_reader_get_remaining (const GstByteReader *reader);

Returns the remaining number of bytes of a GstByteReader instance.

#### Parameters

reader | a GstByteReader instance |

#### Returns

The remaining number of bytes of `reader` instance.

### gst_byte_reader_set_pos ()

    gboolean
    gst_byte_reader_set_pos (GstByteReader *reader,
                             guint pos);

Sets the new position of a GstByteReader instance to `pos` in bytes.

#### Parameters

reader | a GstByteReader instance |
pos | The new position in bytes |

#### Returns

`TRUE` if the position could be set successfully, `FALSE` otherwise.

### gst_byte_reader_get_size ()

    guint
    gst_byte_reader_get_size (const GstByteReader *reader);

Returns the total number of bytes of a GstByteReader instance.

#### Parameters

reader | a GstByteReader instance |

#### Returns

The total number of bytes of `reader` instance.

### gst_byte_reader_skip ()

    gboolean
    gst_byte_reader_skip (GstByteReader *reader,
                          guint nbytes);

Skips `nbytes` bytes of the GstByteReader instance.

#### Parameters

reader | a GstByteReader instance |
nbytes | the number of bytes to skip |

#### Returns

`TRUE` if `nbytes` bytes could be skipped, `FALSE` otherwise.

### gst_byte_reader_get_int8 ()

    gboolean
    gst_byte_reader_get_int8 (GstByteReader *reader,
                              gint8 *val);

Read a signed 8 bit integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint8 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int16_be ()

    gboolean
    gst_byte_reader_get_int16_be (GstByteReader *reader,
                                  gint16 *val);

Read a signed 16 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int16_le ()

    gboolean
    gst_byte_reader_get_int16_le (GstByteReader *reader,
                                  gint16 *val);

Read a signed 16 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int24_be ()

    gboolean
    gst_byte_reader_get_int24_be (GstByteReader *reader,
                                  gint32 *val);

Read a signed 24 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int24_le ()

    gboolean
    gst_byte_reader_get_int24_le (GstByteReader *reader,
                                  gint32 *val);

Read a signed 24 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int32_be ()

    gboolean
    gst_byte_reader_get_int32_be (GstByteReader *reader,
                                  gint32 *val);

Read a signed 32 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int32_le ()

    gboolean
    gst_byte_reader_get_int32_le (GstByteReader *reader,
                                  gint32 *val);

Read a signed 32 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int64_be ()

    gboolean
    gst_byte_reader_get_int64_be (GstByteReader *reader,
                                  gint64 *val);

Read a signed 64 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_int64_le ()

    gboolean
    gst_byte_reader_get_int64_le (GstByteReader *reader,
                                  gint64 *val);

Read a signed 64 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint8 ()

    gboolean
    gst_byte_reader_get_uint8 (GstByteReader *reader,
                               guint8 *val);

Read an unsigned 8 bit integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint8 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint16_be ()

    gboolean
    gst_byte_reader_get_uint16_be (GstByteReader *reader,
                                   guint16 *val);

Read an unsigned 16 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint16_le ()

    gboolean
    gst_byte_reader_get_uint16_le (GstByteReader *reader,
                                   guint16 *val);

Read an unsigned 16 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint24_be ()

    gboolean
    gst_byte_reader_get_uint24_be (GstByteReader *reader,
                                   guint32 *val);

Read an unsigned 24 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint24_le ()

    gboolean
    gst_byte_reader_get_uint24_le (GstByteReader *reader,
                                   guint32 *val);

Read an unsigned 24 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint32_be ()

    gboolean
    gst_byte_reader_get_uint32_be (GstByteReader *reader,
                                   guint32 *val);

Read an unsigned 32 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint32_le ()

    gboolean
    gst_byte_reader_get_uint32_le (GstByteReader *reader,
                                   guint32 *val);

Read an unsigned 32 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint64_be ()

    gboolean
    gst_byte_reader_get_uint64_be (GstByteReader *reader,
                                   guint64 *val);

Read an unsigned 64 bit big endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_uint64_le ()

    gboolean
    gst_byte_reader_get_uint64_le (GstByteReader *reader,
                                   guint64 *val);

Read an unsigned 64 bit little endian integer into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int8 ()

    gboolean
    gst_byte_reader_peek_int8 (const GstByteReader *reader,
                               gint8 *val);

Read a signed 8 bit integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint8 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int16_be ()

    gboolean
    gst_byte_reader_peek_int16_be (const GstByteReader *reader,
                                   gint16 *val);

Read a signed 16 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int16_le ()

    gboolean
    gst_byte_reader_peek_int16_le (const GstByteReader *reader,
                                   gint16 *val);

Read a signed 16 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int24_be ()

    gboolean
    gst_byte_reader_peek_int24_be (const GstByteReader *reader,
                                   gint32 *val);

Read a signed 24 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int24_le ()

    gboolean
    gst_byte_reader_peek_int24_le (const GstByteReader *reader,
                                   gint32 *val);

Read a signed 24 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int32_be ()

    gboolean
    gst_byte_reader_peek_int32_be (const GstByteReader *reader,
                                   gint32 *val);

Read a signed 32 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int32_le ()

    gboolean
    gst_byte_reader_peek_int32_le (const GstByteReader *reader,
                                   gint32 *val);

Read a signed 32 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int64_be ()

    gboolean
    gst_byte_reader_peek_int64_be (const GstByteReader *reader,
                                   gint64 *val);

Read a signed 64 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_int64_le ()

    gboolean
    gst_byte_reader_peek_int64_le (const GstByteReader *reader,
                                   gint64 *val);

Read a signed 64 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint8 ()

    gboolean
    gst_byte_reader_peek_uint8 (const GstByteReader *reader,
                                guint8 *val);

Read an unsigned 8 bit integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint8 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint16_be ()

    gboolean
    gst_byte_reader_peek_uint16_be (const GstByteReader *reader,
                                    guint16 *val);

Read an unsigned 16 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint16_le ()

    gboolean
    gst_byte_reader_peek_uint16_le (const GstByteReader *reader,
                                    guint16 *val);

Read an unsigned 16 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint16 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint24_be ()

    gboolean
    gst_byte_reader_peek_uint24_be (const GstByteReader *reader,
                                    guint32 *val);

Read an unsigned 24 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint24_le ()

    gboolean
    gst_byte_reader_peek_uint24_le (const GstByteReader *reader,
                                    guint32 *val);

Read an unsigned 24 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint32_be ()

    gboolean
    gst_byte_reader_peek_uint32_be (const GstByteReader *reader,
                                    guint32 *val);

Read an unsigned 32 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint32_le ()

    gboolean
    gst_byte_reader_peek_uint32_le (const GstByteReader *reader,
                                    guint32 *val);

Read an unsigned 32 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint32 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint64_be ()

    gboolean
    gst_byte_reader_peek_uint64_be (const GstByteReader *reader,
                                    guint64 *val);

Read an unsigned 64 bit big endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_uint64_le ()

    gboolean
    gst_byte_reader_peek_uint64_le (const GstByteReader *reader,
                                    guint64 *val);

Read an unsigned 64 bit little endian integer into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a guint64 to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_float32_le ()

    gboolean
    gst_byte_reader_get_float32_le (GstByteReader *reader,
                                    gfloat *val);

Read a 32 bit little endian floating point value into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gfloat to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_float32_be ()

    gboolean
    gst_byte_reader_get_float32_be (GstByteReader *reader,
                                    gfloat *val);

Read a 32 bit big endian floating point value into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gfloat to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_float64_le ()

    gboolean
    gst_byte_reader_get_float64_le (GstByteReader *reader,
                                    gdouble *val);

Read a 64 bit little endian floating point value into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gdouble to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_float64_be ()

    gboolean
    gst_byte_reader_get_float64_be (GstByteReader *reader,
                                    gdouble *val);

Read a 64 bit big endian floating point value into `val` and update the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gdouble to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_float32_le ()

    gboolean
    gst_byte_reader_peek_float32_le (const GstByteReader *reader,
                                     gfloat *val);

Read a 32 bit little endian floating point value into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gfloat to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_float32_be ()

    gboolean
    gst_byte_reader_peek_float32_be (const GstByteReader *reader,
                                     gfloat *val);

Read a 32 bit big endian floating point value into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gfloat to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_float64_le ()

    gboolean
    gst_byte_reader_peek_float64_le (const GstByteReader *reader,
                                     gdouble *val);

Read a 64 bit little endian floating point value into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gdouble to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_float64_be ()

    gboolean
    gst_byte_reader_peek_float64_be (const GstByteReader *reader,
                                     gdouble *val);

Read a 64 bit big endian floating point value into `val` but keep the current position.

#### Parameters

reader | a GstByteReader instance |
val | Pointer to a gdouble to store the result. | [out]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_get_data ()

    gboolean
    gst_byte_reader_get_data (GstByteReader *reader,
                              guint size,
                              const guint8 **val);

Returns a constant pointer to the current data position if at least `size` bytes are left and updates the current position.

#### Parameters

reader | a GstByteReader instance |
size | Size in bytes |
val | address of a guint8 pointer variable in which to store the result. | [out][transfer none][array length=size]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_dup_data ()

    gboolean
    gst_byte_reader_dup_data (GstByteReader *reader,
                              guint size,
                              guint8 **val);

Free-function: g_free

Returns a newly-allocated copy of the current data position if at least `size` bytes are left and updates the current position. Free with `g_free()` when no longer needed.

#### Parameters

reader | a GstByteReader instance |
size | Size in bytes |
val | address of a guint8 pointer variable in which to store the result. | [out][transfer full][array length=size]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_peek_data ()

    gboolean
    gst_byte_reader_peek_data (const GstByteReader *reader,
                               guint size,
                               const guint8 **val);

Returns a constant pointer to the current data position if at least `size` bytes are left and keeps the current position.

#### Parameters

reader | a GstByteReader instance |
size | Size in bytes |
val | address of a guint8 pointer variable in which to store the result. | [out][transfer none][array length=size]

#### Returns

`TRUE` if successful, `FALSE` otherwise.

### gst_byte_reader_masked_scan_uint32 ()

    guint
    gst_byte_reader_masked_scan_uint32 (const GstByteReader *reader,
                                        guint32 mask,
                                        guint32 pattern,
                                        guint offset,
                                        guint size);

Scan for pattern `pattern` with applied mask `mask` in the byte reader data, starting from offset `offset` relative to the current position.

The bytes in `pattern` and `mask` are interpreted left-to-right, regardless of endianness. All four bytes of the pattern must be present in the byte reader data for it to match, even if the first or last bytes are masked out.

It is an error to call this function without making sure that there is enough data (offset+size bytes) in the byte reader.

#### Parameters

reader | a GstByteReader |
mask | mask to apply to data before matching against `pattern` |
pattern | pattern to match (after mask is applied) |
offset | offset from which to start scanning, relative to the current position |
size | number of bytes to scan from offset |

#### Returns

offset of the first match, or -1 if no match was found.

Example:

    // Assume the reader contains 0x00 0x01 0x02 ... 0xfe 0xff
    gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x00010203, 0, 256);
    // -> returns 0
    gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x00010203, 1, 255);
    // -> returns -1
    gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x01020304, 1, 255);
    // -> returns 1
    gst_byte_reader_masked_scan_uint32 (reader, 0xffff, 0x0001, 0, 256);
    // -> returns -1
    gst_byte_reader_masked_scan_uint32 (reader, 0xffff, 0x0203, 0, 256);
    // -> returns 0
    gst_byte_reader_masked_scan_uint32 (reader, 0xffff0000, 0x02030000, 0, 256);
    // -> returns 2
    gst_byte_reader_masked_scan_uint32 (reader, 0xffff0000, 0x02030000, 0, 4);
    // -> returns -1

### gst_byte_reader_get_string()

    #define             gst_byte_reader_get_string(reader,str)

### gst_byte_reader_get_string_utf8 ()

    gboolean
    gst_byte_reader_get_string_utf8 (GstByteReader *reader,
                                     const gchar **str);

Returns a constant pointer to the current data position if there is a NUL-terminated string in the data (this could be just a NUL terminator), advancing the current position to the byte after the string. This will work for any NUL-terminated string with a character width of 8 bits, so ASCII, UTF-8, ISO-8859-N etc.

No input checking for valid UTF-8 is done.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |
str | address of a gchar pointer variable in which to store the result. | [out][transfer none][array zero-terminated=1]

#### Returns

`TRUE` if a string could be found, `FALSE` otherwise.

### gst_byte_reader_peek_string()

    #define             gst_byte_reader_peek_string(reader,str)

Returns a constant pointer to the current data position if there is a NUL-terminated string in the data (this could be just a NUL terminator). The current position will be maintained. This will work for any NUL-terminated string with a character width of 8 bits, so ASCII, UTF-8, ISO-8859-N etc.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |
str | address of a gchar pointer variable in which to store the result. | [out][transfer none][array zero-terminated=1]

#### Returns

`TRUE` if a string could be skipped, `FALSE` otherwise.

### gst_byte_reader_peek_string_utf8 ()

    gboolean
    gst_byte_reader_peek_string_utf8 (const GstByteReader *reader,
                                      const gchar **str);

Returns a constant pointer to the current data position if there is a NUL-terminated string in the data (this could be just a NUL terminator). The current position will be maintained. This will work for any NUL-terminated string with a character width of 8 bits, so ASCII, UTF-8, ISO-8859-N etc.

No input checking for valid UTF-8 is done.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |
str | address of a gchar pointer variable in which to store the result. | [out][transfer none][array zero-terminated=1]

#### Returns

`TRUE` if a string could be skipped, `FALSE` otherwise.

### gst_byte_reader_dup_string()

    #define             gst_byte_reader_dup_string(reader,str)

### gst_byte_reader_dup_string_utf8 ()

    gboolean
    gst_byte_reader_dup_string_utf8 (GstByteReader *reader,
                                     gchar **str);

Free-function: g_free

FIXME:Reads (copies) a NUL-terminated string in the GstByteReader instance, advancing the current position to the byte after the string. This will work for any NUL-terminated string with a character width of 8 bits, so ASCII, UTF-8, ISO-8859-N etc. No input checking for valid UTF-8 is done.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |
str | address of a gchar pointer variable in which to store the result. | [out][transfer full][array zero-terminated=1]

#### Returns

`TRUE` if a string could be read into `str` , `FALSE` otherwise. The string put into `str` must be freed with `g_free()` when no longer needed.

### gst_byte_reader_dup_string_utf16 ()

    gboolean
    gst_byte_reader_dup_string_utf16 (GstByteReader *reader,
                                      guint16 **str);

Free-function: g_free

Returns a newly-allocated copy of the current data position if there is a NUL-terminated UTF-16 string in the data (this could be an empty string as well), and advances the current position.

No input checking for valid UTF-16 is done. This function is endianness agnostic - you should not assume the UTF-16 characters are in host endianness.

This function will fail if no NUL-terminator was found in in the data.

Note: there is no peek or get variant of this function to ensure correct byte alignment of the UTF-16 string.

#### Parameters

reader | a GstByteReader instance |
str | address of a guint16 pointer variable in which to store the result. | [out][transfer full][array zero-terminated=1]

#### Returns

`TRUE` if a string could be read, `FALSE` otherwise. The string put into `str` must be freed with `g_free()` when no longer needed.

### gst_byte_reader_dup_string_utf32 ()

    gboolean
    gst_byte_reader_dup_string_utf32 (GstByteReader *reader,
                                      guint32 **str);

Free-function: g_free

Returns a newly-allocated copy of the current data position if there is a NUL-terminated UTF-32 string in the data (this could be an empty string as well), and advances the current position.

No input checking for valid UTF-32 is done. This function is endianness agnostic - you should not assume the UTF-32 characters are in host endianness.

This function will fail if no NUL-terminator was found in in the data.

Note: there is no peek or get variant of this function to ensure correct byte alignment of the UTF-32 string.

#### Parameters

reader | a GstByteReader instance |
str | address of a guint32 pointer variable in which to store the result. | [out][transfer full][array zero-terminated=1]

#### Returns

`TRUE` if a string could be read, `FALSE` otherwise. The string put into `str` must be freed with `g_free()` when no longer needed.

### gst_byte_reader_skip_string()

    #define             gst_byte_reader_skip_string(reader)

Skips a NUL-terminated string in the GstByteReader instance, advancing the current position to the byte after the string. This will work for any NUL-terminated string with a character width of 8 bits, so ASCII, UTF-8, ISO-8859-N etc.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |

#### Returns

`TRUE` if a string could be skipped, `FALSE` otherwise.

### gst_byte_reader_skip_string_utf8 ()

    gboolean
    gst_byte_reader_skip_string_utf8 (GstByteReader *reader);

Skips a NUL-terminated string in the GstByteReader instance, advancing the current position to the byte after the string. This will work for any NUL-terminated string with a character width of 8 bits, so ASCII, UTF-8, ISO-8859-N etc. No input checking for valid UTF-8 is done.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |

#### Returns

`TRUE` if a string could be skipped, `FALSE` otherwise.

### gst_byte_reader_skip_string_utf16 ()

    gboolean
    gst_byte_reader_skip_string_utf16 (GstByteReader *reader);

Skips a NUL-terminated UTF-16 string in the GstByteReader instance, advancing the current position to the byte after the string.

No input checking for valid UTF-16 is done.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |

#### Returns

`TRUE` if a string could be skipped, `FALSE` otherwise.

### gst_byte_reader_skip_string_utf32 ()

    gboolean
    gst_byte_reader_skip_string_utf32 (GstByteReader *reader);

Skips a NUL-terminated UTF-32 string in the GstByteReader instance, advancing the current position to the byte after the string.

No input checking for valid UTF-32 is done.

This function will fail if no NUL-terminator was found in in the data.

#### Parameters

reader | a GstByteReader instance |

#### Returns

`TRUE` if a string could be skipped, `FALSE` otherwise.

### gst_byte_reader_skip_unchecked ()

    void
    gst_byte_reader_skip_unchecked (GstByteReader *reader,
                                    guint nbytes);

Skips `nbytes` bytes of the GstByteReader instance without checking if there are enough bytes available in the byte reader.

#### Parameters

reader | a GstByteReader instance |
nbytes | the number of bytes to skip |

### gst_byte_reader_get_int8_unchecked ()

    gint8
    gst_byte_reader_get_int8_unchecked (GstByteReader *reader);

Read an signed 8 bit integer without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 8 bit integer.

### gst_byte_reader_get_int16_be_unchecked ()

    gint16
    gst_byte_reader_get_int16_be_unchecked
                                   (GstByteReader *reader);

Read a signed 16 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 16 bit integer.

### gst_byte_reader_get_int16_le_unchecked ()

    gint16
    gst_byte_reader_get_int16_le_unchecked
                                   (GstByteReader *reader);

Read a signed 16 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 16 bit integer.

### gst_byte_reader_get_int24_be_unchecked ()

    gint32
    gst_byte_reader_get_int24_be_unchecked
                                   (GstByteReader *reader);

Read a signed 24 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 24 bit integer (as gint32)

### gst_byte_reader_get_int24_le_unchecked ()

    gint32
    gst_byte_reader_get_int24_le_unchecked
                                   (GstByteReader *reader);

Read a signed 24 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 24 bit integer (as gint32)

### gst_byte_reader_get_int32_be_unchecked ()

    gint32
    gst_byte_reader_get_int32_be_unchecked
                                   (GstByteReader *reader);

Read a signed 32 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 32 bit integer.

### gst_byte_reader_get_int32_le_unchecked ()

    gint32
    gst_byte_reader_get_int32_le_unchecked
                                   (GstByteReader *reader);

Read a signed 32 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 32 bit integer.

### gst_byte_reader_get_int64_be_unchecked ()

    gint64
    gst_byte_reader_get_int64_be_unchecked
                                   (GstByteReader *reader);

Read a signed 64 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 64 bit integer.

### gst_byte_reader_get_int64_le_unchecked ()

    gint64
    gst_byte_reader_get_int64_le_unchecked
                                   (GstByteReader *reader);

Read a signed 64 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 64 bit integer.

### gst_byte_reader_get_uint8_unchecked ()

    guint8
    gst_byte_reader_get_uint8_unchecked (GstByteReader *reader);

Read an unsigned 8 bit integer without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 8 bit integer.

### gst_byte_reader_get_uint16_be_unchecked ()

    guint16
    gst_byte_reader_get_uint16_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 16 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 16 bit integer.

### gst_byte_reader_get_uint16_le_unchecked ()

    guint16
    gst_byte_reader_get_uint16_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 16 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 16 bit integer.

### gst_byte_reader_get_uint24_be_unchecked ()

    guint32
    gst_byte_reader_get_uint24_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 24 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 24 bit integer (as guint32)

### gst_byte_reader_get_uint24_le_unchecked ()

    guint32
    gst_byte_reader_get_uint24_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 24 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 24 bit integer (as guint32)

### gst_byte_reader_get_uint32_be_unchecked ()

    guint32
    gst_byte_reader_get_uint32_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 32 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 32 bit integer.

### gst_byte_reader_get_uint32_le_unchecked ()

    guint32
    gst_byte_reader_get_uint32_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 32 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 32 bit integer.

### gst_byte_reader_get_uint64_be_unchecked ()

    guint64
    gst_byte_reader_get_uint64_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 64 bit integer in big endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 64 bit integer.

### gst_byte_reader_get_uint64_le_unchecked ()

    guint64
    gst_byte_reader_get_uint64_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 64 bit integer in little endian format without checking if there are enough bytes available in the byte reader and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 64 bit integer.

### gst_byte_reader_peek_int8_unchecked ()

    gint8
    gst_byte_reader_peek_int8_unchecked (GstByteReader *reader);

Read an signed 8 bit integer without checking if there are enough bytes available in the byte reader, but do not advance the current read position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 8 bit integer.

### gst_byte_reader_peek_int16_be_unchecked ()

    gint16
    gst_byte_reader_peek_int16_be_unchecked
                                   (GstByteReader *reader);

Read a signed 16 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 16 bit integer.

### gst_byte_reader_peek_int16_le_unchecked ()

    gint16
    gst_byte_reader_peek_int16_le_unchecked
                                   (GstByteReader *reader);

Read a signed 16 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 16 bit integer.

### gst_byte_reader_peek_int24_be_unchecked ()

    gint32
    gst_byte_reader_peek_int24_be_unchecked
                                   (GstByteReader *reader);

Read a signed 24 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 24 bit integer (as gint32)

### gst_byte_reader_peek_int24_le_unchecked ()

    gint32
    gst_byte_reader_peek_int24_le_unchecked
                                   (GstByteReader *reader);

Read a signed 24 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 24 bit integer (as gint32)

### gst_byte_reader_peek_int32_be_unchecked ()

    gint32
    gst_byte_reader_peek_int32_be_unchecked
                                   (GstByteReader *reader);

Read a signed 32 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 32 bit integer.

### gst_byte_reader_peek_int32_le_unchecked ()

    gint32
    gst_byte_reader_peek_int32_le_unchecked
                                   (GstByteReader *reader);

Read a signed 32 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 32 bit integer.

### gst_byte_reader_peek_int64_be_unchecked ()

    gint64
    gst_byte_reader_peek_int64_be_unchecked
                                   (GstByteReader *reader);

Read a signed 64 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 64 bit integer.

### gst_byte_reader_peek_int64_le_unchecked ()

    gint64
    gst_byte_reader_peek_int64_le_unchecked
                                   (GstByteReader *reader);

Read a signed 64 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

signed 64 bit integer.

### gst_byte_reader_peek_uint8_unchecked ()

    guint8
    gst_byte_reader_peek_uint8_unchecked (GstByteReader *reader);

Read an unsigned 8 bit integer without checking if there are enough bytes available in the byte reader, but do not advance the current read position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 8 bit integer.

### gst_byte_reader_peek_uint16_be_unchecked ()

    guint16
    gst_byte_reader_peek_uint16_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 16 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 16 bit integer.

### gst_byte_reader_peek_uint16_le_unchecked ()

    guint16
    gst_byte_reader_peek_uint16_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 16 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 16 bit integer.

### gst_byte_reader_peek_uint24_be_unchecked ()

    guint32
    gst_byte_reader_peek_uint24_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 24 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 24 bit integer (as guint32)

### gst_byte_reader_peek_uint24_le_unchecked ()

    guint32
    gst_byte_reader_peek_uint24_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 24 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 24 bit integer (as guint32)

### gst_byte_reader_peek_uint32_be_unchecked ()

    guint32
    gst_byte_reader_peek_uint32_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 32 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 32 bit integer.

### gst_byte_reader_peek_uint32_le_unchecked ()

    guint32
    gst_byte_reader_peek_uint32_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 32 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 32 bit integer.

### gst_byte_reader_peek_uint64_be_unchecked ()

    guint64
    gst_byte_reader_peek_uint64_be_unchecked
                                   (GstByteReader *reader);

Read an unsigned 64 bit integer in big endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 64 bit integer.

### gst_byte_reader_peek_uint64_le_unchecked ()

    guint64
    gst_byte_reader_peek_uint64_le_unchecked
                                   (GstByteReader *reader);

Read an unsigned 64 bit integer in little endian format without checking if there are enough bytes available in the byte reader, but do not advance the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

unsigned 64 bit integer.

### gst_byte_reader_get_float32_le_unchecked ()

    gfloat
    gst_byte_reader_get_float32_le_unchecked
                                   (GstByteReader *reader);

Read a 32 bit little endian float without checking if there is enough data available and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

floating point value read

### gst_byte_reader_get_float32_be_unchecked ()

    gfloat
    gst_byte_reader_get_float32_be_unchecked
                                   (GstByteReader *reader);

Read a 32 bit big endian float without checking if there is enough data available and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

floating point value read

### gst_byte_reader_get_float64_le_unchecked ()

    gdouble
    gst_byte_reader_get_float64_le_unchecked
                                   (GstByteReader *reader);

Read a 64 bit little endian float without checking if there is enough data available and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

double precision floating point value read

### gst_byte_reader_get_float64_be_unchecked ()

    gdouble
    gst_byte_reader_get_float64_be_unchecked
                                   (GstByteReader *reader);

Read a 64 bit big endian float without checking if there is enough data available and update the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

double precision floating point value read

### gst_byte_reader_peek_float32_le_unchecked ()

    gfloat
    gst_byte_reader_peek_float32_le_unchecked
                                   (GstByteReader *reader);

Read a 32 bit little endian float without checking if there is enough data available, but keep the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

floating point value read

### gst_byte_reader_peek_float32_be_unchecked ()

    gfloat
    gst_byte_reader_peek_float32_be_unchecked
                                   (GstByteReader *reader);

Read a 32 bit big endian float without checking if there is enough data available, but keep the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

floating point value read

### gst_byte_reader_peek_float64_le_unchecked ()

    gdouble
    gst_byte_reader_peek_float64_le_unchecked
                                   (GstByteReader *reader);

Read a 64 bit little endian float without checking if there is enough data available, but keep the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

double precision floating point value read

### gst_byte_reader_peek_float64_be_unchecked ()

    gdouble
    gst_byte_reader_peek_float64_be_unchecked
                                   (GstByteReader *reader);

Read a 64 bit big endian float without checking if there is enough data available, but keep the current position.

#### Parameters

reader | a GstByteReader instance |

#### Returns

double precision floating point value read

### gst_byte_reader_dup_data_unchecked ()

    guint8 *
    gst_byte_reader_dup_data_unchecked (GstByteReader *reader,
                                        guint size);

Returns a newly-allocated copy of the data at the current data position without checking if at least `size` bytes are left. Advances the current read position by `size` bytes.

Free-function: g_free

#### Parameters

reader | a GstByteReader instance |
size | Size in bytes |

#### Returns

a newly-allocated copy of the data `size` bytes in size. Free with `g_free()` when no longer needed.

[transfer full][array length=size]

### gst_byte_reader_get_data_unchecked ()

    const guint8 *
    gst_byte_reader_get_data_unchecked (GstByteReader *reader,
                                        guint size);

Returns a constant pointer to the current data position without checking if at least `size` bytes are left. Advances the current read position by `size` bytes.

#### Parameters

reader | a GstByteReader instance |
size | Size in bytes |

#### Returns

a constant pointer to the current data position.

[transfer none][array length=size]

### gst_byte_reader_peek_data_unchecked ()

    const guint8 *
    gst_byte_reader_peek_data_unchecked (const GstByteReader *reader);

#### Parameters

reader | a GstByteReader instance |

#### Returns

a constant pointer to the current data position.

[transfer none]

## Types and Values

### GstByteReader

    typedef struct {
      const guint8 *data;
      guint size;

      guint byte;  /* Byte position */
    } GstByteReader;

A byte reader instance.

#### Members

const guint8 *`data`; | Data from which the bit reader will read. | [array length=size]
guint `size`; | Size of `data` in bytes |
guint `byte`; | Current byte position |