20 if (p_chunkData !=
NULL && *(
MxU32*) p_chunkData ==
FOURCC(
'M',
'x',
'C',
'h')) {
38 MxU8* chunkData = p_chunkData;
47 p_chunkData +=
sizeof(
m_time);
53 headersize = p_chunkData - chunkData;
63 for (MxDSSubscriberList::iterator it = p_subscriberList.begin(); it != p_subscriberList.end(); it++) {
64 if ((*it)->GetObjectId() ==
m_objectId && (*it)->GetUnknown48() == p_obj24val) {
70 (*it)->AddData(
this, p_append);
89 return (
MxU16*) (p_buffer + 0x08);
95 return (
MxU32*) (p_buffer + 0x0a);
102 return (
MxLong*) (p_buffer + 0x0e);
108 return (
MxU32*) (p_buffer + 0x12);
[AI] Buffer for managing streamed DS (Data Stream) chunks and actions.
void AddRef(MxDSChunk *p_chunk)
[AI] Increment reference count for this buffer (ownership by a chunk).
MxU8 ReleaseRef(MxDSChunk *)
[AI] Decrement the buffer's chunk reference count.
MxLong m_time
[AI] Timestamp (tick/frame) value for the chunk. Used for ordering, sequencing, and synchronization....
MxU32 m_objectId
[AI] Logical id field linking chunk to a resource, action, or entity. [AI]
MxU16 m_flags
[AI] Flag bitfield indicating properties/status of the chunk. See DS_CHUNK_* defines....
MxU32 m_length
[AI] Number of bytes of data in this chunk's payload. [AI]
MxU8 * m_data
[AI] Pointer to chunk's raw data buffer. Ownership is determined by DS_CHUNK_BIT1 flag and usage cont...
[AI] List container for pointers to MxDSSubscriber objects, with utility methods.
MxU32 ReadChunkHeader(MxU8 *p_chunkData)
[AI] Reads this chunk's header fields from the provided chunk data.
static MxU32 * IntoLength(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the data length field pointer, facilitating direct pa...
static MxLong * IntoTime(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the time field pointer, facilitating direct parsing.
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.
static MxU32 * IntoObjectId(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the objectId field pointer, facilitating direct parsi...
MxResult SendChunk(MxDSSubscriberList &p_subscriberList, MxBool p_append, MxS16 p_obj24val)
[AI] Dispatches this stream chunk to a list of subscribers matching certain criteria.
void SetBuffer(MxDSBuffer *p_buffer)
[AI] Sets the buffer reference for this chunk, without incrementing the reference count.
static MxU16 * IntoFlags(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the flags field pointer, facilitating direct parsing.
~MxStreamChunk() override
[AI] Cleans up the stream chunk, releasing its associated buffer if any.
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
#define DS_CHUNK_END_OF_STREAM
[AI] Flag bit indicating this chunk is the last in its stream.
#define FOURCC(a, b, c, d)
[AI] Macro to compose a 32-bit code from four 8-bit characters (e.g., for resource and chunk IDs).