Isle
|
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for notification and streaming within Lego Island's resource system. More...
#include <mxstreamchunk.h>
Public Member Functions | |
MxStreamChunk () | |
[AI] Constructs a new MxStreamChunk with a null buffer pointer. More... | |
~MxStreamChunk () override | |
[AI] Cleans up the stream chunk, releasing its associated buffer if any. More... | |
const char * | ClassName () const override |
[AI] Returns the class name identifier for runtime type checking and reflection. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Performs runtime type checking against this or parent class names. More... | |
MxDSBuffer * | GetBuffer () |
[AI] Retrieves the buffer associated with this chunk. More... | |
MxResult | ReadChunk (MxDSBuffer *p_buffer, MxU8 *p_chunkData) |
[AI] Reads the chunk's header and initializes from a chunk data buffer of a streamed data segment. More... | |
MxU32 | ReadChunkHeader (MxU8 *p_chunkData) |
[AI] Reads this chunk's header fields from the provided chunk data. More... | |
MxResult | SendChunk (MxDSSubscriberList &p_subscriberList, MxBool p_append, MxS16 p_obj24val) |
[AI] Dispatches this stream chunk to a list of subscribers matching certain criteria. More... | |
void | SetBuffer (MxDSBuffer *p_buffer) |
[AI] Sets the buffer reference for this chunk, without incrementing the reference count. More... | |
![]() | |
MxDSChunk () | |
[AI] Constructs a new, empty chunk. All members initialized to safe defaults. [AI] More... | |
~MxDSChunk () override | |
[AI] Virtual destructor. Cleans up any owned chunk data if flagged by DS_CHUNK_BIT1. [AI] More... | |
const char * | ClassName () const override |
[AI] Returns the class name ("MxDSChunk") for runtime type identification. [AI] More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Checks if this object or any parent class matches the provided class name string. More... | |
void | SetChunkFlags (MxU16 p_flags) |
[AI] Sets all chunk header flag bits. More... | |
void | SetObjectId (undefined4 p_objectid) |
[AI] Sets the object id for this chunk (links chunk data to logical entity, resource, or action). More... | |
void | SetTime (MxLong p_time) |
[AI] Sets the time (timestamp/tick/frame) associated with this chunk. More... | |
void | SetLength (MxU32 p_length) |
[AI] Sets the payload data length for this chunk. More... | |
void | SetData (MxU8 *p_data) |
[AI] Sets the pointer to the raw payload data (may or may not be owned by chunk object). More... | |
MxU16 | GetChunkFlags () |
[AI] Returns the chunk's flag bitfield. [AI] More... | |
undefined4 | GetObjectId () |
[AI] Returns the object id of this chunk. [AI] More... | |
MxLong | GetTime () |
[AI] Returns the time (timestamp or tick) associated with this chunk. [AI] More... | |
MxU32 | GetLength () |
[AI] Returns the length in bytes of the data payload. [AI] More... | |
MxU8 * | GetData () |
[AI] Returns a pointer to the start of the data payload. [AI] More... | |
void | Release () |
[AI] Releases (deletes) data payload if present, regardless of flags; call to explicitly free memory and avoid leaks, especially when chunk objects are reused. [AI] More... | |
![]() | |
MxCore () | |
[AI] Constructs a new MxCore object and assigns it a unique id. More... | |
virtual | ~MxCore () |
[AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More... | |
virtual MxLong | Notify (MxParam &p_param) |
[AI] Virtual callback notification mechanism. More... | |
virtual MxResult | Tickle () |
[AI] Called by tickle managers to allow the object to update itself. More... | |
virtual const char * | ClassName () const |
[AI] Returns the runtime class name of this object. More... | |
virtual MxBool | IsA (const char *p_name) const |
[AI] Checks whether this object's class type or parents match the given name. More... | |
MxU32 | GetId () |
[AI] Gets the unique (per-process) id assigned to this object instance. More... | |
Static Public Member Functions | |
static MxU16 * | IntoFlags (MxU8 *p_buffer) |
[AI] Utility to cast a chunk header buffer into the flags field pointer, facilitating direct parsing. More... | |
static MxU32 * | IntoObjectId (MxU8 *p_buffer) |
[AI] Utility to cast a chunk header buffer into the objectId field pointer, facilitating direct parsing. More... | |
static MxLong * | IntoTime (MxU8 *p_buffer) |
[AI] Utility to cast a chunk header buffer into the time field pointer, facilitating direct parsing. More... | |
static MxU32 * | IntoLength (MxU8 *p_buffer) |
[AI] Utility to cast a chunk header buffer into the data length field pointer, facilitating direct parsing. More... | |
![]() | |
static MxU32 | GetHeaderSize () |
[AI] Returns the fixed size of the chunk header, typically used for parsing binary streams. More... | |
static MxU32 | Size (MxU8 *p_buffer) |
[AI] Returns the total size (header + data) of a chunk from a raw buffer pointer. More... | |
static MxU8 * | End (MxU8 *p_buffer) |
[AI] Returns a pointer to the end of this chunk for sequential iteration through a chunked buffer. More... | |
Additional Inherited Members | |
![]() | |
MxU16 | m_flags |
[AI] Flag bitfield indicating properties/status of the chunk. See DS_CHUNK_* defines. [AI] More... | |
MxU32 | m_objectId |
[AI] Logical id field linking chunk to a resource, action, or entity. [AI] More... | |
MxLong | m_time |
[AI] Timestamp (tick/frame) value for the chunk. Used for ordering, sequencing, and synchronization. [AI] More... | |
MxU32 | m_length |
[AI] Number of bytes of data in this chunk's payload. [AI] More... | |
MxU8 * | m_data |
[AI] Pointer to chunk's raw data buffer. Ownership is determined by DS_CHUNK_BIT1 flag and usage context. [AI] More... | |
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for notification and streaming within Lego Island's resource system.
Derived from MxDSChunk, it is used to facilitate chunk-based streaming, particularly in video and audio playback pipelines.
[AI] Holds meta-data and a reference to an MxDSBuffer containing the raw data, and can parse and propagate its chunk to a list of stream subscribers.
Definition at line 19 of file mxstreamchunk.h.
|
inline |
[AI] Constructs a new MxStreamChunk with a null buffer pointer.
Definition at line 24 of file mxstreamchunk.h.
|
override |
[AI] Cleans up the stream chunk, releasing its associated buffer if any.
Definition at line 8 of file mxstreamchunk.cpp.
|
inlineoverridevirtual |
[AI] Returns the class name identifier for runtime type checking and reflection.
Reimplemented from MxDSChunk.
Definition at line 35 of file mxstreamchunk.h.
|
inline |
[AI] Retrieves the buffer associated with this chunk.
Definition at line 55 of file mxstreamchunk.h.
[AI] Utility to cast a chunk header buffer into the flags field pointer, facilitating direct parsing.
p_buffer | Pointer to start of a chunk header. [AI] |
Definition at line 87 of file mxstreamchunk.cpp.
[AI] Utility to cast a chunk header buffer into the data length field pointer, facilitating direct parsing.
p_buffer | Pointer to start of a chunk header. [AI] |
Definition at line 106 of file mxstreamchunk.cpp.
[AI] Utility to cast a chunk header buffer into the objectId field pointer, facilitating direct parsing.
p_buffer | Pointer to start of a chunk header. [AI] |
Definition at line 93 of file mxstreamchunk.cpp.
[AI] Utility to cast a chunk header buffer into the time field pointer, facilitating direct parsing.
p_buffer | Pointer to start of a chunk header. [AI] |
Definition at line 100 of file mxstreamchunk.cpp.
|
inlineoverridevirtual |
[AI] Performs runtime type checking against this or parent class names.
p_name | The class name string to compare against. [AI] |
Reimplemented from MxDSChunk.
Definition at line 46 of file mxstreamchunk.h.
MxResult MxStreamChunk::ReadChunk | ( | MxDSBuffer * | p_buffer, |
MxU8 * | p_chunkData | ||
) |
[AI] Reads the chunk's header and initializes from a chunk data buffer of a streamed data segment.
p_buffer | The buffer to associate with this stream chunk. [AI] |
p_chunkData | Pointer to raw chunk data; expects the "MxCh" identifier in the first 4 bytes. [AI] |
Definition at line 16 of file mxstreamchunk.cpp.
[AI] Reads this chunk's header fields from the provided chunk data.
p_chunkData | Pointer to the start of header bytes within a chunk. [AI] |
Definition at line 34 of file mxstreamchunk.cpp.
MxResult MxStreamChunk::SendChunk | ( | MxDSSubscriberList & | p_subscriberList, |
MxBool | p_append, | ||
MxS16 | p_obj24val | ||
) |
[AI] Dispatches this stream chunk to a list of subscribers matching certain criteria.
p_subscriberList | The list of subscribers eligible to receive this chunk. [AI] |
p_append | Whether the chunk data should be appended to existing data. [AI] |
p_obj24val | Additional identity or filtering parameter (typically corresponds to object state/ID). [AI] |
Definition at line 61 of file mxstreamchunk.cpp.
void MxStreamChunk::SetBuffer | ( | MxDSBuffer * | p_buffer | ) |
[AI] Sets the buffer reference for this chunk, without incrementing the reference count.
p_buffer | The buffer to associate with this chunk. [AI] |
Definition at line 80 of file mxstreamchunk.cpp.