gstbase.bit_reader

Module for [BitReader] class

class BitReader

Types 1

#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.

Fields
GstBitReader _cInstance
Methods
void * _cPtr()
uint size() @propertyGet `size` field. Returns: Size of @data in bytes
void size(uint propval) @propertySet `size` field. Params: propval = Size of @data in bytes
uint byte_() @propertyGet `byte_` field. Returns: Current byte position
void byte_(uint propval) @propertySet `byte_` field. Params: propval = Current byte position
uint bit() @propertyGet `bit` field. Returns: Bit position in the current byte
void bit(uint propval) @propertySet `bit` field. Params: propval = Bit position in the current byte
bool getBitsUint16(out ushort val, uint nbits)Read nbits bits into val and update the current position.
bool getBitsUint32(out uint val, uint nbits)Read nbits bits into val and update the current position.
bool getBitsUint64(out ulong val, uint nbits)Read nbits bits into val and update the current position.
bool getBitsUint8(out ubyte val, uint nbits)Read nbits bits into val and update the current position.
uint getPos()Returns the current position of a #GstBitReader instance in bits. Returns: The current position of reader in bits.
uint getRemaining()Returns the remaining number of bits of a #GstBitReader instance. Returns: The remaining number of bits of reader instance.
uint getSize()Returns the total number of bits of a #GstBitReader instance. Returns: The total number of bits of reader instance.
void init_(ubyte[] data)Initializes a #GstBitReader instance to read from data. This function can be called on already initialized instances.
bool peekBitsUint16(out ushort val, uint nbits)Read nbits bits into val but keep the current position.
bool peekBitsUint32(out uint val, uint nbits)Read nbits bits into val but keep the current position.
bool peekBitsUint64(out ulong val, uint nbits)Read nbits bits into val but keep the current position.
bool peekBitsUint8(out ubyte val, uint nbits)Read nbits bits into val but keep the current position.
bool setPos(uint pos)Sets the new position of a #GstBitReader instance to pos in bits.
bool skip(uint nbits)Skips nbits bits of the #GstBitReader instance.
bool skipToByte()Skips until the next byte. Returns: true if successful, false otherwise.
Constructors
this(void * ptr, Flag!"Take" take)