Isle
|
[AI] Abstract base class representing a source of streamable data, providing an interface for reading, seeking, and buffer management used for audio/video/other resource streaming in the LEGO Island engine. More...
#include <mxdssource.h>
Public Member Functions | |
MxDSSource () | |
[AI] Constructor, initializes buffer pointer to NULL, position to -1 and lengthInDWords to 0. More... | |
~MxDSSource () override | |
[AI] Virtual destructor, frees internal buffer if allocated. More... | |
const char * | ClassName () const override |
[AI] Returns the class name string ("MxDSSource"). More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Runtime type information check. More... | |
virtual MxLong | Open (MxULong p_param)=0 |
[AI] Opens the source (e.g., a file, memory buffer, etc). More... | |
virtual MxLong | Close ()=0 |
[AI] Closes the source and releases any resources held. More... | |
virtual MxResult | ReadToBuffer (MxDSBuffer *p_buffer) |
[AI] Reads from this source into a provided MxDSBuffer up to the buffer's current write offset. More... | |
virtual MxResult | Read (unsigned char *p_dest, MxULong p_count)=0 |
[AI] Read a specified number of bytes into user-supplied buffer, starting at the current position. More... | |
virtual MxLong | Seek (MxLong p_offset, MxS32 p_origin)=0 |
[AI] Seek to a specific position in the source, relative to the start, current, or end. More... | |
virtual MxULong | GetBufferSize ()=0 |
[AI] Returns the total buffer size in bytes (implementation-dependent). More... | |
virtual MxULong | GetStreamBuffersNum ()=0 |
[AI] Returns the number of buffers the stream is internally segmented into (for multi-buffered streaming). More... | |
virtual MxLong | GetLengthInDWords () |
[AI] Gets the length of the data in DWORDs (32-bit units). More... | |
virtual MxU32 * | GetBuffer () |
[AI] Returns a pointer to the internal buffer as a DWORD (32-bit) pointer. More... | |
MxLong | GetPosition () const |
[AI] Returns the current per-source seek/read/write position. 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... | |
Protected Attributes | |
MxULong | m_lengthInDWords |
[AI] Length of valid data in the stream, in DWORDs (32-bit units). Used for sizing and range checking. More... | |
MxU32 * | m_pBuffer |
[AI] Pointer to allocated buffer, or NULL if uninitialized. Contains the raw read/streamed data. More... | |
MxLong | m_position |
[AI] Current seek/read/write position in the source. -1 if uninitialized, otherwise logical/physical offset. More... | |
[AI] Abstract base class representing a source of streamable data, providing an interface for reading, seeking, and buffer management used for audio/video/other resource streaming in the LEGO Island engine.
Handles internal buffer memory, length in double words (DWORDs), and position management. Derived classes implement low-level IO such as file- or memory-backed streams.
[AI] Used as a parent for data sources (such as SI files, memory buffers, etc.) that can be consumed by higher-level deserialization or playback mechanisms (e.g., MxDSFile, MxDSMPEG, etc.). Not intended for external use directly; to be subclassed for data-specific sources. Manages a buffer (allocated as an array of MxU32) and an internal length for data integrity and direct access.
Definition at line 20 of file mxdssource.h.
|
inline |
[AI] Constructor, initializes buffer pointer to NULL, position to -1 and lengthInDWords to 0.
Definition at line 25 of file mxdssource.h.
|
inlineoverride |
[AI] Virtual destructor, frees internal buffer if allocated.
Definition at line 30 of file mxdssource.h.
|
inlineoverridevirtual |
[AI] Returns the class name string ("MxDSSource").
Used for runtime type checks.
Reimplemented from MxCore.
Definition at line 36 of file mxdssource.h.
|
pure virtual |
[AI] Closes the source and releases any resources held.
Implemented in MxDSFile.
|
inlinevirtual |
[AI] Returns a pointer to the internal buffer as a DWORD (32-bit) pointer.
Useful for direct access to loaded or mapped data.
Definition at line 116 of file mxdssource.h.
|
pure virtual |
[AI] Returns the total buffer size in bytes (implementation-dependent).
Implemented in MxDSFile.
|
inlinevirtual |
[AI] Gets the length of the data in DWORDs (32-bit units).
This is often used to determine streamable length.
Definition at line 109 of file mxdssource.h.
|
inline |
[AI] Returns the current per-source seek/read/write position.
Definition at line 122 of file mxdssource.h.
|
pure virtual |
[AI] Returns the number of buffers the stream is internally segmented into (for multi-buffered streaming).
Implemented in MxDSFile.
|
inlineoverridevirtual |
[AI] Runtime type information check.
Returns true if the object's class name matches p_name or matches a parent class. Used for type-safe downcasting.
p_name | Name of the type to check. |
Reimplemented from MxCore.
Definition at line 49 of file mxdssource.h.
[AI] Opens the source (e.g., a file, memory buffer, etc).
The meaning of the parameter depends on the implementation.
p_param | [AI] Implementation-specific parameter (may be a filename handle, a memory buffer, etc). |
Implemented in MxDSFile.
[AI] Read a specified number of bytes into user-supplied buffer, starting at the current position.
Implemented by each derived class.
p_dest | [AI] Destination buffer. |
p_count | [AI] Number of bytes to read. |
Implemented in MxDSFile.
|
inlinevirtual |
[AI] Reads from this source into a provided MxDSBuffer up to the buffer's current write offset.
p_buffer | [AI] Target buffer to read data into. |
Definition at line 73 of file mxdssource.h.
[AI] Seek to a specific position in the source, relative to the start, current, or end.
p_offset | [AI] Seek offset. |
p_origin | [AI] Reference position (SEEK_SET , SEEK_CUR , or SEEK_END ). |
Implemented in MxDSFile.
|
protected |
[AI] Length of valid data in the stream, in DWORDs (32-bit units). Used for sizing and range checking.
Definition at line 125 of file mxdssource.h.
|
protected |
[AI] Pointer to allocated buffer, or NULL if uninitialized. Contains the raw read/streamed data.
Definition at line 126 of file mxdssource.h.
|
protected |
[AI] Current seek/read/write position in the source. -1 if uninitialized, otherwise logical/physical offset.
Definition at line 127 of file mxdssource.h.