Isle
Loading...
Searching...
No Matches
MxStreamController Class Reference

[AI] Controller for streaming and managing multimedia resources and actions during gameplay. More...

#include <mxstreamcontroller.h>

Inheritance diagram for MxStreamController:
Collaboration diagram for MxStreamController:

Public Member Functions

 MxStreamController ()
 [AI] Constructor. More...
 
 ~MxStreamController () override
 [AI] Destructor. More...
 
const char * ClassName () const override
 [AI] Returns the class name used for runtime type checks. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Performs runtime type checking, matching the given name with this or any parent class. More...
 
virtual MxResult Open (const char *p_filename)
 [AI] Opens a data stream with the specified resource filename. More...
 
virtual MxResult VTable0x18 (undefined4, undefined4)
 [AI] Unknown virtual function placeholder. More...
 
virtual MxResult VTable0x1c (undefined4, undefined4)
 [AI] Unknown virtual function placeholder. More...
 
virtual MxResult VTable0x20 (MxDSAction *p_action)
 [AI] Streams data for the provided action by determining data offset and reading required chunk. More...
 
virtual MxResult VTable0x24 (MxDSAction *p_action)
 [AI] Matches and processes an action in the "unk0x54" (pending) list and triggers sending to subscribers. More...
 
virtual MxDSStreamingActionVTable0x28 ()
 [AI] Returns a pointer to the current/active streaming action object. More...
 
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, with prefetch based on buffer value. More...
 
virtual MxResult VTable0x30 (MxDSAction *p_action)
 [AI] Removes a completed action from in-progress ("unk0x3c") list and deletes its data block. More...
 
void AddSubscriber (MxDSSubscriber *p_subscriber)
 [AI] Adds a subscriber to the list who will receive streaming action data. More...
 
void RemoveSubscriber (MxDSSubscriber *p_subscriber)
 [AI] Removes a previously registered subscriber from the stream notification list. More...
 
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 actions. More...
 
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. More...
 
MxPresenterFUN_100c1e70 (MxDSAction &p_action)
 [AI] Returns the presenter associated with a given in-progress streaming action. More...
 
MxResult FUN_100c1f00 (MxDSAction *p_action)
 [AI] Sends a streaming chunk to all current subscribers for the specified action, handling recursive send for multi-actions. More...
 
MxBool IsStoped (MxDSObject *p_obj)
 [AI] Checks if the streaming operation for a given object/action has fully stopped and no longer has active subscribers. More...
 
MxResult InsertActionToList54 (MxDSAction *p_action)
 [AI] Inserts a clone of the provided action into the pending ("unk0x54") list. More...
 
MxNextActionDataStartFindNextActionDataStartFromStreamingAction (MxDSStreamingAction *p_action)
 [AI] Finds the corresponding next action data start (offset info) for a streaming action. More...
 
MxAtomIdGetAtom ()
 [AI] Retrieves the atom ID (unique logical identifier) for this stream controller. More...
 
MxStreamProviderGetProvider ()
 [AI] Retrieves the current stream provider abstraction used to access file/memory resources. More...
 
MxDSObjectListGetUnk0x3c ()
 [AI] Returns the list of actions currently being streamed ("in progress" list). More...
 
MxDSObjectListGetUnk0x54 ()
 [AI] Returns the list of actions pending to be streamed ("pending" list). More...
 
MxDSSubscriberListGetSubscriberList ()
 [AI] Returns the list of current stream subscribers. More...
 
- Public Member Functions inherited from MxCore
 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

MxCriticalSection m_criticalSection
 [AI] Protects streaming controller state for thread-safety. More...
 
MxAtomId m_atom
 [AI] Unique identifier for this stream, derived from source/resource name. More...
 
MxStreamProviderm_provider
 [AI] Stream provider abstraction, handling resource IO (RAM/disk). More...
 
undefined4m_unk0x2c
 [AI] Unknown data, likely used for streaming internals or as a metadata pointer. More...
 
MxDSSubscriberList m_subscribers
 [AI] List of current subscribers (listening entities for streamed data). More...
 
MxDSObjectList m_unk0x3c
 [AI] List of actions currently being processed/streamed ("in progress" actions). More...
 
MxNextActionDataStartList m_nextActionList
 [AI] List mapping from streamed object/action to starting offset (used for internal tracking). More...
 
MxDSObjectList m_unk0x54
 [AI] List of actions queued and ready to be streamed ("pending" actions). More...
 
MxDSActionm_action0x60
 [AI] Current action pointer used during processing, moved from pending to active as actions are processed. More...
 

Detailed Description

[AI] Controller for streaming and managing multimedia resources and actions during gameplay.

[AI] MxStreamController manages dynamic streaming of data, handling subscribers, action objects, and the provider responsible for loading/reading resources. It works with MxDSAction and MxDSSubscriber, coordinating how scripted actions and multimedia objects are streamed and parsed frame-by-frame.

This is a central class in resource handling, linking file abstraction, direct stream control, and update notifications across the system. In its lifetime, it tracks actions pending to be streamed, in-process or queued, and actions already streamed, to manage play and event timing for media.

Definition at line 47 of file mxstreamcontroller.h.

Constructor & Destructor Documentation

◆ MxStreamController()

MxStreamController::MxStreamController ( )

[AI] Constructor.

Initializes member variables and sets up an empty streaming control context.

Definition at line 20 of file mxstreamcontroller.cpp.

◆ ~MxStreamController()

MxStreamController::~MxStreamController ( )
override

[AI] Destructor.

Cleans up provider, all current actions, subscribers, and action lists.

Definition at line 29 of file mxstreamcontroller.cpp.

Member Function Documentation

◆ AddSubscriber()

void MxStreamController::AddSubscriber ( MxDSSubscriber p_subscriber)

[AI] Adds a subscriber to the list who will receive streaming action data.

Parameters
p_subscriber[AI] Subscriber to add.

[AI] Used to register clients/entities interested in data chunks from the stream.

Definition at line 81 of file mxstreamcontroller.cpp.

◆ ClassName()

const char * MxStreamController::ClassName ( ) const
inlineoverridevirtual

[AI] Returns the class name used for runtime type checks.

Returns
[AI] "MxStreamController"

Reimplemented from MxCore.

Definition at line 63 of file mxstreamcontroller.h.

◆ FindNextActionDataStartFromStreamingAction()

MxNextActionDataStart * MxStreamController::FindNextActionDataStartFromStreamingAction ( MxDSStreamingAction p_action)

[AI] Finds the corresponding next action data start (offset info) for a streaming action.

Parameters
p_action[AI] Streaming action to lookup data start for.
Returns
[AI] Corresponding MxNextActionDataStart or NULL if not found.

Definition at line 312 of file mxstreamcontroller.cpp.

◆ FUN_100c1800()

MxResult MxStreamController::FUN_100c1800 ( MxDSAction p_action,
MxU32  p_val 
)

[AI] Helper function to add a next action data start object for tracking offsets for streaming actions.

Parameters
p_action[AI] Action whose start should be tracked.
p_val[AI] Offset value to track.
Returns
[AI] SUCCESS on success, FAILURE if allocation failed.

[AI] [AI_SUGGESTED_NAME: TrackNextActionDataStart]

Definition at line 138 of file mxstreamcontroller.cpp.

◆ FUN_100c1a00()

MxResult MxStreamController::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.

Parameters
p_action[AI] Action to stream.
p_offset[AI] Buffer offset in the resource stream.
Returns
[AI] SUCCESS on allocation and insertion, FAILURE otherwise.

[AI] [AI_SUGGESTED_NAME: AllocateStreamingAction]

Definition at line 152 of file mxstreamcontroller.cpp.

◆ FUN_100c1e70()

MxPresenter * MxStreamController::FUN_100c1e70 ( MxDSAction p_action)

[AI] Returns the presenter associated with a given in-progress streaming action.

Parameters
p_action[AI] Action whose presenter is to be retrieved.
Returns
[AI] Pointer to MxPresenter if available.

[AI] This retrieves a media presenter object linked to a currently executing action, allowing external control or progress check.

Definition at line 260 of file mxstreamcontroller.cpp.

◆ FUN_100c1f00()

MxResult MxStreamController::FUN_100c1f00 ( MxDSAction p_action)

[AI] Sends a streaming chunk to all current subscribers for the specified action, handling recursive send for multi-actions.

Parameters
p_action[AI] Action to send data for.
Returns
[AI] SUCCESS on sending to all, FAILURE if allocation fails or one send fails.

[AI] Used to propagate action completion/data to all interested game entities or systems.

Definition at line 277 of file mxstreamcontroller.cpp.

◆ GetAtom()

MxAtomId & MxStreamController::GetAtom ( )
inline

[AI] Retrieves the atom ID (unique logical identifier) for this stream controller.

Returns
[AI] Reference to the atom ID for this stream instance.

[AI] The atom ID is derived from source name, allowing stream lookup and management globally.

Definition at line 217 of file mxstreamcontroller.h.

◆ GetProvider()

MxStreamProvider * MxStreamController::GetProvider ( )
inline

[AI] Retrieves the current stream provider abstraction used to access file/memory resources.

Returns
[AI] Pointer to stream provider.

[AI] Allows direct access for custom reading or provider queries.

Definition at line 224 of file mxstreamcontroller.h.

◆ GetSubscriberList()

MxDSSubscriberList & MxStreamController::GetSubscriberList ( )
inline

[AI] Returns the list of current stream subscribers.

Returns
[AI] Reference to subscriber list.

Definition at line 242 of file mxstreamcontroller.h.

◆ GetUnk0x3c()

MxDSObjectList & MxStreamController::GetUnk0x3c ( )
inline

[AI] Returns the list of actions currently being streamed ("in progress" list).

Returns
[AI] Reference to in-progress actions list.

Definition at line 230 of file mxstreamcontroller.h.

◆ GetUnk0x54()

MxDSObjectList & MxStreamController::GetUnk0x54 ( )
inline

[AI] Returns the list of actions pending to be streamed ("pending" list).

Returns
[AI] Reference to list of pending actions.

Definition at line 236 of file mxstreamcontroller.h.

◆ InsertActionToList54()

MxResult MxStreamController::InsertActionToList54 ( MxDSAction p_action)

[AI] Inserts a clone of the provided action into the pending ("unk0x54") list.

Parameters
p_action[AI] Action to be cloned and inserted.
Returns
[AI] SUCCESS if insertion is completed, otherwise FAILURE if allocation fails.

Definition at line 244 of file mxstreamcontroller.cpp.

◆ IsA()

MxBool MxStreamController::IsA ( const char *  p_name) const
inlineoverridevirtual

[AI] Performs runtime type checking, matching the given name with this or any parent class.

Parameters
p_name[AI] Name to check against.
Returns
[AI] TRUE if matches this class or a base, else FALSE.

Reimplemented from MxCore.

Definition at line 74 of file mxstreamcontroller.h.

◆ IsStoped()

MxBool MxStreamController::IsStoped ( MxDSObject p_obj)

[AI] Checks if the streaming operation for a given object/action has fully stopped and no longer has active subscribers.

Parameters
p_obj[AI] The data object or action to check.
Returns
[AI] TRUE if fully stopped, otherwise FALSE.

[AI] Used to determine when an action and all its branches are completely done processing.

Definition at line 319 of file mxstreamcontroller.cpp.

◆ Open()

MxResult MxStreamController::Open ( const char *  p_filename)
virtual

[AI] Opens a data stream with the specified resource filename.

Parameters
p_filename[AI] Name of the resource file to open (typically .SI).
Returns
[AI] SUCCESS (0) if source name is set, otherwise other status.

[AI] This sets the atom ID with the converted source name for unique logical identification and later lookups.

Reimplemented in MxDiskStreamController, and MxRAMStreamController.

Definition at line 69 of file mxstreamcontroller.cpp.

◆ RemoveSubscriber()

void MxStreamController::RemoveSubscriber ( MxDSSubscriber p_subscriber)

[AI] Removes a previously registered subscriber from the stream notification list.

Parameters
p_subscriber[AI] Subscriber to remove.

[AI] Prevents further notifications/callbacks for this subscriber.

Definition at line 88 of file mxstreamcontroller.cpp.

◆ VTable0x18()

virtual MxResult MxStreamController::VTable0x18 ( undefined4  ,
undefined4   
)
inlinevirtual

[AI] Unknown virtual function placeholder.

Parameters
[AI]Undefined arguments.
Returns
[AI] Always FAILURE.

[AI] [AI_SUGGESTED_NAME: Close] Most likely a placeholder for closing or releasing a stream.

Reimplemented in MxDiskStreamController.

Definition at line 93 of file mxstreamcontroller.h.

◆ VTable0x1c()

virtual MxResult MxStreamController::VTable0x1c ( undefined4  ,
undefined4   
)
inlinevirtual

[AI] Unknown virtual function placeholder.

Parameters
[AI]Undefined arguments.
Returns
[AI] Always FAILURE.

[AI] [AI_SUGGESTED_NAME: Reset] Placeholder for possible reset/flush operation.

Definition at line 101 of file mxstreamcontroller.h.

◆ VTable0x20()

MxResult MxStreamController::VTable0x20 ( MxDSAction p_action)
virtual

[AI] Streams data for the provided action by determining data offset and reading required chunk.

Parameters
p_action[AI] The action requesting a data stream.
Returns
[AI] Result of the read/streaming operation.

[AI] This function performs lookup of the data offset, then executes the data read. Used as a key step in action handling.

Reimplemented in MxDiskStreamController, and MxRAMStreamController.

Definition at line 94 of file mxstreamcontroller.cpp.

◆ VTable0x24()

MxResult MxStreamController::VTable0x24 ( MxDSAction p_action)
virtual

[AI] Matches and processes an action in the "unk0x54" (pending) list and triggers sending to subscribers.

Parameters
p_action[AI] The action to process.
Returns
[AI] SUCCESS on match and dispatch, FAILURE otherwise.

[AI] This removes the matching action from the pending list, updates fields, and initiates streaming.

Reimplemented in MxDiskStreamController, and MxRAMStreamController.

Definition at line 120 of file mxstreamcontroller.cpp.

◆ VTable0x28()

virtual MxDSStreamingAction * MxStreamController::VTable0x28 ( )
inlinevirtual

[AI] Returns a pointer to the current/active streaming action object.

Returns
[AI] NULL or pointer to current/active MxDSStreamingAction.

[AI] [AI_SUGGESTED_NAME: GetCurrentStreamingAction]

Reimplemented in MxDiskStreamController.

Definition at line 124 of file mxstreamcontroller.h.

◆ VTable0x2c()

MxResult MxStreamController::VTable0x2c ( MxDSAction p_action,
MxU32  p_bufferval 
)
virtual

[AI] Handles allocation and setup of a new streaming action and associated chunk for the action, with prefetch based on buffer value.

Parameters
p_action[AI] Action to stream.
p_bufferval[AI] Data offset or buffer location in the stream.
Returns
[AI] SUCCESS if setup, otherwise FAILURE.

Definition at line 213 of file mxstreamcontroller.cpp.

◆ VTable0x30()

MxResult MxStreamController::VTable0x30 ( MxDSAction p_action)
virtual

[AI] Removes a completed action from in-progress ("unk0x3c") list and deletes its data block.

Parameters
p_action[AI] Action to remove and finalize.
Returns
[AI] SUCCESS on removal, FAILURE otherwise.

[AI] [AI_SUGGESTED_NAME: FinalizeAction]

Reimplemented in MxDiskStreamController.

Definition at line 226 of file mxstreamcontroller.cpp.

Member Data Documentation

◆ m_action0x60

MxDSAction* MxStreamController::m_action0x60
protected

[AI] Current action pointer used during processing, moved from pending to active as actions are processed.

Definition at line 253 of file mxstreamcontroller.h.

◆ m_atom

MxAtomId MxStreamController::m_atom
protected

[AI] Unique identifier for this stream, derived from source/resource name.

Definition at line 246 of file mxstreamcontroller.h.

◆ m_criticalSection

MxCriticalSection MxStreamController::m_criticalSection
protected

[AI] Protects streaming controller state for thread-safety.

Definition at line 245 of file mxstreamcontroller.h.

◆ m_nextActionList

MxNextActionDataStartList MxStreamController::m_nextActionList
protected

[AI] List mapping from streamed object/action to starting offset (used for internal tracking).

Definition at line 251 of file mxstreamcontroller.h.

◆ m_provider

MxStreamProvider* MxStreamController::m_provider
protected

[AI] Stream provider abstraction, handling resource IO (RAM/disk).

Definition at line 247 of file mxstreamcontroller.h.

◆ m_subscribers

MxDSSubscriberList MxStreamController::m_subscribers
protected

[AI] List of current subscribers (listening entities for streamed data).

Definition at line 249 of file mxstreamcontroller.h.

◆ m_unk0x2c

undefined4* MxStreamController::m_unk0x2c
protected

[AI] Unknown data, likely used for streaming internals or as a metadata pointer.

Definition at line 248 of file mxstreamcontroller.h.

◆ m_unk0x3c

MxDSObjectList MxStreamController::m_unk0x3c
protected

[AI] List of actions currently being processed/streamed ("in progress" actions).

Definition at line 250 of file mxstreamcontroller.h.

◆ m_unk0x54

MxDSObjectList MxStreamController::m_unk0x54
protected

[AI] List of actions queued and ready to be streamed ("pending" actions).

Definition at line 252 of file mxstreamcontroller.h.


The documentation for this class was generated from the following files: