EMIPLIB  1.2.1
Public Member Functions | Protected Member Functions | List of all members
MIPRTPDecoder Class Reference

A base class for RTP decoding objects. More...

#include <miprtpdecoder.h>

Inheritance diagram for MIPRTPDecoder:
Inheritance graph
[legend]
Collaboration diagram for MIPRTPDecoder:
Collaboration graph
[legend]

Public Member Functions

bool init (bool calcStreamTime=true, MIPRTPSynchronizer *pSynchronizer=0, jrtplib::RTPSession *pRTPSess=0, MIPTime fixedJitterBuffer=MIPTime(0))
 Initializes the RTP decoder. More...
 
bool setDefaultPacketDecoder (MIPRTPPacketDecoder *pDec)
 Installs a default RTP packet decoder (for all payload types). More...
 
bool setPacketDecoder (uint8_t payloadType, MIPRTPPacketDecoder *pDec)
 Installs an RTP packet decoder for a specific payload type. More...
 
void setMaximumJitterBuffering (MIPTime t)
 Sets the maximum amount of jitter buffering that may be done. More...
 
- Public Member Functions inherited from MIPComponent
virtual void lock ()
 Locks the current component. More...
 
virtual void unlock ()
 Unlocks the current component. More...
 
std::string getComponentName () const
 Returns the name of the component. More...
 
- Public Member Functions inherited from MIPErrorBase
std::string getErrorString () const
 Returns the last known error description. More...
 

Protected Member Functions

virtual void onNewMediaMessage (uint32_t ssrc, uint32_t rtpTimestamp, MIPMediaMessage *pMsg)
 This virtual function is called when a new MIPMediaMessage is produced by an MIPRTPPacketDecoder instance. More...
 
- Protected Member Functions inherited from MIPComponent
 MIPComponent (const std::string &componentName)
 Create a component with the specified name. More...
 
- Protected Member Functions inherited from MIPErrorBase
void setErrorString (const std::string &str) const
 Stores an error description. More...
 

Detailed Description

This class provides some general functions for decoding RTP packets. It analyzes The RTP timestamps, recreates the output streams and introduces some jitter buffering if necessary. It requires feedback about some kind of output stream, like the one the MIPAudioMixer component generates. The component accepts MIPRTPReceiveMessage objects; a derived class must implement the message generation code, therefore it is the derived class that decides which messages can be generated.

Member Function Documentation

bool MIPRTPDecoder::init ( bool  calcStreamTime = true,
MIPRTPSynchronizer pSynchronizer = 0,
jrtplib::RTPSession *  pRTPSess = 0,
MIPTime  fixedJitterBuffer = MIPTime(0) 
)

Using this function, the RTP decoder can be initialized.

Parameters
calcStreamTimeIf set to true, the decoder will calculate the position of the received packets in the output stream. For this feature to work, the decoder must receive feedback from a mixer.
pSynchronizerIf a non-null pointer is passed, the object will be used to synchronize different streams from the same participant.
pRTPSessIf specified, the timestamp unit returned by an MIPRTPPacketDecoder instance will be stored in the RTPSourceData instance of the corresponding SSRC.
fixedJitterBufferIf larger than zero, a fixed amount (which will never be adjusted) will be used as the jitter buffer.
virtual void MIPRTPDecoder::onNewMediaMessage ( uint32_t  ssrc,
uint32_t  rtpTimestamp,
MIPMediaMessage pMsg 
)
inlineprotectedvirtual
bool MIPRTPDecoder::setDefaultPacketDecoder ( MIPRTPPacketDecoder pDec)

Installs a default RTP packet decoder. Use a null pointer to clear all entries.

void MIPRTPDecoder::setMaximumJitterBuffering ( MIPTime  t)
inline

Sets the maximum amount of jitter buffering that may be done. Set it to a negative value (default setting) to allow unconstrained jitter buffering.

bool MIPRTPDecoder::setPacketDecoder ( uint8_t  payloadType,
MIPRTPPacketDecoder pDec 
)

Installs an RTP packet decoder for a specific payload type. Use a null pointer to clear this particular entry.


The documentation for this class was generated from the following file: