|
Yate
|
RTP/RTCP packet receiver. More...
#include <yatertp.h>
Public Member Functions | |
| RTPReceiver (RTPSession *session=0) | |
| virtual | ~RTPReceiver () |
| u_int32_t | ioPacketsLost () const |
| void | setDejitter (RTPDejitter *dejitter) |
| void | setDejitter (unsigned int mindelay, unsigned int maxdelay) |
| virtual bool | rtpRecv (bool marker, int payload, unsigned int timestamp, const void *data, int len) |
| virtual bool | rtpRecvData (bool marker, unsigned int timestamp, const void *data, int len) |
| virtual bool | rtpRecvEvent (int event, char key, int duration, int volume, unsigned int timestamp) |
| virtual void | rtpNewPayload (int payload, unsigned int timestamp) |
| virtual void | rtpNewSSRC (u_int32_t newSsrc, bool marker) |
| virtual void | stats (NamedList &stat) const |
Protected Member Functions | |
| virtual void | timerTick (const Time &when) |
| virtual bool | rtpDecipher (unsigned char *data, int len, const void *secData, u_int32_t ssrc, u_int64_t seq) |
| virtual bool | rtpCheckIntegrity (const unsigned char *data, int len, const void *authData, u_int32_t ssrc, u_int64_t seq) |
Protected Attributes | |
| u_int32_t | m_ioLostPkt |
Friends | |
| class | RTPSession |
| class | RTPDejitter |
RTP/RTCP packet receiver.
Class that handles incoming RTP and RTCP packets
| RTPReceiver | ( | RTPSession * | session = 0 | ) | [inline] |
Constructor
| virtual ~RTPReceiver | ( | ) | [virtual] |
Destructor - gets rid of the jitter buffer if present
| u_int32_t ioPacketsLost | ( | ) | const [inline] |
Retrieve the number of lost packets in current session
| virtual bool rtpCheckIntegrity | ( | const unsigned char * | data, |
| int | len, | ||
| const void * | authData, | ||
| u_int32_t | ssrc, | ||
| u_int64_t | seq | ||
| ) | [protected, virtual] |
Method called to check the integrity of the RTP packet. The default implementation calls session's RTPSecure::rtpCheckIntegrity()
| data | Pointer to RTP header and data |
| len | Length of header, data and padding |
| authData | Pointer to authentication data |
| ssrc | SSRC of the packet to validate |
| seq | Full (48 bit) seqence number of the packet including rollovers |
| virtual bool rtpDecipher | ( | unsigned char * | data, |
| int | len, | ||
| const void * | secData, | ||
| u_int32_t | ssrc, | ||
| u_int64_t | seq | ||
| ) | [protected, virtual] |
Method called to decipher RTP data in-place. The default implementation calls session's RTPSecure::rtpDecipher()
| data | Pointer to data block to decipher |
| len | Length of data including any padding |
| secData | Pointer to security data if applicable |
| ssrc | SSRC of the packet to decipher |
| seq | Full (48 bit) seqence number of the packet including rollovers |
| virtual void rtpNewPayload | ( | int | payload, |
| unsigned int | timestamp | ||
| ) | [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.
| payload | Payload number |
| timestamp | Sampling instant of the unexpected packet data |
| virtual void rtpNewSSRC | ( | u_int32_t | newSsrc, |
| bool | marker | ||
| ) | [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
| newSsrc | SSRC received in packet |
| marker | True if marker bit is set in the RTP packet |
| virtual bool rtpRecv | ( | bool | marker, |
| int | payload, | ||
| unsigned int | timestamp, | ||
| const void * | data, | ||
| int | len | ||
| ) | [virtual] |
Process one RTP payload packet. Default behaviour is to call rtpRecvData() or rtpRecvEvent().
| marker | Set to true if the marker bit is set |
| payload | Payload number |
| timestamp | Sampling instant of the packet data |
| data | Pointer to data block to process |
| len | Length of the data block in bytes |
| virtual bool rtpRecvData | ( | bool | marker, |
| unsigned int | timestamp, | ||
| const void * | data, | ||
| int | len | ||
| ) | [virtual] |
Process one RTP data packet
| marker | Set to true if the marker bit is set |
| timestamp | Sampling instant of the packet data |
| data | Pointer to data block to process |
| len | Length of the data block in bytes |
| virtual bool rtpRecvEvent | ( | int | event, |
| char | key, | ||
| int | duration, | ||
| int | volume, | ||
| unsigned int | timestamp | ||
| ) | [virtual] |
Process one RTP event
| event | Received event code |
| key | Received key (for events 0-16) or zero |
| duration | Duration of the event as number of samples |
| volume | Attenuation of the tone, zero for don't care |
| timestamp | Sampling instant of the initial packet data |
| void setDejitter | ( | RTPDejitter * | dejitter | ) |
Set a new dejitter buffer in this receiver
| dejitter | New dejitter buffer to set, NULL to remove |
| void setDejitter | ( | unsigned int | mindelay, |
| unsigned int | maxdelay | ||
| ) | [inline] |
Allocate and set a new dejitter buffer in this receiver
| mindelay | Minimum length of the dejitter buffer in microseconds |
| maxdelay | Maximum length of the dejitter buffer in microseconds |
References RTPReceiver::setDejitter().
Referenced by RTPReceiver::setDejitter().
1.7.6.1