Yate
|
Low level transport for RTP and RTCP. More...
#include <yatertp.h>
Public Types | |
enum | Activation { Inactive, Bound, Active } |
enum | Type { Unknown, RTP, UDPTL } |
Public Member Functions | |
RTPTransport (Type type=RTP) | |
virtual | ~RTPTransport () |
void | setProcessor (RTPProcessor *processor=0) |
void | setMonitor (RTPProcessor *monitor=0) |
const SocketAddr & | localAddr () const |
const SocketAddr & | remoteAddr () const |
bool | localAddr (SocketAddr &addr, bool rtcp=true) |
bool | remoteAddr (SocketAddr &addr, bool sniff=false) |
bool | setTOS (int tos) |
Socket * | rtpSock () |
Socket * | rtcpSock () |
bool | drillHole () |
Protected Member Functions | |
virtual void | timerTick (const Time &when) |
virtual void | rtpData (const void *data, int len) |
virtual void | rtcpData (const void *data, int len) |
Low level transport for RTP and RTCP.
Class that holds sockets and addresses for transporting RTP and RTCP packets.
enum Activation |
Activation status of the transport
enum Type |
Type of transported data
RTPTransport | ( | Type | type = RTP | ) |
Constructor, creates an unconnected transport
type | Type of check to apply to the data |
virtual ~RTPTransport | ( | ) | [virtual] |
Destructor
bool drillHole | ( | ) |
Drill a hole in a firewall or NAT for the RTP and RTCP sockets
const SocketAddr& localAddr | ( | ) | const [inline] |
Get the local network address of the RTP transport
bool localAddr | ( | SocketAddr & | addr, |
bool | rtcp = true |
||
) |
Set the local network address of the RTP transport
addr | New local RTP transport address |
rtcp | Enable RTCP transport |
const SocketAddr& remoteAddr | ( | ) | const [inline] |
Get the remote network address of the RTP transport
bool remoteAddr | ( | SocketAddr & | addr, |
bool | sniff = false |
||
) |
Set the remote network address of the RTP transport
addr | New remote RTP transport address |
sniff | Automatically adjust the address from the first incoming packet |
virtual void rtcpData | ( | const void * | data, |
int | len | ||
) | [protected, virtual] |
This method is called to send a RTCP packet
data | Pointer to raw RTCP data |
len | Length of the data packet |
Reimplemented from RTPProcessor.
Get the RTCP socket used by this transport
virtual void rtpData | ( | const void * | data, |
int | len | ||
) | [protected, virtual] |
This method is called to send a RTP packet
data | Pointer to raw RTP data |
len | Length of the data packet |
Reimplemented from RTPProcessor.
Get the RTP socket used by this transport
void setMonitor | ( | RTPProcessor * | monitor = 0 | ) |
Set the RTP/RTCP monitor of data received by this transport
monitor | A pointer to a second RTPProcessor for this transport |
void setProcessor | ( | RTPProcessor * | processor = 0 | ) |
Set the RTP/RTCP processor of data received by this transport
processor | A pointer to the RTPProcessor for this transport |
bool setTOS | ( | int | tos | ) | [inline] |
Set the Type Of Service for the RTP socket
tos | Type Of Service bits to set |
Method called periodically to read data out of sockets
when | Time to use as base in all computing |
Implements RTPProcessor.