BitReader

#GstBitReader provides a bit reader that can read any number of bits from a memory buffer. It provides functions for reading any number of bits into 8, 16, 32 and 64 bit variables.

Constructors

this
this(GstBitReader* gstBitReader, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(ubyte[] data)

Create a new #GstBitReader instance, which will read from @data.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

free
void free()

Frees a #GstBitReader instance, which was previously allocated by gst_bit_reader_new().

getBitReaderStruct
GstBitReader* getBitReaderStruct(bool transferOwnership)

Get the main Gtk struct

getBitsUint16
bool getBitsUint16(ushort val, uint nbits)

Read @nbits bits into @val and update the current position.

getBitsUint32
bool getBitsUint32(uint val, uint nbits)

Read @nbits bits into @val and update the current position.

getBitsUint64
bool getBitsUint64(ulong val, uint nbits)

Read @nbits bits into @val and update the current position.

getBitsUint8
bool getBitsUint8(ubyte val, uint nbits)

Read @nbits bits into @val and update the current position.

getPos
uint getPos()

Returns the current position of a #GstBitReader instance in bits.

getRemaining
uint getRemaining()

Returns the remaining number of bits of a #GstBitReader instance.

getSize
uint getSize()

Returns the total number of bits of a #GstBitReader instance.

getStruct
void* getStruct()

the main Gtk struct as a void*

init
void init(ubyte[] data)

Initializes a #GstBitReader instance to read from @data. This function can be called on already initialized instances.

peekBitsUint16
bool peekBitsUint16(ushort val, uint nbits)

Read @nbits bits into @val but keep the current position.

peekBitsUint32
bool peekBitsUint32(uint val, uint nbits)

Read @nbits bits into @val but keep the current position.

peekBitsUint64
bool peekBitsUint64(ulong val, uint nbits)

Read @nbits bits into @val but keep the current position.

peekBitsUint8
bool peekBitsUint8(ubyte val, uint nbits)

Read @nbits bits into @val but keep the current position.

setPos
bool setPos(uint pos)

Sets the new position of a #GstBitReader instance to @pos in bits.

skip
bool skip(uint nbits)

Skips @nbits bits of the #GstBitReader instance.

skipToByte
bool skipToByte()

Skips until the next byte.

Variables

gstBitReader
GstBitReader* gstBitReader;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta