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

[AI] Handles the receipt, queuing, and batch management of data chunks streamed by a MxStreamController. More...

#include <mxdssubscriber.h>

Inheritance diagram for MxDSSubscriber:
Collaboration diagram for MxDSSubscriber:

Public Member Functions

 MxDSSubscriber ()
 [AI] Initializes internal member pointers and state. More...
 
 ~MxDSSubscriber () override
 [AI] Destructor, unregisters and frees associated memory/buffers. More...
 
const char * ClassName () const override
 [AI] Returns the class name as a string ("MxDSSubscriber"). More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks if this object is of the provided type name or is derived from it. More...
 
MxResult Create (MxStreamController *p_controller, MxU32 p_objectId, MxS16 p_unk0x48)
 [AI] Initializes subscription to a streaming controller, sets identifiers, and establishes chunk cursors. More...
 
void DestroyData ()
 [AI] Frees and detaches all currently managed/pending/consumed data chunks from both lists; intended to thoroughly clean after stream termination or error. More...
 
MxResult AddData (MxStreamChunk *p_chunk, MxBool p_append)
 [AI] Appends or prepends a new data chunk to the pending stream buffer. More...
 
MxStreamChunkPopData ()
 [AI] Pops the next available pending data chunk for consumption, moving it to the consumed list. More...
 
MxStreamChunkPeekData ()
 [AI] Returns but does not remove the first pending data chunk ("peek" operation). More...
 
void FreeDataChunk (MxStreamChunk *p_chunk)
 [AI] Frees (deletes) a data chunk if it's found in the consumed data list; also forcibly deletes single-use chunks. More...
 
MxU32 GetObjectId ()
 [AI] Returns the object identifier associated with this subscriber. More...
 
MxS16 GetUnknown48 ()
 [AI] Returns the member field sometimes used for disambiguating media (purpose context-specific). 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...
 

Detailed Description

[AI] Handles the receipt, queuing, and batch management of data chunks streamed by a MxStreamController.

[AI] Acts as a client for an active stream; maintains a unique ObjectId and facilitates buffering, consumption, and freeing of received media data chunks. Used internally by the media subsystem for dynamic, on-demand resource consumption. [AI] SIZE: 0x4c

Definition at line 27 of file mxdssubscriber.h.

Constructor & Destructor Documentation

◆ MxDSSubscriber()

MxDSSubscriber::MxDSSubscriber ( )

[AI] Initializes internal member pointers and state.

Definition at line 9 of file mxdssubscriber.cpp.

◆ ~MxDSSubscriber()

MxDSSubscriber::~MxDSSubscriber ( )
override

[AI] Destructor, unregisters and frees associated memory/buffers.

Definition at line 18 of file mxdssubscriber.cpp.

Member Function Documentation

◆ AddData()

MxResult MxDSSubscriber::AddData ( MxStreamChunk p_chunk,
MxBool  p_append 
)

[AI] Appends or prepends a new data chunk to the pending stream buffer.

Parameters
p_chunk[AI] Pointer to the data chunk to be queued.
p_append[AI] If TRUE, will append to end; if FALSE, prepends to front of queue.
Returns
[AI] Always returns SUCCESS as allocation occurs externally.

Definition at line 81 of file mxdssubscriber.cpp.

◆ ClassName()

const char * MxDSSubscriber::ClassName ( ) const
inlineoverridevirtual

[AI] Returns the class name as a string ("MxDSSubscriber").

Returns
[AI] Pointer to class name static string.

Reimplemented from MxCore.

Definition at line 36 of file mxdssubscriber.h.

◆ Create()

MxResult MxDSSubscriber::Create ( MxStreamController p_controller,
MxU32  p_objectId,
MxS16  p_unk0x48 
)

[AI] Initializes subscription to a streaming controller, sets identifiers, and establishes chunk cursors.

Parameters
p_controller[AI] Pointer to the MxStreamController providing data.
p_objectId[AI] Unique identifier for the object/resource being streamed to.
p_unk0x48[AI] Stream-type specific field for finer-grained distinction, often media format related.
Returns
[AI] SUCCESS if initialization of subscription and cursors succeeded, FAILURE otherwise.

Definition at line 38 of file mxdssubscriber.cpp.

◆ DestroyData()

void MxDSSubscriber::DestroyData ( )

[AI] Frees and detaches all currently managed/pending/consumed data chunks from both lists; intended to thoroughly clean after stream termination or error.

Definition at line 63 of file mxdssubscriber.cpp.

◆ FreeDataChunk()

void MxDSSubscriber::FreeDataChunk ( MxStreamChunk p_chunk)

[AI] Frees (deletes) a data chunk if it's found in the consumed data list; also forcibly deletes single-use chunks.

Parameters
p_chunk[AI] Pointer to the chunk to free. [AI_SUGGESTED_NAME: FreeConsumedDataChunk]

Definition at line 125 of file mxdssubscriber.cpp.

◆ GetObjectId()

MxU32 MxDSSubscriber::GetObjectId ( )
inline

[AI] Returns the object identifier associated with this subscriber.

Definition at line 82 of file mxdssubscriber.h.

◆ GetUnknown48()

MxS16 MxDSSubscriber::GetUnknown48 ( )
inline

[AI] Returns the member field sometimes used for disambiguating media (purpose context-specific).

Definition at line 86 of file mxdssubscriber.h.

◆ IsA()

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

[AI] Checks if this object is of the provided type name or is derived from it.

Parameters
p_name[AI] Null-terminated class name string.
Returns
[AI] TRUE if this class is or derives from p_name; otherwise, FALSE.

Reimplemented from MxCore.

Definition at line 46 of file mxdssubscriber.h.

◆ PeekData()

MxStreamChunk * MxDSSubscriber::PeekData ( )

[AI] Returns but does not remove the first pending data chunk ("peek" operation).

Returns
[AI] Pointer to the next available data chunk, or NULL if none left.

Definition at line 113 of file mxdssubscriber.cpp.

◆ PopData()

MxStreamChunk * MxDSSubscriber::PopData ( )

[AI] Pops the next available pending data chunk for consumption, moving it to the consumed list.

Returns
[AI] Pointer to the popped chunk, or NULL if no chunk is available.

Definition at line 96 of file mxdssubscriber.cpp.


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