#include <mnt_pump.h>
Inheritance diagram for MntPump:
Public Member Functions | |
MntPump () | |
Empty constructor. | |
virtual void | start_pumping () |
Begin to pump. | |
virtual void | stop_pumping () |
Stop pumping. | |
virtual int | pump_some () |
Do nothing here. | |
virtual int | is_running () |
Return 1 if the pump is running, otherwise returns 0. | |
int | command (int argc, const char *const *argv) |
Overwrites TclObject::command() to define additional mapping between C++ methods and Tcl methods. | |
Public Attributes | |
MntPump::PumpTimer | pump_timer_ |
This inner class of MntPump is responsilble for scheduling the next call to pump_some(). | |
Private Attributes | |
int | running_ |
Classes | |
class | PumpTimer |
This inner class of MntPump is responsilble for scheduling the next call to pump_some(). More... |
Rather, the role of a pump is to periodically send data other objects.
The method start_pumping and stop_pumping is called to start and stop the periodic timer respectively. Periodically, pump_some() is called. Method is_running() can be used to check if the pump is working.
To use a pump, typically a subclass is created, with pump_some() overwritten to generate proper data and send push() to components downstream. pump_some() should check if the pump is running, and schedule the next pump_some() to be called before exits. Further, a Tcl instproc called "on_stop_pumping" should be defined as a callback whenever stop_pumping is called. This Tcl procedure may clean up data/files at the Tcl-level.
|
Do nothing here. Subclass should define this method. Reimplemented in MntMPEGFileRTPizer, and MntRTPFileReader. |
|
Begin to pump. pump_some() will be called to push the first batch of data down stream. |
|
Stop pumping. Tcl procedure "on_stop_pumping" will be called. |
|
This inner class of MntPump is responsilble for scheduling the next call to pump_some(). Each MntPump has a instance of PumpTimer, called pump_timer_. Each pump_some() can schedule when to pump the next batch of data by calling the msched() method of Timer. Note: Timer is a class provided by the TclCL package. |
|
1 if the pump is running, 0 otherwise |