|
|
| MpTopologyGraph (int samplesPerFrame, int samplesPerSec, MpResourceTopology &initialResourceTopology, MpResourceFactory &resourceFactory, OsMsgDispatcher *pNotifDispatcher=NULL) |
| Constructor. More...
|
|
virtual | ~MpTopologyGraph () |
| Destructor. More...
|
|
|
OsStatus | addResources (MpResourceTopology &incrementalTopology, MpResourceFactory *resourceFactory, int resourceInstanceId) |
| Add resource to the existing flowgraph as defined by given topology and optional factory. More...
|
|
OsStatus | destroyResources (MpResourceTopology &resourceTopology, int resourceInstanceId) |
| Delete resources from existing flowgraph as defined by given topology. More...
|
|
virtual OsStatus | processNextFrame () |
| Extended processNextFrame() for diagnostic reasons. More...
|
|
virtual OsStatus | gainFocus () |
| Informs the flow graph that it now has the MpMediaTask focus. More...
|
|
virtual OsStatus | loseFocus () |
| Informs the flow graph that it has lost the MpMediaTask focus. More...
|
|
|
MpFlowGraphBase::FlowGraphType | getType () |
|
OsStatus | lookupVirtualInput (const UtlString &virtualName, int virtualPortIdx, MpResource *&rpResource, int &portIdx) |
| Lookup real input port corresponding to given virtual one. More...
|
|
OsStatus | lookupVirtualOutput (const UtlString &virtualName, int virtualPortIdx, MpResource *&rpResource, int &portIdx) |
| Lookup real output port corresponding to given virtual one. More...
|
|
OsStatus | lookupInput (const UtlString &resourceName, int portIdx, MpResource *&pFoundResource, int &foundPortIdx) |
| Lookup real or virtual input port. More...
|
|
OsStatus | lookupOutput (const UtlString &resourceName, int portIdx, MpResource *&pFoundResource, int &foundPortIdx) |
| Lookup real or virtual output port. More...
|
|
void | synchronize (const char *tag=NULL, int val=0) |
| Sends a message to self, and waits for reply. More...
|
|
| MpFlowGraphBase (int samplesPerFrame=0, int samplesPerSec=0, OsMsgDispatcher *pNotifDispatcher=NULL) |
| Constructor. More...
|
|
virtual | ~MpFlowGraphBase () |
| Destructor. More...
|
|
OsStatus | addLink (MpResource &rFrom, int outPortIdx, MpResource &rTo, int inPortIdx) |
| Creates a link between resources. More...
|
|
OsMsgDispatcher * | setNotificationDispatcher (OsMsgDispatcher *notifyDispatcher) |
| Adds a dispatcher for notifications to the flowgraph. More...
|
|
OsStatus | addResource (MpResource &rResource, UtlBoolean makeNameUnique=TRUE) |
| Adds the indicated media processing object to the flow graph. More...
|
|
OsStatus | destroyResources (void) |
| Stops the flow graph, removes all of the resources in the flow graph and destroys them. More...
|
|
OsStatus | disable (void) |
| Invokes the disable() method for each resource in the flow graph. More...
|
|
OsStatus | enable (void) |
| Invokes the enable() method for each resource in the flow graph. More...
|
|
OsStatus | insertResourceAfter (MpResource &rResource, MpResource &rUpstreamResource, int outPortIdx) |
| Inserts rResource into the flow graph downstream of the designated rUpstreamResource resource. More...
|
|
OsStatus | insertResourceBefore (MpResource &rResource, MpResource &rDownstreamResource, int inPortIdx) |
|
virtual OsStatus | postNotification (const MpResNotificationMsg &msg) |
| posts a resource notification message to the Notification dispatcher. More...
|
|
OsStatus | removeLink (MpResource &rFrom, int outPortIdx) |
| Removes the link between the outPortIdx port of the rFrom resource and its downstream counterpart. More...
|
|
OsStatus | removeResource (MpResource &rResource) |
| Removes the indicated media processing object from the flow graph. More...
|
|
OsStatus | destroyResource (const UtlString &resourceName) |
| Removes the indicated media processing object from the flowgraph and destroys it. More...
|
|
OsStatus | setNotificationsEnabled (bool enabled, const UtlString &resourceName=NULL) |
|
OsStatus | start (void) |
| Start this flow graph. More...
|
|
OsStatus | stop (void) |
| Stop this flow graph. More...
|
|
int | getSamplesPerFrame (void) const |
| Returns the number of samples expected per frame. More...
|
|
int | getSamplesPerSec (void) const |
| Returns the number of samples expected per second. More...
|
|
int | getState (void) const |
| Returns the current state of flow graph. More...
|
|
OsMsgDispatcher * | getNotificationDispatcher () const |
| Returns the current notification dispatcher, if any. If none, returns NULL. More...
|
|
OsStatus | lookupResource (const UtlString &name, MpResource *&rpResource) |
| Sets rpResource to point to the resource that corresponds to name or to NULL if no matching resource is found. More...
|
|
int | numLinks (void) const |
| Returns the number of links in the flow graph. More...
|
|
int | numFramesProcessed (void) const |
| Returns the number of frames this flow graph has processed. More...
|
|
int | numResources (void) const |
| Returns the number of resources in the flow graph. More...
|
|
OsMsgQ * | getMsgQ (void) |
| Returns the message queue used by the flow graph. More...
|
|
int | getFlowgraphNum () const |
| Get flowgraph's sequence number (use for debug purposes only!) More...
|
|
UtlString | getFlowgraphName () const |
| Get flowgraph's name based on its sequence number (use for debug purposes only!) More...
|
|
OsStatus | getLatencyForPath (MpResource *pStartResource, int startResourceInput, const UtlString &endResourceName, int endResourceOutput, UtlBoolean includeEndResourceLatency, int &latency) |
| Get latency for main path from one resource to another in forward direction. More...
|
|
OsStatus | getLatencyForPathReverse (MpResource *pStartResource, int startResourceOutput, const UtlString &endResourceName, int endResourceInput, UtlBoolean includeEndResourceLatency, int &latency) |
| Get latency for main path from one resource to another in reverse direction. More...
|
|
UtlBoolean | isStarted (void) const |
| Is flow graph in STARTED state. More...
|
|
|
int | addTopologyResources (MpResourceTopology &resourceTopology, MpResourceFactory &resourceFactory, UtlHashBag &newResources, UtlBoolean replaceNumInName=FALSE, int resourceNum=-1) |
| Adds all new resources defined in a topology. More...
|
|
int | addVirtualInputs (MpResourceTopology &resourceTopology, UtlHashBag &newResources, UtlBoolean replaceNumInName=FALSE, int resourceNum=-1) |
| Adds all virtual inputs defined in a topology. More...
|
|
int | removeVirtualInputs (MpResourceTopology &resourceTopology, UtlBoolean replaceNumInName, int resourceNum) |
| Remove all virtual inputs defined in a topology from the flowgraph. More...
|
|
int | addVirtualOutputs (MpResourceTopology &resourceTopology, UtlHashBag &newResources, UtlBoolean replaceNumInName=FALSE, int resourceNum=-1) |
| Adds all virtual outputs defined in a topology. More...
|
|
int | removeVirtualOutputs (MpResourceTopology &resourceTopology, UtlBoolean replaceNumInName, int resourceNum) |
| Remove all virtual outputs defined in a topology from the flowgraph. More...
|
|
int | linkTopologyResources (MpResourceTopology &resourceTopology, UtlHashBag &newResources, UtlBoolean replaceNumInName=FALSE, int resourceNum=-1) |
| Adds links defined for resources in resource topology. More...
|
|
| MpTopologyGraph (const MpTopologyGraph &rMpTopologyGraph) |
| Disabled copy constructor. More...
|
|
MpTopologyGraph & | operator= (const MpTopologyGraph &rhs) |
| Disable assignment operator. More...
|
|
Flowgraph with resources wired as defined in given topology and factory.
The MpTopologyGraph is a MpFlowGraphBase which is constructed with resources connected as defined by the given MpResourceTopology. The resources are constructed using the given MpResourceFactory. This allows for a flexible construction of flowgraphs containing different resources, connected in a custom (as opposed to hardcoded) graph topology.
To keep this flowgraph independent of specific resources and topologies all operations on existing resources must be performed via message passing (the message queue is obtained via getMsgQ). The messages are either handled by the flowgraph or dispatched to the resource named in the message. See the specific resource for the types of messages and operations that can be performed on the resource. See MpResource for more information on the message format and performing operations on resources using message passing.