RTP/RTCP packet sender.
More...
#include <yatertp.h>
List of all members.
Public Member Functions |
| RTPSender (RTPSession *session=0, bool randomTs=true) |
virtual | ~RTPSender () |
bool | rtpSend (bool marker, int payload, unsigned int timestamp, const void *data, int len) |
bool | rtpSendData (bool marker, unsigned int timestamp, const void *data, int len) |
bool | rtpSendEvent (int event, int duration, int volume=0, unsigned int timestamp=0) |
bool | rtpSendKey (char key, int duration, int volume=0, unsigned int timestamp=0) |
int | padding () const |
bool | padding (int chunk) |
virtual void | stats (NamedList &stat) const |
Protected Member Functions |
virtual void | timerTick (const Time &when) |
virtual void | rtpEncipher (unsigned char *data, int len) |
virtual void | rtpAddIntegrity (const unsigned char *data, int len, unsigned char *authData) |
Detailed Description
RTP/RTCP packet sender.
Class that builds and sends RTP and RTCP packets
Constructor & Destructor Documentation
Constructor
- Parameters:
-
session | RTP session the sender belongs |
randomTs | Initialize a random timestamp offset |
Member Function Documentation
Get the payload padding size
- Returns:
- Chunk size to pad the payload to a multiple of
Set the padding to a multiple of a data chunk
- Parameters:
-
chunk | Size to pad the payload to a multiple of |
- Returns:
- True if the new chunk size is valid
virtual void rtpAddIntegrity |
( |
const unsigned char * |
data, |
|
|
int |
len, |
|
|
unsigned char * |
authData |
|
) |
| [protected, virtual] |
Method called to add integrity information to the RTP packet. The default implementation calls session's RTPSecure::rtpAddIntegrity()
- Parameters:
-
data | Pointer to the RTP packet to protect |
len | Length of RTP data to be encrypted including header and padding |
authData | Address to write the integrity data to |
virtual void rtpEncipher |
( |
unsigned char * |
data, |
|
|
int |
len |
|
) |
| [protected, virtual] |
Method called to encipher RTP payload data in-place. The default implementation calls session's RTPSecure::rtpEncipher()
- Parameters:
-
data | Pointer to data block to encipher |
len | Length of payload data to be encrypted including any padding |
bool rtpSend |
( |
bool |
marker, |
|
|
int |
payload, |
|
|
unsigned int |
timestamp, |
|
|
const void * |
data, |
|
|
int |
len |
|
) |
| |
Send one RTP payload packet
- Parameters:
-
marker | Set to true if the marker bit must be set |
payload | Payload number |
timestamp | Sampling instant of the packet data |
data | Pointer to data block to send |
len | Length of the data block |
- Returns:
- True if data sending was attempted
bool rtpSendData |
( |
bool |
marker, |
|
|
unsigned int |
timestamp, |
|
|
const void * |
data, |
|
|
int |
len |
|
) |
| |
Send one RTP data packet
- Parameters:
-
marker | Set to true if the marker bit must be set |
timestamp | Sampling instant of the packet data |
data | Pointer to data block to send |
len | Length of the data block |
- Returns:
- True if data sending was attempted
bool rtpSendEvent |
( |
int |
event, |
|
|
int |
duration, |
|
|
int |
volume = 0 , |
|
|
unsigned int |
timestamp = 0 |
|
) |
| |
Send one RTP event
- Parameters:
-
event | Event code to send |
duration | Duration of the event as number of samples |
volume | Attenuation of the tone, zero for don't care |
timestamp | Sampling instant of the packet data, zero to use current |
- Returns:
- True if data sending was attempted
bool rtpSendKey |
( |
char |
key, |
|
|
int |
duration, |
|
|
int |
volume = 0 , |
|
|
unsigned int |
timestamp = 0 |
|
) |
| |
Send one RTP key event
- Parameters:
-
key | Key to send |
duration | Duration of the event as number of samples |
volume | Attenuation of the tone, zero for don't care |
timestamp | Sampling instant of the packet data, zero to use current |
- Returns:
- True if data sending was attempted
Retrieve the statistical data from this receiver in a NamedList. Reset all the data.
- Parameters:
-
stat | NamedList to populate with the values for different counters |
Method called periodically to send events and buffered data
- Parameters:
-
when | Time to use as base in all computing |
Implements RTPBaseIO.
The documentation for this class was generated from the following file: