Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SH::Base Class Reference

#include <SH.h>

Inheritance diagram for SH::Base:

Inheritance graph
[legend]
Collaboration diagram for SH::Base:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Direction { ReportUpstream, ReportDownstream }

Public Member Functions

 Base (SHGraphManager *mgr, u_int32_t runtimeId, MNSelector &sel)
virtual ~Base ()
SHGraphManagermgr ()
MNSelectormainSelector ()
virtual SH_RC initSH ()
virtual SH_RC uninitSH ()
virtual SH_RC startStreaming ()
virtual SH_RC stopStreaming ()
virtual u_int16 get_rtp_seq ()
virtual u_int32 get_rtp_time ()
virtual SH_RC changePos (u_int64 bytepos)
bool match (Base *downstream)
bool match (SourceEndpoint *ep, Base *otherSH, SinkEndpoint *otherEP)
SH_RC connectSourceEndpoint (Endpoint *ep, Base *otherSH, Endpoint *otherEP)
SH_RC connectSinkEndpoint (Endpoint *ep, Base *otherSH, Endpoint *otherEP)
SH_RC releaseSourceEndpoint (Endpoint *ep)
SH_RC releaseSinkEndpoint (Endpoint *ep)

Protected Member Functions

virtual void pushReport (ReportPtr report, Direction d)
u_int32_t runtimeId () const

Detailed Description

Stream handler class.
The stream handler class provides an abstract base class for interfaces to media handlers.


Member Enumeration Documentation

enum SH::Base::Direction
 

Enumeration values:
ReportUpstream 
ReportDownstream 


Constructor & Destructor Documentation

SH::Base::Base SHGraphManager mgr,
u_int32_t  runtimeId,
MNSelector sel
 

Constructor.
Constructor and destructor are only responsible for the most basic setup procedures. The graph manager, which creates the stream handler, will call initSH immediately after constructing the object. The reason for this is that C++ does not allow the use of virtual functions in the constructor, but the class hierarchy requires these for initialization of child classes.
State transition: NULL -> Uninitialized

Parameters:
mgr the reference of caller; some SHs like the RTPSrcSH need this to inform the graph manager of changes to the data stream, loss of a data stream or addition of a data stream
runtimeId the graph manager id of this SH, required when the feedback is given to the graph manager

virtual SH::Base::~Base  )  [virtual]
 

Destructor.

See also:
Constructor
~SH() : * -> NULL


Member Function Documentation

virtual SH_RC SH::Base::changePos u_int64  bytepos  )  [virtual]
 

Reimplemented in SH::FileSourceSH.

SH_RC SH::Base::connectSinkEndpoint Endpoint ep,
Base otherSH,
Endpoint otherEP
 

SH_RC SH::Base::connectSourceEndpoint Endpoint ep,
Base otherSH,
Endpoint otherEP
 

Connect the endpoints of a sink and a source stream handler. The graph manager will call connectSourceEndpoint(), the source stream handler will then in turn call connectSinkEndpoint() on the other SH.

virtual u_int16 SH::Base::get_rtp_seq  )  [virtual]
 

Reimplemented in SH::RTPSinkSH.

virtual u_int32 SH::Base::get_rtp_time  )  [virtual]
 

Reimplemented in SH::RTPSinkSH.

virtual SH_RC SH::Base::initSH  )  [virtual]
 

initSH() initializes the stream handler, initializes the EndpointSpecs if necessary etc. Child classes should overload this function instead of using the constructor for initialization tasks, since virtual functions used in the process do not exist during the constructor call (unavailability of virtual functions is a restriction of the C++ standard). initSH() : Uninitialized -> Initialized * -> ( error, - )

Reimplemented in SH::DummyLayerSinkSH, SH::DummyLayerSourceSH, SH::GstMpegDemuxSinkSH, SH::ConcatinizerSH, SH::FileSinkSH, SH::FileSourceSH, SH::RTPDecoderSH, SH::RTPEncoderSH, SH::RTPSinkSH, SH::RTPSourceSH, SH::NopIntegratedSH, SH::SendBlockSH, SH::ActiveSH, SH::PushPullSH, SH::NopSubGraphSH, SH::PullResizeSH, and SH::SubGraphSH.

MNSelector& SH::Base::mainSelector  ) 
 

bool SH::Base::match SourceEndpoint ep,
Base otherSH,
SinkEndpoint otherEP
 

bool SH::Base::match Base downstream  ) 
 

SHGraphManager* SH::Base::mgr  ) 
 

Retrieve a pointer to the controlling graph manager.

virtual void SH::Base::pushReport ReportPtr  report,
Direction  d
[protected, virtual]
 

pushReport(r) can be called on source and sink endpoints, which will in turn call their owning stream handler for forwarding the report into the same general direction. The specific stream handler must overload this call if it wants to evaluate the reports, or if it has downstream or well as upstream endpoints. If the SH does not care about reports and has endpoints on only one side, it needs not overload this function. The reports are ignored and deleted in that case.

Reimplemented in SH::DevNullSH, SH::DummyLayerSinkSH, SH::DynMultiplierSH, SH::ConcatinizerSH, SH::PacketMultiplierSH, SH::RTPSinkSH, SH::RTPSourceSH, SH::NopSinkSH, SH::ActiveSH, and SH::PushPullSH.

SH_RC SH::Base::releaseSinkEndpoint Endpoint ep  ) 
 

SH_RC SH::Base::releaseSourceEndpoint Endpoint ep  ) 
 

Disconnect endpoints.

u_int32_t SH::Base::runtimeId  )  const [inline, protected]
 

Retrieve the runtime id for internal use in the child classes.

virtual SH_RC SH::Base::startStreaming  )  [virtual]
 

Activate the stream handler. Threads may start at this time. The data starts to flow through this stream handler. Initialized -> Running Running -> - * -> ( error, - )

Reimplemented in SH::DummyLayerSourceSH, SH::ConcatinizerSH, SH::FileSourceSH, SH::RTPDecoderSH, SH::RTPEncoderSH, SH::RTPSinkSH, SH::RTPSourceSH, SH::NopIntegratedSH, SH::SendBlockSH, SH::ActiveSH, SH::PushPullSH, SH::NopSubGraphSH, SH::PullResizeSH, and SH::SubGraphSH.

virtual SH_RC SH::Base::stopStreaming  )  [virtual]
 

Deactivate the stream handler. The data stops flowing through this stream handler. When this function returns, this stream handler's endpoints will not call pull() or push() on their peers any more. Running -> Initialized

Reimplemented in SH::GstMpegDemuxSinkSH, SH::ConcatinizerSH, SH::RTPDecoderSH, SH::RTPEncoderSH, SH::RTPSinkSH, SH::RTPSourceSH, SH::NopIntegratedSH, SH::SendBlockSH, SH::ActiveSH, SH::PushPullSH, SH::NopSubGraphSH, SH::PullResizeSH, and SH::SubGraphSH.

virtual SH_RC SH::Base::uninitSH  )  [virtual]
 

For symmetry only. Could be performed by the destructor as well. uninitSH() : Initialized -> Uninitialized

Reimplemented in SH::DummyLayerSinkSH, SH::DummyLayerSourceSH, SH::GstMpegDemuxSinkSH, SH::ConcatinizerSH, SH::FileSinkSH, SH::FileSourceSH, SH::RTPDecoderSH, SH::RTPEncoderSH, SH::RTPSinkSH, SH::RTPSourceSH, SH::NopIntegratedSH, SH::SendBlockSH, SH::ActiveSH, SH::PushPullSH, SH::NopSubGraphSH, SH::PullResizeSH, and SH::SubGraphSH.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:33 2005 for Komssys by doxygen 1.3.8