class RTPReceiver

RTP/RTCP packet receiver. More...

Full nameTelEngine::RTPReceiver
Definition#include <libs/yrtp/yatertp.h>
InheritsTelEngine::RTPBaseIO [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

Class that handles incoming RTP and RTCP packets

inline  RTPReceiver (RTPSession* session = 0)

RTPReceiver

Constructor

 ~RTPReceiver ()

~RTPReceiver

[virtual]

Destructor - gets rid of the jitter buffer if present

inline u_int32_t  ioPacketsLost ()

ioPacketsLost

[const]

Retrieve the number of lost packets in current session

Returns: Number of packets in sequence gaps

void  setDejitter (RTPDejitter* dejitter)

setDejitter

Set a new dejitter buffer in this receiver

Parameters:
dejitterNew dejitter buffer to set, NULL to remove

inline void  setDejitter (unsigned int mindelay, unsigned int maxdelay)

setDejitter

Allocate and set a new dejitter buffer in this receiver

Parameters:
mindelayMinimum length of the dejitter buffer in microseconds
maxdelayMaximum length of the dejitter buffer in microseconds

bool  rtpRecv (bool marker, int payload, unsigned int timestamp, const void* data, int len)

rtpRecv

[virtual]

Process one RTP payload packet. Default behaviour is to call rtpRecvData() or rtpRecvEvent().

Parameters:
markerSet to true if the marker bit is set
payloadPayload number
timestampSampling instant of the packet data
dataPointer to data block to process
lenLength of the data block in bytes

Returns: True if data was handled

bool  rtpRecvData (bool marker, unsigned int timestamp, const void* data, int len)

rtpRecvData

[virtual]

Process one RTP data packet

Parameters:
markerSet to true if the marker bit is set
timestampSampling instant of the packet data
dataPointer to data block to process
lenLength of the data block in bytes

Returns: True if data was handled

bool  rtpRecvEvent (int event, char key, int duration, int volume, unsigned int timestamp)

rtpRecvEvent

[virtual]

Process one RTP event

Parameters:
eventReceived event code
keyReceived key (for events 0-16) or zero
durationDuration of the event as number of samples
volumeAttenuation of the tone, zero for don't care
timestampSampling instant of the initial packet data

Returns: True if data was handled

void  rtpNewPayload (int payload, unsigned int timestamp)

rtpNewPayload

[virtual]

Method called for unknown payload types just before attempting to call rtpRecvData(). This is a good opportunity to change the payload type and continue.

Parameters:
payloadPayload number
timestampSampling instant of the unexpected packet data

void  rtpNewSSRC (u_int32_t newSsrc, bool marker)

rtpNewSSRC

[virtual]

Method called when a packet with an unexpected SSRC is received just before processing further. This is a good opportunity to change the SSRC and continue

Parameters:
newSsrcSSRC received in packet
markerTrue if marker bit is set in the RTP packet

void  stats (NamedList& stat)

stats

[const virtual]

Retrieve the statistical data from this receiver in a NamedList. Reset all the data.

Parameters:
statNamedList to populate with the values for different counters

void  timerTick (const Time& when)

timerTick

[protected virtual]

Method called periodically to finish lingering events

Parameters:
whenTime to use as base in all computing

Reimplemented from RTPBaseIO.

bool  rtpDecipher (unsigned char* data, int len, const void* secData, u_int32_t ssrc, u_int64_t seq)

rtpDecipher

[protected virtual]

Method called to decipher RTP data in-place. The default implementation calls session's RTPSecure::rtpDecipher()

Parameters:
dataPointer to data block to decipher
lenLength of data including any padding
secDataPointer to security data if applicable
ssrcSSRC of the packet to decipher
seqFull (48 bit) seqence number of the packet including rollovers

Returns: True is the packet was deciphered correctly or can't tell

bool  rtpCheckIntegrity (const unsigned char* data, int len, const void* authData, u_int32_t ssrc, u_int64_t seq)

rtpCheckIntegrity

[protected virtual]

Method called to check the integrity of the RTP packet. The default implementation calls session's RTPSecure::rtpCheckIntegrity()

Parameters:
dataPointer to RTP header and data
lenLength of header, data and padding
authDataPointer to authentication data
ssrcSSRC of the packet to validate
seqFull (48 bit) seqence number of the packet including rollovers

Returns: True is the packet passed integrity checks

u_int32_t m_ioLostPkt

m_ioLostPkt

[protected]


Generated by: paulc on bussard on Fri Apr 1 18:17:10 2011, using kdoc 2.0a54.