41 while (!m_controllers.empty()) {
47 assert(controller->
IsStoped(&action));
53 m_controllers.pop_front();
64 MxTrace(
"Open %s as %s controller\n", p_name, !p_lookupType ?
"disk" :
"RAM");
65 MxTrace(
"Heap before: %d\n", DebugHeapState());
73 switch (p_lookupType) {
92 MxTrace(
"Heap after: %d\n", DebugHeapState());
103 for (list<MxStreamController*>::iterator it = m_controllers.begin(); it != m_controllers.end(); it++) {
106 if (!p_name || c->
GetAtom() == p_name) {
107 m_controllers.erase(it);
134 for (list<MxStreamController*>::iterator it = m_controllers.begin(); it != m_controllers.end(); it++) {
135 if ((*it)->GetAtom() == p_name) {
147 if (controller && controller->
IsA(
"MxDiskStreamController")) {
156 list<MxStreamController*>::iterator i = find(m_controllers.begin(), m_controllers.end(), p_stream);
158 assert(i == m_controllers.end());
161 if (i == m_controllers.end()) {
162 m_controllers.push_back(p_stream);
179 if (controller ==
NULL) {
202 for (list<MxStreamController*>::iterator it = m_controllers.begin(); it != m_controllers.end(); it++) {
206 result = (*it)->VTable0x24(&tempAction);
219 return controller->
IsStoped(&p_dsObject);
const char * GetInternal() const
[AI] Returns a pointer to the internal string, or nullptr if not set.
Templated fixed-size bitset for bit manipulation.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
[AI] Base class for any object deserialized from an SI (script/data) file in the LEGO Island engine.
const MxAtomId & GetAtomId()
[AI] Returns a const-reference to the object's atom identifier.
virtual void SetAtomId(MxAtomId p_atomId)
[AI] Sets the atom id for this object instance, used for indexing or lookup.
void SetUnknown24(MxS16 p_unk0x24)
[AI] Sets the unknown field at 0x24 (possibly version/state).
MxS16 GetUnknown24()
[AI] Returns the unknown 0x24 value (may be data version or usage state). [AI]
void SetObjectId(MxU32 p_objectId)
[AI] Sets the object id (for serialization or lookup).
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
[AI] Controller for streaming from disk-based SI resources, manages buffers and streaming actions.
MxResult Allocate()
[AI] Allocates the memory pool according to template parameters.
void Unregister(MxCore *p_listener)
[AI] Removes a previously registered listener and flushes any pending notifications for it.
void Register(MxCore *p_listener)
[AI] Registers a listener object to receive notifications.
MxResult Send(MxCore *p_listener, const MxNotificationParam &p_param)
[AI] Queues a notification to be sent to a specific registered listener.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
NotificationId GetNotification() const
[AI] Retrieves the current notification type of this parameter.
MxCore * m_sender
[AI] Pointer to the MxCore instance that sent or originated this notification.
NotificationId m_type
[AI] Type of notification/event carried by this object (see NotificationId).
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Derived stream controller that manages media streaming from memory buffers as opposed to disk.
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
virtual MxResult VTable0x20(MxDSAction *p_action)
[AI] Streams data for the provided action by determining data offset and reading required chunk.
MxBool IsStoped(MxDSObject *p_obj)
[AI] Checks if the streaming operation for a given object/action has fully stopped and no longer has ...
virtual MxResult Open(const char *p_filename)
[AI] Opens a data stream with the specified resource filename.
MxBool IsA(const char *p_name) const override
[AI] Performs runtime type checking, matching the given name with this or any parent class.
MxAtomId & GetAtom()
[AI] Retrieves the atom ID (unique logical identifier) for this stream controller.
Streamer notification param for streaming events in MxStreamer [AI].
MxStreamController * GetController()
[AI] Retrieve the stream controller associated with this notification.
MxNotificationParam * Clone() const override
[AI] Clone this notification param.
Streams and manages media data, handles memory pools for RAM/disk streaming [AI].
MxStreamController * Open(const char *p_name, MxU16 p_openMode)
Open a stream, returning a controller for further access [AI].
MxResult DeleteObject(MxDSAction *p_dsAction)
Ask all controllers to remove a DS Action's object.
MxBool FUN_100b9b30(MxDSObject &p_dsObject)
Check stream state for a dsObject's Atom ID.
MxResult AddStreamControllerToOpenList(MxStreamController *p_stream)
Add a controller to the open list, asserting if already present.
MxStreamController * GetOpenStream(const char *p_name)
Search for and return an open stream controller with a matching name.
~MxStreamer() override
Destructor—Stops all stream controllers and unregisters from notification manager.
MxLong Notify(MxParam &p_param) override
Handle notifications, including deferred controller deletion [AI].
MxLong Close(const char *p_name)
Close a named stream and remove its controller from the open list [AI].
MxResult FUN_100b99b0(MxDSAction *p_action)
Internal: Calls stream controller's specific command for action execution.
MxStreamer()
Construct a streamer and register it for notifications.
@ e_diskStream
Load streaming resource from disk [AI].
@ e_RAMStream
Load streaming resource fully to RAM [AI].
virtual MxResult Create()
Allocate memory pools needed for streaming operation.
void FUN_100b98f0(MxDSAction *p_action)
Internal: Delegate stream operation on MxDSAction to a DiskStreamController if present.
#define DECOMP_SIZE_ASSERT(T, S)
#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 MxTrace(args)
[AI] Macro for trace logging (non-variadic version, MSVC compatibility), expands to nothing.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
@ c_notificationStreamer
[AI] Event related to a Streamer [AI]