Isle
Loading...
Searching...
No Matches
mxstreamcontroller.h
Go to the documentation of this file.
1#ifndef MXSTREAMCONTROLLER_H
2#define MXSTREAMCONTROLLER_H
3
4#include "decomp.h"
5#include "mxatom.h"
6#include "mxcore.h"
7#include "mxcriticalsection.h"
8#include "mxdsobject.h"
9#include "mxdssubscriber.h"
11#include "mxstl/stlcompat.h"
12
13class MxDSAction;
16
21class MxNextActionDataStartList : public MxUtilityList<MxNextActionDataStart*> {
22public:
29 MxNextActionDataStart* Find(MxU32 p_id, MxS16 p_value);
30
38};
39
47class MxStreamController : public MxCore {
48public:
53
57 ~MxStreamController() override; // vtable+0x00
58
63 const char* ClassName() const override // vtable+0x0c
64 {
65 // STRING: LEGO1 0x10102130
66 return "MxStreamController";
67 }
68
74 MxBool IsA(const char* p_name) const override // vtable+0x10
75 {
76 return !strcmp(p_name, MxStreamController::ClassName()) || MxCore::IsA(p_name);
77 }
78
85 virtual MxResult Open(const char* p_filename); // vtable+0x14
86
93 virtual MxResult VTable0x18(undefined4, undefined4) { return FAILURE; } // vtable+0x18
94
101 virtual MxResult VTable0x1c(undefined4, undefined4) { return FAILURE; } // vtable+0x1c
102
109 virtual MxResult VTable0x20(MxDSAction* p_action); // vtable+0x20
110
117 virtual MxResult VTable0x24(MxDSAction* p_action); // vtable+0x24
118
124 virtual MxDSStreamingAction* VTable0x28() { return NULL; } // vtable+0x28
125
132 virtual MxResult VTable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
133
140 virtual MxResult VTable0x30(MxDSAction* p_action); // vtable+0x30
141
147 void AddSubscriber(MxDSSubscriber* p_subscriber);
148
154 void RemoveSubscriber(MxDSSubscriber* p_subscriber);
155
163 MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
164
172 MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset);
173
181
189
196 MxBool IsStoped(MxDSObject* p_obj);
197
204
211
217 MxAtomId& GetAtom() { return m_atom; }
218
225
231
237
243
244protected:
254};
255
256#endif // MXSTREAMCONTROLLER_H
[AI] Atomized (unique) string identifier, managed by reference counting.
Definition: mxatom.h:124
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
virtual MxBool IsA(const char *p_name) const
[AI] Checks whether this object's class type or parents match the given name.
Definition: mxcore.h:46
[AI] Provides a critical section object for mutual exclusion with optional use of OS mutex.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] Utility list for managing dynamic sequence (DS) objects, provides search and removal by pointer ...
Definition: mxdsobject.h:18
[AI] Base class for any object deserialized from an SI (script/data) file in the LEGO Island engine.
Definition: mxdsobject.h:44
[AI] Represents an action that streams data from a buffer within a DirectScript (DS) media timeline.
[AI] List container for pointers to MxDSSubscriber objects, with utility methods.
[AI] Handles the receipt, queuing, and batch management of data chunks streamed by a MxStreamControll...
[AI] List class specialized for storing MxNextActionDataStart pointers, managing streaming action sta...
MxNextActionDataStart * FindAndErase(MxU32 p_id, MxS16 p_value)
[AI] Searches for a MxNextActionDataStart with the given properties and erases it from the list if fo...
MxNextActionDataStart * Find(MxU32 p_id, MxS16 p_value)
[AI] Searches for a MxNextActionDataStart element with the given object ID and unknown value.
[AI] Contains data for scheduling the next action in a process, storing an object id,...
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
Definition: mxpresenter.h:20
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
virtual MxResult VTable0x24(MxDSAction *p_action)
[AI] Matches and processes an action in the "unk0x54" (pending) list and triggers sending to subscrib...
virtual MxResult VTable0x1c(undefined4, undefined4)
[AI] Unknown virtual function placeholder.
MxDSSubscriberList m_subscribers
[AI] List of current subscribers (listening entities for streamed data).
undefined4 * m_unk0x2c
[AI] Unknown data, likely used for streaming internals or as a metadata pointer.
~MxStreamController() override
[AI] Destructor.
const char * ClassName() const override
[AI] Returns the class name used for runtime type checks.
MxResult FUN_100c1a00(MxDSAction *p_action, MxU32 p_offset)
[AI] Allocates and inserts a streaming action chunk at a given buffer offset for the supplied action.
void RemoveSubscriber(MxDSSubscriber *p_subscriber)
[AI] Removes a previously registered subscriber from the stream notification list.
MxCriticalSection m_criticalSection
[AI] Protects streaming controller state for thread-safety.
virtual MxResult VTable0x20(MxDSAction *p_action)
[AI] Streams data for the provided action by determining data offset and reading required chunk.
MxStreamController()
[AI] Constructor.
MxAtomId m_atom
[AI] Unique identifier for this stream, derived from source/resource name.
MxBool IsStoped(MxDSObject *p_obj)
[AI] Checks if the streaming operation for a given object/action has fully stopped and no longer has ...
MxResult FUN_100c1f00(MxDSAction *p_action)
[AI] Sends a streaming chunk to all current subscribers for the specified action, handling recursive ...
MxNextActionDataStartList m_nextActionList
[AI] List mapping from streamed object/action to starting offset (used for internal tracking).
MxDSObjectList m_unk0x3c
[AI] List of actions currently being processed/streamed ("in progress" actions).
MxDSAction * m_action0x60
[AI] Current action pointer used during processing, moved from pending to active as actions are proce...
MxDSObjectList & GetUnk0x54()
[AI] Returns the list of actions pending to be streamed ("pending" list).
virtual MxResult Open(const char *p_filename)
[AI] Opens a data stream with the specified resource filename.
MxStreamProvider * GetProvider()
[AI] Retrieves the current stream provider abstraction used to access file/memory resources.
void AddSubscriber(MxDSSubscriber *p_subscriber)
[AI] Adds a subscriber to the list who will receive streaming action data.
MxStreamProvider * m_provider
[AI] Stream provider abstraction, handling resource IO (RAM/disk).
MxDSObjectList m_unk0x54
[AI] List of actions queued and ready to be streamed ("pending" actions).
MxPresenter * FUN_100c1e70(MxDSAction &p_action)
[AI] Returns the presenter associated with a given in-progress streaming action.
MxBool IsA(const char *p_name) const override
[AI] Performs runtime type checking, matching the given name with this or any parent class.
MxNextActionDataStart * FindNextActionDataStartFromStreamingAction(MxDSStreamingAction *p_action)
[AI] Finds the corresponding next action data start (offset info) for a streaming action.
MxDSSubscriberList & GetSubscriberList()
[AI] Returns the list of current stream subscribers.
MxResult FUN_100c1800(MxDSAction *p_action, MxU32 p_val)
[AI] Helper function to add a next action data start object for tracking offsets for streaming action...
virtual MxResult VTable0x18(undefined4, undefined4)
[AI] Unknown virtual function placeholder.
MxAtomId & GetAtom()
[AI] Retrieves the atom ID (unique logical identifier) for this stream controller.
MxDSObjectList & GetUnk0x3c()
[AI] Returns the list of actions currently being streamed ("in progress" list).
virtual MxDSStreamingAction * VTable0x28()
[AI] Returns a pointer to the current/active streaming action object.
virtual MxResult VTable0x30(MxDSAction *p_action)
[AI] Removes a completed action from in-progress ("unk0x3c") list and deletes its data block.
virtual MxResult VTable0x2c(MxDSAction *p_action, MxU32 p_bufferval)
[AI] Handles allocation and setup of a new streaming action and associated chunk for the action,...
MxResult InsertActionToList54(MxDSAction *p_action)
[AI] Inserts a clone of the provided action into the pending ("unk0x54") list.
[AI] Abstract base class for stream resource providers in the LEGO Island engine.
[AI] A utility list extending the STL list<T>, providing simplified PushBack, Remove,...
Definition: mxutilitylist.h:14
#define override
Definition: compat.h:21
unsigned int undefined4
Definition: decomp.h:28
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
Definition: legotypes.h:34
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed short MxS16
[AI]
Definition: mxtypes.h:26
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
[AI] STL compatibility layer header to provide consistent STL (Standard Template Library) types and a...