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(void* ptr, Flag!"Take" take)

Members

Functions

cPtr
void* cPtr()
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.

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.

Properties

bit
uint bit [@property getter]

Get field bit.

bit
uint bit [@property setter]

Set field bit.

byte_
uint byte_ [@property getter]

Get field byte_.

byte_
uint byte_ [@property setter]

Set field byte_.

size
uint size [@property getter]

Get field size.

size
uint size [@property setter]

Set field size.