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

SH::RTPDecoderSH Class Reference
[StreamHandlers]

#include <MNRTPDecoderSH.h>

Inheritance diagram for SH::RTPDecoderSH:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

void set_payload_types (const SDP::PayloadTypeTable *ptt_ptr)
SH_RC push_decode (DataPtr item)
SH_RC pull_decode (DataPtr &item)
DataPtr evalLCRTPPacket (MNRTPPacketPtr packet, MNRope *&payload, u_int64_t &bytecount)
void tfrc_packet_received (MNRope *&payload, MNRTPPacketPtr packet)
void send_feedback (u_int32 ssrc, LCfeedb_tfrc_t *reply)
DataPtr evalRTPPacket (MNRTPPacketPtr packet, MNRope *&payload, u_int64_t &bytecount)
void evalSyncTimestamp (unsigned rtpTimestamp, struct timeval &resPT)
void evalSyncRTCP (u_int32 ntp_upper, u_int32 ntp_lower, u_int32 rtpTimestamp)
void resetSyncTime ()
 RTPDecoderSH (SHGraphManager *mgr, u_int32_t runtimeId, MNSelector &sel)
virtual ~RTPDecoderSH ()
virtual SH_RC initSH ()
virtual SH_RC uninitSH ()
virtual SH_RC startStreaming ()
virtual SH_RC stopStreaming ()
virtual SinkEndpoint ** getSinkSpecs ()
virtual SourceEndpoint ** getSourceSpecs ()
virtual bool isConnected () const

Protected Member Functions

virtual void pushReport (ReportPtr report, Base::Direction d)

Protected Attributes

SinkEndpoint_in_ep_a [1]
SourceEndpoint_out_ep_a [1]
RTPDecoderSinkEndpoint _inEP
RTPDecoderSourceEndpoint _outEP

Detailed Description

The class implements a stream handler that decodes RTP packets. It operates as a through stream handler, although has several timers.

It takes the configuration attributes


Constructor & Destructor Documentation

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

virtual SH::RTPDecoderSH::~RTPDecoderSH  )  [virtual]
 


Member Function Documentation

DataPtr SH::RTPDecoderSH::evalLCRTPPacket MNRTPPacketPtr  packet,
MNRope *&  payload,
u_int64_t &  bytecount
 

In the non-LC case, packet processing needs on calling of the decoding functions. In the LC case, this function is called because lists need to be updated and the bytecount must be maintained. When this function is called, the packet will not contain the payload any more. The reason is that this function is called in a loop until all payload is consumed by the decoder, but extracting from the packet is possible only once.

Parameters:
packet The arriving packet without its payload.
payload INOUT variable. The payload that has been extracted from the packet. The function can be called repeatedly until this pointer is NULL or payload->size() is 0.
bytecount OUT variable. The bytecount for this extracted part of the payload, if successfully returned.
Returns:
Either DataPtr.isNull() or it referes to one decoded block of payload that has also been removed from the payload rope.

DataPtr SH::RTPDecoderSH::evalRTPPacket MNRTPPacketPtr  packet,
MNRope *&  payload,
u_int64_t &  bytecount
 

This function is similar to evalLCRTPPacket, with the difference that a different data structure SHRTPData is set up containing timing and synchronization information together with the decoded block of payload. The function will also collect fragments by saving decoded data in a member rope until the payload decoder tells a frame has been completed. Decoding is done by calling evalLCRTPPacket so hopefully none of LCretrans stuff will be broken.

See also:
evalLCRTPPacket
Returns:
DataPtr.isNull() if a frame has not been completed yet or a pointer to an SHRTPData containing relevant RTP information together with one decoded data frame/sample.

void SH::RTPDecoderSH::evalSyncRTCP u_int32  ntp_upper,
u_int32  ntp_lower,
u_int32  rtpTimestamp
 

This function evaluates the NTP timestamp contained in the RTCP packet in relation to the RTP timestamp (also in RTCP). Doing so, a wallclock time for presentation can be derived.

Parameters:
ntp_upper MSW of NTP timestamp
ntp_lower LSW of NTP timestamp
rtpTimestamp RTP timestamp

void SH::RTPDecoderSH::evalSyncTimestamp unsigned  rtpTimestamp,
struct timeval &  resPT
 

This function calculates the presentation time of a frame from RTP and, if available, RTCP timestamps.

Parameters:
rtpTimestamp timestamp of RTP header
resPT OUT variable containing the calculated presentation time as of type struct timeval

virtual SinkEndpoint** SH::RTPDecoderSH::getSinkSpecs  )  [virtual]
 

Provide a list of valid sink endpoint specifications to the graph manager.
getSinkPorts() is called by the graph manager and returns an array of pointers to EndpointSpec structures, or NULL if no endpoints in this direction are supported. It is typical that the length of such an array is 1, because several alternatives are specified by one EndpointSpec object, and the maximum number of identical Endpoints is a parameter of the EndpointSpec as well. The maximum number of endpoints may be dynamic, e.g. in an RTP source SH, new SSRCs or PTs will result in the provision of a new Endpoint. The array of endpoint specs is not NULL terminated, it is expected that the application knows the number of endpoints from numSinkSpecs().

Returns:
An array of endpoint specification.

Implements SH::Status.

virtual SourceEndpoint** SH::RTPDecoderSH::getSourceSpecs  )  [virtual]
 

Provide a list of valid source endpoint specifications to the graph manager.
getSourceSpecs() works like getSinkSpecs() but on the source endpoint specifications.

Returns:
An array of endpoint specification.

Implements SH::Status.

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

See also:
SH

Reimplemented from SH::Base.

virtual bool SH::RTPDecoderSH::isConnected  )  const [virtual]
 

Indicate whether a sufficient number of endpoints are connected for the stream handler to be active.
True if a sufficient number of endpoints is connected for the stream handler to operate in a graph. This should always be true when the stream handler is part of an active graph. This can be called on all stream handlers of a graph to determine whether it will activate successfully.

Implements SH::Status.

SH_RC SH::RTPDecoderSH::pull_decode DataPtr item  ) 
 

SH_RC SH::RTPDecoderSH::push_decode DataPtr  item  ) 
 

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

void SH::RTPDecoderSH::resetSyncTime  )  [inline]
 

reset the presentation timestamp Darwin server (maybe others?) rearranges RTP timestamps after seeking

void SH::RTPDecoderSH::send_feedback u_int32  ssrc,
LCfeedb_tfrc_t reply
 

void SH::RTPDecoderSH::set_payload_types const SDP::PayloadTypeTable ptt_ptr  ) 
 

Some decoders, above all of dynamic payload types, need information given in the payload type table. Thus, this table must be set here to be instantiated with the decoder factory.

Parameters:
ptt_ptr Pointer to the corresponding payload type table.

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

See also:
SH

Reimplemented from SH::Base.

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

See also:
SH

Reimplemented from SH::Base.

void SH::RTPDecoderSH::tfrc_packet_received MNRope *&  payload,
MNRTPPacketPtr  packet
 

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

See also:
SH

Reimplemented from SH::Base.


Member Data Documentation

SinkEndpoint* SH::RTPDecoderSH::_in_ep_a[1] [protected]
 

RTPDecoderSinkEndpoint SH::RTPDecoderSH::_inEP [protected]
 

SourceEndpoint* SH::RTPDecoderSH::_out_ep_a[1] [protected]
 

RTPDecoderSourceEndpoint SH::RTPDecoderSH::_outEP [protected]
 


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