ByteReader.getSubReader

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.

class ByteReader
bool
getSubReader

Parameters

subReader ByteReader

a #GstByteReader instance to initialize as sub-reader

size uint

size of @sub_reader in bytes

Return Value

Type: bool

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

Meta