BitReader

gst.BitReader.BitReader 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 gst.BitReader.BitReader instance, which will read from data.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

free
void free()

Frees a gst.BitReader.BitReader instance, which was previously allocated by BitReader.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 gst.BitReader.BitReader instance in bits.

getRemaining
uint getRemaining()

Returns the remaining number of bits of a gst.BitReader.BitReader instance.

getSize
uint getSize()

Returns the total number of bits of a gst.BitReader.BitReader instance.

getStruct
void* getStruct()

the main Gtk struct as a void*

init
void init(ubyte[] data)

Initializes a gst.BitReader.BitReader 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 gst.BitReader.BitReader instance to pos in bits.

skip
bool skip(uint nbits)

Skips nbits bits of the gst.BitReader.BitReader instance.

skipToByte
bool skipToByte()

Skips until the next byte.

Variables

gstBitReader
GstBitReader* gstBitReader;

the main Gtk struct