UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
vdecmpeg4::M4Bitstream Class Reference

#include <M4Bitstream.h>

Public Member Functions

 M4Bitstream ()
 Construction of bitstream object.
 
 ~M4Bitstream ()
 Destructor.
 
void setMemoryHook (M4MemHandler &memSys)
 Set memory allocator.
 
void init (const uint8 *bitstream, uint32 length)
 Link bitstream to provided byte sequence.
 
void init (VIDStreamIO *pStream, uint32 streamBufferBytes)
 Link bitstream to stream interface.
 
uint32 show (const uint32 bits)
 Show indicated bit from stream without moving file position.
 
void skip (const uint32 bits)
 Skip indicated bits in stream.
 
void align ()
 Align bitstream to next byte boundary.
 
void nextStartCode ()
 implements next_start_code()
 
void nextResyncMarker ()
 
void skipResyncMarker ()
 
uint32 showBitsByteAligned (const uint32 bits)
 implements nextbits_bytealigned()
 
bool validStuffingBits ()
 
uint32 getBits (const uint32 bits)
 Return indicated # of bits from stream.
 
uint32 getBit ()
 Return 1 bit from stream.
 
bool isEof ()
 Check eof.
 
void totalBitsClear ()
 Clear the byte counter.
 
uint32 totalBitsGet () const
 Read the byte counter.
 
const uint32getBaseAddr () const
 Return memory base addres of stream.
 

Constructor & Destructor Documentation

◆ M4Bitstream()

vdecmpeg4::M4Bitstream::M4Bitstream ( )
inline

Construction of bitstream object.

Ctor

◆ ~M4Bitstream()

vdecmpeg4::M4Bitstream::~M4Bitstream ( )
inline

Destructor.

Destructor

Member Function Documentation

◆ align()

void vdecmpeg4::M4Bitstream::align ( )
inline

Align bitstream to next byte boundary.

Align bitstream pointer to next byte in stream

◆ getBaseAddr()

const uint32 * vdecmpeg4::M4Bitstream::getBaseAddr ( ) const
inline

Return memory base addres of stream.

Return pointer to stream data in memory

◆ getBit()

uint32 vdecmpeg4::M4Bitstream::getBit ( )
inline

Return 1 bit from stream.

Return NEXT bit from stream

◆ getBits()

uint32 vdecmpeg4::M4Bitstream::getBits ( const uint32  bits)
inline

Return indicated # of bits from stream.

Return indicated # of bits from stream and move foreward in stream

Parameters
bitsNumber of bits to get
Returns
requested 'bitword'

◆ init() [1/2]

void vdecmpeg4::M4Bitstream::init ( const uint8 bitstream,
uint32  length 
)
inline

Link bitstream to provided byte sequence.

Link bitstream to indicated byte sequence

Parameters
bitstreamptr to input bytes
lengthnumber of bytes in input stream

◆ init() [2/2]

void vdecmpeg4::M4Bitstream::init ( VIDStreamIO pStreamIO,
uint32  streamBufferBytes 
)
inline

Link bitstream to stream interface.

Handle stream via stream iterator

Parameters
pStreamstream to use
streamBufferBytessize of intermediate buffer

◆ isEof()

bool vdecmpeg4::M4Bitstream::isEof ( )
inline

Check eof.

Check end of file operation

Returns
none

◆ nextResyncMarker()

void vdecmpeg4::M4Bitstream::nextResyncMarker ( )
inline

◆ nextStartCode()

void vdecmpeg4::M4Bitstream::nextStartCode ( )
inline

implements next_start_code()

implements next_start_code()

◆ setMemoryHook()

void vdecmpeg4::M4Bitstream::setMemoryHook ( M4MemHandler memSys)
inline

Set memory allocator.

Set memory hook for bitstream

Parameters
memSys
Returns
none

◆ show()

uint32 vdecmpeg4::M4Bitstream::show ( const uint32  bits)
inline

Show indicated bit from stream without moving file position.

Read # bits from stream, but DON'T move stream pointer

Parameters
bitsnumber of bits to read
Returns
Bits to use 'together'

◆ showBitsByteAligned()

uint32 vdecmpeg4::M4Bitstream::showBitsByteAligned ( const uint32  bits)
inline

implements nextbits_bytealigned()

implements nextbits_bytealigned()

Parameters
bits
Returns

◆ skip()

void vdecmpeg4::M4Bitstream::skip ( const uint32  bits)
inline

Skip indicated bits in stream.

Skip indicated number of bits in stream

Parameters
bitsnumber of bits to skip

◆ skipResyncMarker()

void vdecmpeg4::M4Bitstream::skipResyncMarker ( )
inline

◆ totalBitsClear()

void vdecmpeg4::M4Bitstream::totalBitsClear ( )
inline

Clear the byte counter.

Clear byte counter for statistics

Returns
none

◆ totalBitsGet()

uint32 vdecmpeg4::M4Bitstream::totalBitsGet ( ) const
inline

Read the byte counter.

Return bits read

Returns
bit count since last totalBitsClear

◆ validStuffingBits()

bool vdecmpeg4::M4Bitstream::validStuffingBits ( )
inline

implements valid_stuffing_bits()

Returns

The documentation for this class was generated from the following file: