#include <mnt_component.h>
Inheritance diagram for MntComponent:
Public Member Functions | |
virtual void | recv (MntData *) |
This method should be overwritten by subclass. | |
virtual void | flush () |
Some MntComponent object may buffer some data instead of processing them immediately. | |
virtual void | push (MntComponent *component, MntData *data) |
This method sends processed data to the a specific component. | |
virtual void | push (MntData *data) |
This method sends processed data to all components down stream. | |
virtual void | flush_next () |
This method calls flush method of all components down stream. | |
virtual void | push (MntComponent *component, MntClientData data) |
??? | |
virtual void | pull (MntClientData param) |
This method pull data from the upstream node when needed. | |
char * | eval_instproc (const char *method) |
This methods is the hook from C++ to Tcl methods. | |
MntComponent * | lookup_tcl_object (const char *name) |
Given the name of a Tcl object, returns the pointer to the corresponding C++ object. | |
MntComponent () | |
Constructor for MntComponent, initialize every member to NULL. | |
void | add_link_to (MntComponent *c) |
Add a link from this object to another component c. | |
void | del_link_to (MntComponent *c) |
Remove the link from this object to component c. | |
int | command (int, const char *const *) |
This method overwrites TclObject command method and adds additional mapping from C++ functions to Tcl function. | |
Public Attributes | |
MntComponent * | down_stream_ |
MntComponent * | up_stream_ |
MntComponent * | next_ |
A component is a C++ object that can be accessed using Tcl interface. A MntComponent typically receives some data, processes it, and passes it to zero or more other components.
To use MntComponent, two things are typically needed. First, overwrite the recv() method to process the data. Second, create a static class object to expose the component to Tcl.
MntComponent objects can be linked at the Tcl-level to create a tree of components. Data flows through the tree, and are processed along the way.
An MntComponent object maintains a link list of other components "downstream", i.e., nodes to pass data to.
|
Add a link from this object to another component c.
|
|
Remove the link from this object to component c. If c is not a valid down stream object, nothing happens. If for some reasons multiple c exists, all instances of c is removed.
|
|
This methods is the hook from C++ to Tcl methods. It allows invocation Tcl methods from C++.
|
|
Some MntComponent object may buffer some data instead of processing them immediately. In such cases, it may be necessary to call flush() at appropriate point of the program to push the buffered data down stream. |
|
Given the name of a Tcl object, returns the pointer to the corresponding C++ object.
|
|
This method pull data from the upstream node when needed. ??? |
|
This method sends processed data to all components down stream.
|
|
This method sends processed data to the a specific component.
|
|
This method should be overwritten by subclass. This is where most actions happens. Whenever some data is received, this method is called. Typically, a component will process the data in this method, and call push() to push processed data to the nodes down stream. Reimplemented in MntMPEGFrameDecoder, MntMPEGRTPReassembler, MntPPMWriter, MntPSNRCalculator, MntRTPDropper, MntRTPFileWriter, and MntRTPPayloadDumper. |
|
first node to passed data to |
|
next node in the link list of downstream nodes Reimplemented in MntMPEGFrameDecoder. |
|
node this component will received data from |