Isle
|
[AI] Controller for streaming from disk-based SI resources, manages buffers and streaming actions. More...
#include <mxdiskstreamcontroller.h>
Public Member Functions | |
MxDiskStreamController () | |
[AI] Constructor. Initializes internal state and buffer counters. More... | |
~MxDiskStreamController () override | |
[AI] Destructor. Cleans up streaming actions, buffers, and provider. Unregisters from tickle manager. More... | |
MxResult | Tickle () override |
[AI] Called by tickle managers to allow the object to update itself. More... | |
const char * | ClassName () const override |
[AI] Update the controller, handling buffer processing and queued actions. More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Checks whether the provided string matches the class name or any ancestor's class name. More... | |
MxResult | Open (const char *p_filename) override |
[AI] Opens a data stream with the specified resource filename. More... | |
MxResult | VTable0x18 (undefined4, undefined4) override |
[AI] Opens the given resource file for streaming. More... | |
MxResult | VTable0x20 (MxDSAction *p_action) override |
[AI] Placeholder/overridden method—purpose unknown from context. More... | |
MxResult | VTable0x24 (MxDSAction *p_action) override |
[AI] Start or queue the streaming action for the given action, potentially using buffer reuse and streaming mechanics. More... | |
MxDSStreamingAction * | VTable0x28 () override |
[AI] Marks an action as completed and cleans up associated resources. More... | |
MxResult | VTable0x30 (MxDSAction *p_action) override |
[AI] Pops a queued (ready) streaming action and prepares it for buffer assignment. [AI] More... | |
virtual MxResult | VTable0x34 (undefined4) |
[AI] Cleans up/aborts all queued streaming actions associated with the specified action. More... | |
MxBool | GetUnk0xc4 () const |
[AI] Placeholder/overridden method—purpose unknown from context. More... | |
MxResult | FUN_100c7890 (MxDSStreamingAction *p_action) |
[AI] Adds a streaming action to the list (m_list0x80) and possibly processes buffer allocation. More... | |
void | FUN_100c7cb0 (MxDSStreamingAction *p_action) |
[AI] Destroys the given streaming action and any associated buffers. More... | |
void | FUN_100c7f40 (MxDSStreamingAction *p_streamingaction) |
[AI] Adds a streaming action to m_list0x64 for processing. More... | |
void | FUN_100c8120 (MxDSAction *p_action) |
[AI] Cleans up an action and all associated resources, notifies provider. More... | |
void | InsertToList74 (MxDSBuffer *p_buffer) |
[AI] Inserts a buffer to the buffer reuse list (m_list0x74). More... | |
void | FUN_100c8670 (MxDSStreamingAction *p_streamingAction) |
[AI] Pushes an action to a private list (m_list0xb8) for later cleanup. More... | |
![]() | |
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 MxDSStreamingAction * | VTable0x28 () |
[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... | |
MxPresenter * | FUN_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... | |
MxNextActionDataStart * | FindNextActionDataStartFromStreamingAction (MxDSStreamingAction *p_action) |
[AI] Finds the corresponding next action data start (offset info) for a streaming action. More... | |
MxAtomId & | GetAtom () |
[AI] Retrieves the atom ID (unique logical identifier) for this stream controller. More... | |
MxStreamProvider * | GetProvider () |
[AI] Retrieves the current stream provider abstraction used to access file/memory resources. More... | |
MxDSObjectList & | GetUnk0x3c () |
[AI] Returns the list of actions currently being streamed ("in progress" list). More... | |
MxDSObjectList & | GetUnk0x54 () |
[AI] Returns the list of actions pending to be streamed ("pending" list). More... | |
MxDSSubscriberList & | GetSubscriberList () |
[AI] Returns the list of current stream subscribers. 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... | |
Additional Inherited Members | |
![]() | |
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... | |
MxStreamProvider * | m_provider |
[AI] Stream provider abstraction, handling resource IO (RAM/disk). More... | |
undefined4 * | m_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... | |
MxDSAction * | m_action0x60 |
[AI] Current action pointer used during processing, moved from pending to active as actions are processed. More... | |
[AI] Controller for streaming from disk-based SI resources, manages buffers and streaming actions.
Extends MxStreamController.
[AI] The MxDiskStreamController handles streaming of resources (usually from disk) via SI (Script/Resource) files. Manages various buffers and actions to allow for asynchronous streaming, buffer reuse, and action lifecycle. Synchronizes access using critical sections for thread safety, and incorporates a tickle-based update mechanism.
Definition at line 23 of file mxdiskstreamcontroller.h.
MxDiskStreamController::MxDiskStreamController | ( | ) |
[AI] Constructor. Initializes internal state and buffer counters.
Definition at line 16 of file mxdiskstreamcontroller.cpp.
|
override |
[AI] Destructor. Cleans up streaming actions, buffers, and provider. Unregisters from tickle manager.
Definition at line 23 of file mxdiskstreamcontroller.cpp.
|
inlineoverridevirtual |
[AI] Update the controller, handling buffer processing and queued actions.
Invoked regularly (see tickle mechanism).
[AI] Frees unused buffers, handles scheduled streaming actions, and launches new buffer loads as necessary.
[AI] Returns the class name as a string literal.
Reimplemented from MxCore.
Definition at line 38 of file mxdiskstreamcontroller.h.
MxResult MxDiskStreamController::FUN_100c7890 | ( | MxDSStreamingAction * | p_action | ) |
[AI] Adds a streaming action to the list (m_list0x80) and possibly processes buffer allocation.
p_action | Streaming action to add. [AI] |
Definition at line 110 of file mxdiskstreamcontroller.cpp.
void MxDiskStreamController::FUN_100c7cb0 | ( | MxDSStreamingAction * | p_action | ) |
[AI] Destroys the given streaming action and any associated buffers.
p_action | Streaming action to destroy. [AI] |
Definition at line 229 of file mxdiskstreamcontroller.cpp.
void MxDiskStreamController::FUN_100c7f40 | ( | MxDSStreamingAction * | p_streamingaction | ) |
[AI] Adds a streaming action to m_list0x64 for processing.
p_streamingaction | Streaming action to add. [AI] |
Definition at line 301 of file mxdiskstreamcontroller.cpp.
void MxDiskStreamController::FUN_100c8120 | ( | MxDSAction * | p_action | ) |
[AI] Cleans up an action and all associated resources, notifies provider.
p_action | Action to clean up. [AI] |
Definition at line 339 of file mxdiskstreamcontroller.cpp.
void MxDiskStreamController::FUN_100c8670 | ( | MxDSStreamingAction * | p_streamingAction | ) |
[AI] Pushes an action to a private list (m_list0xb8) for later cleanup.
p_streamingAction | The streaming action to defer deletion. [AI] |
Definition at line 473 of file mxdiskstreamcontroller.cpp.
|
inline |
[AI] Placeholder/overridden method—purpose unknown from context.
[AI] Return value of m_unk0xc4, indicating if more action chunks/processing is in progress.
Definition at line 85 of file mxdiskstreamcontroller.h.
void MxDiskStreamController::InsertToList74 | ( | MxDSBuffer * | p_buffer | ) |
[AI] Inserts a buffer to the buffer reuse list (m_list0x74).
p_buffer | Buffer to enqueue for later potential reuse or cleanup. [AI] |
Definition at line 423 of file mxdiskstreamcontroller.cpp.
|
inlineoverridevirtual |
[AI] Checks whether the provided string matches the class name or any ancestor's class name.
p_name | Name to compare. [AI] |
Reimplemented from MxCore.
Definition at line 50 of file mxdiskstreamcontroller.h.
|
overridevirtual |
[AI] Opens a data stream with the specified resource filename.
p_filename | [AI] Name of the resource file to open (typically .SI). |
[AI] This sets the atom ID with the converted source name for unique logical identification and later lookups.
Reimplemented from MxStreamController.
Definition at line 74 of file mxdiskstreamcontroller.cpp.
|
overridevirtual |
[AI] Called by tickle managers to allow the object to update itself.
[AI] Override in derived classes for time-sliced processing ("tickling"). Used extensively by game logic and resource management systems.
Reimplemented from MxCore.
Definition at line 456 of file mxdiskstreamcontroller.cpp.
|
overridevirtual |
[AI] Opens the given resource file for streaming.
Prepares provider/stream for reading actions and registers for tickling.
p_filename | Name of the resource file to open (without path/extension). [AI] |
Reimplemented from MxStreamController.
Definition at line 103 of file mxdiskstreamcontroller.cpp.
|
overridevirtual |
[AI] Placeholder/overridden method—purpose unknown from context.
Reimplemented from MxStreamController.
Definition at line 311 of file mxdiskstreamcontroller.cpp.
|
overridevirtual |
[AI] Start or queue the streaming action for the given action, potentially using buffer reuse and streaming mechanics.
p_action | The action to process. [AI] |
Reimplemented from MxStreamController.
Definition at line 357 of file mxdiskstreamcontroller.cpp.
|
overridevirtual |
[AI] Marks an action as completed and cleans up associated resources.
p_action | The completed action. [AI] |
Reimplemented from MxStreamController.
Definition at line 174 of file mxdiskstreamcontroller.cpp.
|
overridevirtual |
[AI] Pops a queued (ready) streaming action and prepares it for buffer assignment. [AI]
Reimplemented from MxStreamController.
Definition at line 203 of file mxdiskstreamcontroller.cpp.
|
virtual |
[AI] Cleans up/aborts all queued streaming actions associated with the specified action.
p_action | The action whose streaming actions to remove. [AI] |
Definition at line 123 of file mxdiskstreamcontroller.cpp.