GstByteReader

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.

GstByteReader

A byte reader instance.

Members

data (const guint8 *) –

Data from which the bit reader will read

size (guint) –

Size of data in bytes

byte (guint) –

Current byte position


GstBase.ByteReader

A byte reader instance.

Members

data ([ int ]) –

Data from which the bit reader will read

size (int) –

Size of data in bytes

byte (int) –

Current byte position


GstBase.ByteReader

A byte reader instance.

Members

data ([ Number ]) –

Data from which the bit reader will read

size (Number) –

Size of data in bytes

byte (Number) –

Current byte position


Methods

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 ( [out] [transfer: full] [array length=size] ) –

address of a guint8 pointer variable in which to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.dup_data

def GstBase.ByteReader.dup_data (self):
    #python wrapper for 'gst_byte_reader_dup_data'

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 GLib.free when no longer needed.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

size ( int ) –

True if successful, False otherwise.

val ( [ int ] ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.dup_data

function GstBase.ByteReader.prototype.dup_data(): {
    // javascript wrapper for 'gst_byte_reader_dup_data'
}

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 GLib.prototype.free when no longer needed.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

size ( Number ) –

true if successful, false otherwise.

val ( [ Number ] ) –

true if successful, false otherwise.


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 ( [out] [transfer: full] [array zero-terminated=1] ) –

address of a guint16 pointer variable in which to store the result

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.


GstBase.ByteReader.dup_string_utf16

def GstBase.ByteReader.dup_string_utf16 (self):
    #python wrapper for 'gst_byte_reader_dup_string_utf16'

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if a string could be read, False otherwise. The string put into str must be freed with GLib.free when no longer needed.

str ( [ int ] ) –

True if a string could be read, False otherwise. The string put into str must be freed with GLib.free when no longer needed.


GstBase.ByteReader.prototype.dup_string_utf16

function GstBase.ByteReader.prototype.dup_string_utf16(): {
    // javascript wrapper for 'gst_byte_reader_dup_string_utf16'
}

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if a string could be read, false otherwise. The string put into str must be freed with GLib.prototype.free when no longer needed.

str ( [ Number ] ) –

true if a string could be read, false otherwise. The string put into str must be freed with GLib.prototype.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 ( [out] [transfer: full] [array zero-terminated=1] ) –

address of a guint32 pointer variable in which to store the result

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.


GstBase.ByteReader.dup_string_utf32

def GstBase.ByteReader.dup_string_utf32 (self):
    #python wrapper for 'gst_byte_reader_dup_string_utf32'

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if a string could be read, False otherwise. The string put into str must be freed with GLib.free when no longer needed.

str ( [ int ] ) –

True if a string could be read, False otherwise. The string put into str must be freed with GLib.free when no longer needed.


GstBase.ByteReader.prototype.dup_string_utf32

function GstBase.ByteReader.prototype.dup_string_utf32(): {
    // javascript wrapper for 'gst_byte_reader_dup_string_utf32'
}

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if a string could be read, false otherwise. The string put into str must be freed with GLib.prototype.free when no longer needed.

str ( [ Number ] ) –

true if a string could be read, false otherwise. The string put into str must be freed with GLib.prototype.free when no longer needed.


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 ( [out] [transfer: full] [array zero-terminated=1] ) –

address of a gchar pointer variable in which to store the result

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.


GstBase.ByteReader.dup_string_utf8

def GstBase.ByteReader.dup_string_utf8 (self):
    #python wrapper for 'gst_byte_reader_dup_string_utf8'

Free-function: g_free

FIXME:Reads (copies) a NUL-terminated string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if a string could be read into str, False otherwise. The string put into str must be freed with GLib.free when no longer needed.

str ( [ str ] ) –

True if a string could be read into str, False otherwise. The string put into str must be freed with GLib.free when no longer needed.


GstBase.ByteReader.prototype.dup_string_utf8

function GstBase.ByteReader.prototype.dup_string_utf8(): {
    // javascript wrapper for 'gst_byte_reader_dup_string_utf8'
}

Free-function: g_free

FIXME:Reads (copies) a NUL-terminated string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if a string could be read into str, false otherwise. The string put into str must be freed with GLib.prototype.free when no longer needed.

str ( [ String ] ) –

true if a string could be read into str, false otherwise. The string put into str must be freed with GLib.prototype.free when no longer needed.


gst_byte_reader_free

gst_byte_reader_free (GstByteReader * reader)

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

Parameters:

reader ( [in] [transfer: full] ) –

a GstByteReader instance


GstBase.ByteReader.free

def GstBase.ByteReader.free (self):
    #python wrapper for 'gst_byte_reader_free'

Frees a GstBase.ByteReader instance, which was previously allocated by gst_byte_reader_new (not introspectable).

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance


GstBase.ByteReader.prototype.free

function GstBase.ByteReader.prototype.free(): {
    // javascript wrapper for 'gst_byte_reader_free'
}

Frees a GstBase.ByteReader instance, which was previously allocated by gst_byte_reader_new (not introspectable).

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance


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 ( [out] [transfer: none] [array length=size] ) –

address of a guint8 pointer variable in which to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_data

def GstBase.ByteReader.get_data (self):
    #python wrapper for 'gst_byte_reader_get_data'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

size ( int ) –

True if successful, False otherwise.

val ( [ int ] ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_data

function GstBase.ByteReader.prototype.get_data(): {
    // javascript wrapper for 'gst_byte_reader_get_data'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

size ( Number ) –

true if successful, false otherwise.

val ( [ Number ] ) –

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 ( [out] ) –

Pointer to a gfloat to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_float32_be

def GstBase.ByteReader.get_float32_be (self):
    #python wrapper for 'gst_byte_reader_get_float32_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_float32_be

function GstBase.ByteReader.prototype.get_float32_be(): {
    // javascript wrapper for 'gst_byte_reader_get_float32_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gfloat to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_float32_le

def GstBase.ByteReader.get_float32_le (self):
    #python wrapper for 'gst_byte_reader_get_float32_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_float32_le

function GstBase.ByteReader.prototype.get_float32_le(): {
    // javascript wrapper for 'gst_byte_reader_get_float32_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gdouble to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_float64_be

def GstBase.ByteReader.get_float64_be (self):
    #python wrapper for 'gst_byte_reader_get_float64_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_float64_be

function GstBase.ByteReader.prototype.get_float64_be(): {
    // javascript wrapper for 'gst_byte_reader_get_float64_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gdouble to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_float64_le

def GstBase.ByteReader.get_float64_le (self):
    #python wrapper for 'gst_byte_reader_get_float64_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_float64_le

function GstBase.ByteReader.prototype.get_float64_le(): {
    // javascript wrapper for 'gst_byte_reader_get_float64_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int16_be

def GstBase.ByteReader.get_int16_be (self):
    #python wrapper for 'gst_byte_reader_get_int16_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int16_be

function GstBase.ByteReader.prototype.get_int16_be(): {
    // javascript wrapper for 'gst_byte_reader_get_int16_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int16_le

def GstBase.ByteReader.get_int16_le (self):
    #python wrapper for 'gst_byte_reader_get_int16_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int16_le

function GstBase.ByteReader.prototype.get_int16_le(): {
    // javascript wrapper for 'gst_byte_reader_get_int16_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int24_be

def GstBase.ByteReader.get_int24_be (self):
    #python wrapper for 'gst_byte_reader_get_int24_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int24_be

function GstBase.ByteReader.prototype.get_int24_be(): {
    // javascript wrapper for 'gst_byte_reader_get_int24_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int24_le

def GstBase.ByteReader.get_int24_le (self):
    #python wrapper for 'gst_byte_reader_get_int24_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int24_le

function GstBase.ByteReader.prototype.get_int24_le(): {
    // javascript wrapper for 'gst_byte_reader_get_int24_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int32_be

def GstBase.ByteReader.get_int32_be (self):
    #python wrapper for 'gst_byte_reader_get_int32_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int32_be

function GstBase.ByteReader.prototype.get_int32_be(): {
    // javascript wrapper for 'gst_byte_reader_get_int32_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int32_le

def GstBase.ByteReader.get_int32_le (self):
    #python wrapper for 'gst_byte_reader_get_int32_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int32_le

function GstBase.ByteReader.prototype.get_int32_le(): {
    // javascript wrapper for 'gst_byte_reader_get_int32_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int64_be

def GstBase.ByteReader.get_int64_be (self):
    #python wrapper for 'gst_byte_reader_get_int64_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int64_be

function GstBase.ByteReader.prototype.get_int64_be(): {
    // javascript wrapper for 'gst_byte_reader_get_int64_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int64_le

def GstBase.ByteReader.get_int64_le (self):
    #python wrapper for 'gst_byte_reader_get_int64_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int64_le

function GstBase.ByteReader.prototype.get_int64_le(): {
    // javascript wrapper for 'gst_byte_reader_get_int64_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

true if successful, 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 ( [out] ) –

Pointer to a gint8 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_int8

def GstBase.ByteReader.get_int8 (self):
    #python wrapper for 'gst_byte_reader_get_int8'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_int8

function GstBase.ByteReader.prototype.get_int8(): {
    // javascript wrapper for 'gst_byte_reader_get_int8'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

true if successful, false otherwise.


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.


GstBase.ByteReader.get_pos

def GstBase.ByteReader.get_pos (self):
    #python wrapper for 'gst_byte_reader_get_pos'

Returns the current position of a GstBase.ByteReader instance in bytes.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( int ) –

The current position of reader in bytes.


GstBase.ByteReader.prototype.get_pos

function GstBase.ByteReader.prototype.get_pos(): {
    // javascript wrapper for 'gst_byte_reader_get_pos'
}

Returns the current position of a GstBase.ByteReader instance in bytes.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( Number ) –

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.


GstBase.ByteReader.get_remaining

def GstBase.ByteReader.get_remaining (self):
    #python wrapper for 'gst_byte_reader_get_remaining'

Returns the remaining number of bytes of a GstBase.ByteReader instance.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( int ) –

The remaining number of bytes of reader instance.


GstBase.ByteReader.prototype.get_remaining

function GstBase.ByteReader.prototype.get_remaining(): {
    // javascript wrapper for 'gst_byte_reader_get_remaining'
}

Returns the remaining number of bytes of a GstBase.ByteReader instance.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( Number ) –

The remaining number of bytes of reader instance.


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.


GstBase.ByteReader.get_size

def GstBase.ByteReader.get_size (self):
    #python wrapper for 'gst_byte_reader_get_size'

Returns the total number of bytes of a GstBase.ByteReader instance.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( int ) –

The total number of bytes of reader instance.


GstBase.ByteReader.prototype.get_size

function GstBase.ByteReader.prototype.get_size(): {
    // javascript wrapper for 'gst_byte_reader_get_size'
}

Returns the total number of bytes of a GstBase.ByteReader instance.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( Number ) –

The total number of bytes of reader instance.


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 ( [out] [transfer: none] [array zero-terminated=1] ) –

address of a gchar pointer variable in which to store the result

Returns

TRUE if a string could be found, FALSE otherwise.


GstBase.ByteReader.get_string_utf8

def GstBase.ByteReader.get_string_utf8 (self):
    #python wrapper for 'gst_byte_reader_get_string_utf8'

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if a string could be found, False otherwise.

str ( [ str ] ) –

True if a string could be found, False otherwise.


GstBase.ByteReader.prototype.get_string_utf8

function GstBase.ByteReader.prototype.get_string_utf8(): {
    // javascript wrapper for 'gst_byte_reader_get_string_utf8'
}

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if a string could be found, false otherwise.

str ( [ String ] ) –

true if a string could be found, false otherwise.


gst_byte_reader_get_sub_reader

gboolean
gst_byte_reader_get_sub_reader (GstByteReader * reader,
                                GstByteReader * sub_reader,
                                guint size)

Initializes a GstByteReader sub-reader instance to contain size bytes of data from the current position of reader. This is useful to read chunked formats and make sure that one doesn't read beyond the size of the sub-chunk.

Unlike gst_byte_reader_peek_sub_reader, this function also modifies the position of reader and moves it forward by size bytes.

Parameters:

reader

an existing and initialized GstByteReader instance

sub_reader

a GstByteReader instance to initialize as sub-reader

size

size of sub_reader in bytes

Returns

FALSE on error or if reader does not contain size more bytes from the current position, and otherwise TRUE

Since : 1.6


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 ( [out] ) –

Pointer to a guint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint16_be

def GstBase.ByteReader.get_uint16_be (self):
    #python wrapper for 'gst_byte_reader_get_uint16_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint16_be

function GstBase.ByteReader.prototype.get_uint16_be(): {
    // javascript wrapper for 'gst_byte_reader_get_uint16_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint16_le

def GstBase.ByteReader.get_uint16_le (self):
    #python wrapper for 'gst_byte_reader_get_uint16_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint16_le

function GstBase.ByteReader.prototype.get_uint16_le(): {
    // javascript wrapper for 'gst_byte_reader_get_uint16_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint24_be

def GstBase.ByteReader.get_uint24_be (self):
    #python wrapper for 'gst_byte_reader_get_uint24_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint24_be

function GstBase.ByteReader.prototype.get_uint24_be(): {
    // javascript wrapper for 'gst_byte_reader_get_uint24_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint24_le

def GstBase.ByteReader.get_uint24_le (self):
    #python wrapper for 'gst_byte_reader_get_uint24_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint24_le

function GstBase.ByteReader.prototype.get_uint24_le(): {
    // javascript wrapper for 'gst_byte_reader_get_uint24_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint32_be

def GstBase.ByteReader.get_uint32_be (self):
    #python wrapper for 'gst_byte_reader_get_uint32_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint32_be

function GstBase.ByteReader.prototype.get_uint32_be(): {
    // javascript wrapper for 'gst_byte_reader_get_uint32_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint32_le

def GstBase.ByteReader.get_uint32_le (self):
    #python wrapper for 'gst_byte_reader_get_uint32_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint32_le

function GstBase.ByteReader.prototype.get_uint32_le(): {
    // javascript wrapper for 'gst_byte_reader_get_uint32_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint64_be

def GstBase.ByteReader.get_uint64_be (self):
    #python wrapper for 'gst_byte_reader_get_uint64_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint64_be

function GstBase.ByteReader.prototype.get_uint64_be(): {
    // javascript wrapper for 'gst_byte_reader_get_uint64_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint64_le

def GstBase.ByteReader.get_uint64_le (self):
    #python wrapper for 'gst_byte_reader_get_uint64_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint64_le

function GstBase.ByteReader.prototype.get_uint64_le(): {
    // javascript wrapper for 'gst_byte_reader_get_uint64_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint8 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.get_uint8

def GstBase.ByteReader.get_uint8 (self):
    #python wrapper for 'gst_byte_reader_get_uint8'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.get_uint8

function GstBase.ByteReader.prototype.get_uint8(): {
    // javascript wrapper for 'gst_byte_reader_get_uint8'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

true if successful, false otherwise.


gst_byte_reader_init

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 ( [in] [transfer: none] [array length=size] ) –

data from which the GstByteReader should read

size

Size of data in bytes


GstBase.ByteReader.init

def GstBase.ByteReader.init (self, data, size):
    #python wrapper for 'gst_byte_reader_init'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

data ( [ int ] ) –

data from which the GstBase.ByteReader should read

size ( int ) –

Size of data in bytes


GstBase.ByteReader.prototype.init

function GstBase.ByteReader.prototype.init(data: [ Number ], size: Number): {
    // javascript wrapper for 'gst_byte_reader_init'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

data ( [ Number ] ) –

data from which the GstBase.ByteReader should read

size ( Number ) –

Size of data in bytes


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

GstBase.ByteReader.masked_scan_uint32

def GstBase.ByteReader.masked_scan_uint32 (self, mask, pattern, offset, size):
    #python wrapper for 'gst_byte_reader_masked_scan_uint32'

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:

mask ( int ) –

mask to apply to data before matching against pattern

pattern ( int ) –

pattern to match (after mask is applied)

offset ( int ) –

offset from which to start scanning, relative to the current position

size ( int ) –

number of bytes to scan from offset

Returns ( int ) –

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

GstBase.ByteReader.prototype.masked_scan_uint32

function GstBase.ByteReader.prototype.masked_scan_uint32(mask: Number, pattern: Number, offset: Number, size: Number): {
    // javascript wrapper for 'gst_byte_reader_masked_scan_uint32'
}

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:

mask ( Number ) –

mask to apply to data before matching against pattern

pattern ( Number ) –

pattern to match (after mask is applied)

offset ( Number ) –

offset from which to start scanning, relative to the current position

size ( Number ) –

number of bytes to scan from offset

Returns ( Number ) –

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_masked_scan_uint32_peek

guint
gst_byte_reader_masked_scan_uint32_peek (const GstByteReader * reader,
                                         guint32 mask,
                                         guint32 pattern,
                                         guint offset,
                                         guint size,
                                         guint32 * value)

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

value ( [out] ) –

pointer to uint32 to return matching data

Returns

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

Since : 1.6


GstBase.ByteReader.masked_scan_uint32_peek

def GstBase.ByteReader.masked_scan_uint32_peek (self, mask, pattern, offset, size):
    #python wrapper for 'gst_byte_reader_masked_scan_uint32_peek'

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:

mask ( int ) –

mask to apply to data before matching against pattern

pattern ( int ) –

pattern to match (after mask is applied)

offset ( int ) –

offset from which to start scanning, relative to the current position

size ( int ) –

number of bytes to scan from offset

Returns a tuple made of:

( int ) –

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

value ( int ) –

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

Since : 1.6


GstBase.ByteReader.prototype.masked_scan_uint32_peek

function GstBase.ByteReader.prototype.masked_scan_uint32_peek(mask: Number, pattern: Number, offset: Number, size: Number): {
    // javascript wrapper for 'gst_byte_reader_masked_scan_uint32_peek'
}

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:

mask ( Number ) –

mask to apply to data before matching against pattern

pattern ( Number ) –

pattern to match (after mask is applied)

offset ( Number ) –

offset from which to start scanning, relative to the current position

size ( Number ) –

number of bytes to scan from offset

Returns a tuple made of:

( Number ) –

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

value ( Number ) –

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

Since : 1.6


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 ( [out] [transfer: none] [array length=size] ) –

address of a guint8 pointer variable in which to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_data

def GstBase.ByteReader.peek_data (self):
    #python wrapper for 'gst_byte_reader_peek_data'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

size ( int ) –

True if successful, False otherwise.

val ( [ int ] ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_data

function GstBase.ByteReader.prototype.peek_data(): {
    // javascript wrapper for 'gst_byte_reader_peek_data'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

size ( Number ) –

true if successful, false otherwise.

val ( [ Number ] ) –

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 ( [out] ) –

Pointer to a gfloat to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_float32_be

def GstBase.ByteReader.peek_float32_be (self):
    #python wrapper for 'gst_byte_reader_peek_float32_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_float32_be

function GstBase.ByteReader.prototype.peek_float32_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_float32_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gfloat to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_float32_le

def GstBase.ByteReader.peek_float32_le (self):
    #python wrapper for 'gst_byte_reader_peek_float32_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_float32_le

function GstBase.ByteReader.prototype.peek_float32_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_float32_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gdouble to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_float64_be

def GstBase.ByteReader.peek_float64_be (self):
    #python wrapper for 'gst_byte_reader_peek_float64_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_float64_be

function GstBase.ByteReader.prototype.peek_float64_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_float64_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gdouble to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_float64_le

def GstBase.ByteReader.peek_float64_le (self):
    #python wrapper for 'gst_byte_reader_peek_float64_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( float ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_float64_le

function GstBase.ByteReader.prototype.peek_float64_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_float64_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int16_be

def GstBase.ByteReader.peek_int16_be (self):
    #python wrapper for 'gst_byte_reader_peek_int16_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int16_be

function GstBase.ByteReader.prototype.peek_int16_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_int16_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int16_le

def GstBase.ByteReader.peek_int16_le (self):
    #python wrapper for 'gst_byte_reader_peek_int16_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int16_le

function GstBase.ByteReader.prototype.peek_int16_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_int16_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int24_be

def GstBase.ByteReader.peek_int24_be (self):
    #python wrapper for 'gst_byte_reader_peek_int24_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int24_be

function GstBase.ByteReader.prototype.peek_int24_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_int24_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int24_le

def GstBase.ByteReader.peek_int24_le (self):
    #python wrapper for 'gst_byte_reader_peek_int24_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int24_le

function GstBase.ByteReader.prototype.peek_int24_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_int24_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int32_be

def GstBase.ByteReader.peek_int32_be (self):
    #python wrapper for 'gst_byte_reader_peek_int32_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int32_be

function GstBase.ByteReader.prototype.peek_int32_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_int32_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int32_le

def GstBase.ByteReader.peek_int32_le (self):
    #python wrapper for 'gst_byte_reader_peek_int32_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int32_le

function GstBase.ByteReader.prototype.peek_int32_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_int32_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int64_be

def GstBase.ByteReader.peek_int64_be (self):
    #python wrapper for 'gst_byte_reader_peek_int64_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int64_be

function GstBase.ByteReader.prototype.peek_int64_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_int64_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int64_le

def GstBase.ByteReader.peek_int64_le (self):
    #python wrapper for 'gst_byte_reader_peek_int64_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int64_le

function GstBase.ByteReader.prototype.peek_int64_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_int64_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a gint8 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_int8

def GstBase.ByteReader.peek_int8 (self):
    #python wrapper for 'gst_byte_reader_peek_int8'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_int8

function GstBase.ByteReader.prototype.peek_int8(): {
    // javascript wrapper for 'gst_byte_reader_peek_int8'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

true if successful, 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 ( [out] [transfer: none] [array zero-terminated=1] ) –

address of a gchar pointer variable in which to store the result

Returns

TRUE if a string could be skipped, FALSE otherwise.


GstBase.ByteReader.peek_string_utf8

def GstBase.ByteReader.peek_string_utf8 (self):
    #python wrapper for 'gst_byte_reader_peek_string_utf8'

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if a string could be skipped, False otherwise.

str ( [ str ] ) –

True if a string could be skipped, False otherwise.


GstBase.ByteReader.prototype.peek_string_utf8

function GstBase.ByteReader.prototype.peek_string_utf8(): {
    // javascript wrapper for 'gst_byte_reader_peek_string_utf8'
}

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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if a string could be skipped, false otherwise.

str ( [ String ] ) –

true if a string could be skipped, false otherwise.


gst_byte_reader_peek_sub_reader

gboolean
gst_byte_reader_peek_sub_reader (GstByteReader * reader,
                                 GstByteReader * sub_reader,
                                 guint size)

Initializes a GstByteReader sub-reader instance to contain size bytes of data from the current position of reader. This is useful to read chunked formats and make sure that one doesn't read beyond the size of the sub-chunk.

Unlike gst_byte_reader_get_sub_reader, this function does not modify the current position of reader.

Parameters:

reader

an existing and initialized GstByteReader instance

sub_reader

a GstByteReader instance to initialize as sub-reader

size

size of sub_reader in bytes

Returns

FALSE on error or if reader does not contain size more bytes from the current position, and otherwise TRUE

Since : 1.6


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 ( [out] ) –

Pointer to a guint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint16_be

def GstBase.ByteReader.peek_uint16_be (self):
    #python wrapper for 'gst_byte_reader_peek_uint16_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint16_be

function GstBase.ByteReader.prototype.peek_uint16_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint16_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint16 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint16_le

def GstBase.ByteReader.peek_uint16_le (self):
    #python wrapper for 'gst_byte_reader_peek_uint16_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint16_le

function GstBase.ByteReader.prototype.peek_uint16_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint16_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint24_be

def GstBase.ByteReader.peek_uint24_be (self):
    #python wrapper for 'gst_byte_reader_peek_uint24_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint24_be

function GstBase.ByteReader.prototype.peek_uint24_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint24_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint24_le

def GstBase.ByteReader.peek_uint24_le (self):
    #python wrapper for 'gst_byte_reader_peek_uint24_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint24_le

function GstBase.ByteReader.prototype.peek_uint24_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint24_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint32_be

def GstBase.ByteReader.peek_uint32_be (self):
    #python wrapper for 'gst_byte_reader_peek_uint32_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint32_be

function GstBase.ByteReader.prototype.peek_uint32_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint32_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint32 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint32_le

def GstBase.ByteReader.peek_uint32_le (self):
    #python wrapper for 'gst_byte_reader_peek_uint32_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint32_le

function GstBase.ByteReader.prototype.peek_uint32_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint32_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint64_be

def GstBase.ByteReader.peek_uint64_be (self):
    #python wrapper for 'gst_byte_reader_peek_uint64_be'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint64_be

function GstBase.ByteReader.prototype.peek_uint64_be(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint64_be'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint64 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint64_le

def GstBase.ByteReader.peek_uint64_le (self):
    #python wrapper for 'gst_byte_reader_peek_uint64_le'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint64_le

function GstBase.ByteReader.prototype.peek_uint64_le(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint64_le'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

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 ( [out] ) –

Pointer to a guint8 to store the result

Returns

TRUE if successful, FALSE otherwise.


GstBase.ByteReader.peek_uint8

def GstBase.ByteReader.peek_uint8 (self):
    #python wrapper for 'gst_byte_reader_peek_uint8'

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( bool ) –

True if successful, False otherwise.

val ( int ) –

True if successful, False otherwise.


GstBase.ByteReader.prototype.peek_uint8

function GstBase.ByteReader.prototype.peek_uint8(): {
    // javascript wrapper for 'gst_byte_reader_peek_uint8'
}

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

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns a tuple made of:

( Number ) –

true if successful, false otherwise.

val ( Number ) –

true if successful, false otherwise.


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.


GstBase.ByteReader.set_pos

def GstBase.ByteReader.set_pos (self, pos):
    #python wrapper for 'gst_byte_reader_set_pos'

Sets the new position of a GstBase.ByteReader instance to pos in bytes.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

pos ( int ) –

The new position in bytes

Returns ( bool ) –

True if the position could be set successfully, False otherwise.


GstBase.ByteReader.prototype.set_pos

function GstBase.ByteReader.prototype.set_pos(pos: Number): {
    // javascript wrapper for 'gst_byte_reader_set_pos'
}

Sets the new position of a GstBase.ByteReader instance to pos in bytes.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

pos ( Number ) –

The new position in bytes

Returns ( Number ) –

true if the position could be set successfully, false otherwise.


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.


GstBase.ByteReader.skip

def GstBase.ByteReader.skip (self, nbytes):
    #python wrapper for 'gst_byte_reader_skip'

Skips nbytes bytes of the GstBase.ByteReader instance.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

nbytes ( int ) –

the number of bytes to skip

Returns ( bool ) –

True if nbytes bytes could be skipped, False otherwise.


GstBase.ByteReader.prototype.skip

function GstBase.ByteReader.prototype.skip(nbytes: Number): {
    // javascript wrapper for 'gst_byte_reader_skip'
}

Skips nbytes bytes of the GstBase.ByteReader instance.

Parameters:

reader ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

nbytes ( Number ) –

the number of bytes to skip

Returns ( Number ) –

true if nbytes bytes 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.


GstBase.ByteReader.skip_string_utf16

def GstBase.ByteReader.skip_string_utf16 (self):
    #python wrapper for 'gst_byte_reader_skip_string_utf16'

Skips a NUL-terminated UTF-16 string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( bool ) –

True if a string could be skipped, False otherwise.


GstBase.ByteReader.prototype.skip_string_utf16

function GstBase.ByteReader.prototype.skip_string_utf16(): {
    // javascript wrapper for 'gst_byte_reader_skip_string_utf16'
}

Skips a NUL-terminated UTF-16 string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( Number ) –

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.


GstBase.ByteReader.skip_string_utf32

def GstBase.ByteReader.skip_string_utf32 (self):
    #python wrapper for 'gst_byte_reader_skip_string_utf32'

Skips a NUL-terminated UTF-32 string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( bool ) –

True if a string could be skipped, False otherwise.


GstBase.ByteReader.prototype.skip_string_utf32

function GstBase.ByteReader.prototype.skip_string_utf32(): {
    // javascript wrapper for 'gst_byte_reader_skip_string_utf32'
}

Skips a NUL-terminated UTF-32 string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( Number ) –

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.


GstBase.ByteReader.skip_string_utf8

def GstBase.ByteReader.skip_string_utf8 (self):
    #python wrapper for 'gst_byte_reader_skip_string_utf8'

Skips a NUL-terminated string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( bool ) –

True if a string could be skipped, False otherwise.


GstBase.ByteReader.prototype.skip_string_utf8

function GstBase.ByteReader.prototype.skip_string_utf8(): {
    // javascript wrapper for 'gst_byte_reader_skip_string_utf8'
}

Skips a NUL-terminated string in the GstBase.ByteReader 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 ( GstBase.ByteReader ) –

a GstBase.ByteReader instance

Returns ( Number ) –

true if a string could be skipped, false otherwise.


Functions

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 ( [in] [transfer: none] [array length=size] ) –

data from which the GstByteReader should read

size

Size of data in bytes

Returns ( [transfer: full] ) –

a new GstByteReader instance


Function Macros

GST_BYTE_READER

#define GST_BYTE_READER(reader) ((GstByteReader *) (reader))

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_GET_PEEK_BITS_INLINE

#define __GST_BYTE_READER_GET_PEEK_BITS_INLINE(bits,type,name) \
\
static inline gboolean \
_gst_byte_reader_peek_##name##_inline (const GstByteReader * reader, type * val) \
{ \
  g_return_val_if_fail (reader != NULL, FALSE); \
  g_return_val_if_fail (val != NULL, FALSE); \
  \
  if (_gst_byte_reader_get_remaining_unchecked (reader) < (bits / 8)) \
    return FALSE; \
\
  *val = gst_byte_reader_peek_##name##_unchecked (reader); \
  return TRUE; \
} \
\
static inline gboolean \
_gst_byte_reader_get_##name##_inline (GstByteReader * reader, type * val) \
{ \
  g_return_val_if_fail (reader != NULL, FALSE); \
  g_return_val_if_fail (val != NULL, FALSE); \
  \
  if (_gst_byte_reader_get_remaining_unchecked (reader) < (bits / 8)) \
    return FALSE; \
\
  *val = gst_byte_reader_get_##name##_unchecked (reader); \
  return TRUE; \
}

__GST_BYTE_READER_GET_PEEK_BITS_UNCHECKED

#define __GST_BYTE_READER_GET_PEEK_BITS_UNCHECKED(bits,type,lower,upper,adj) \
\
static inline type \
gst_byte_reader_peek_##lower##_unchecked (const GstByteReader * reader) \
{ \
  type val = (type) GST_READ_##upper (reader->data + reader->byte); \
  adj \
  return val; \
} \
\
static inline type \
gst_byte_reader_get_##lower##_unchecked (GstByteReader * reader) \
{ \
  type val = gst_byte_reader_peek_##lower##_unchecked (reader); \
  reader->byte += bits / 8; \
  return val; \
}

gst_byte_reader_dup_string

#define gst_byte_reader_dup_string(reader,str) \
    gst_byte_reader_dup_string_utf8(reader,str)

gst_byte_reader_get_string

#define gst_byte_reader_get_string(reader,str) \
    gst_byte_reader_get_string_utf8(reader,str)

gst_byte_reader_peek_string

#define gst_byte_reader_peek_string(reader,str) \
    gst_byte_reader_peek_string_utf8(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 ( [out] [transfer: none] [array zero-terminated=1] ) –

address of a gchar pointer variable in which to store the result

Returns

TRUE if a string could be skipped, FALSE otherwise.


gst_byte_reader_skip_string

#define gst_byte_reader_skip_string(reader) \
    gst_byte_reader_skip_string_utf8(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.


The results of the search are