|
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, DebugEnabler *dbg=0, const char *traceId=0) | |
| virtual | ~RTPTransport () |
| virtual void | destruct () |
| 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 | setBuffer (int bufLen=4096) |
| bool | setTOS (int tos) |
| Socket * | rtpSock () |
| Socket * | rtcpSock () |
| bool | drillHole () |
Public Member Functions inherited from RTPProcessor | |
| RTPProcessor (DebugEnabler *dbg=0, const char *traceId=0) | |
| virtual | ~RTPProcessor () |
| RTPGroup * | group () const |
| virtual void | getStats (String &stats) const |
| virtual void | incWrongSrc () |
| unsigned int | wrongSrc () |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual bool | alive () const |
| virtual const String & | toString () const |
| virtual const String & | traceId () const |
| virtual void * | getObject (const String &name) const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from RTPDebug | |
| RTPDebug (DebugEnabler *dbg, const char *traceId) | |
| RTPDebug (RTPSession *session) | |
| DebugEnabler * | dbg () const |
| const String & | dbgTraceId () const |
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) |
Protected Member Functions inherited from RTPProcessor | |
| void | group (RTPGroup *newgrp) |
Protected Member Functions inherited from RTPDebug | |
| void | setDebug (DebugEnabler *dbg, const char *traceId) |
Additional Inherited Members | |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Protected Attributes inherited from RTPProcessor | |
| unsigned int | m_wrongSrc |
Protected Attributes inherited from RTPDebug | |
| DebugEnabler * | m_dbg |
| String | m_traceId |
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
| RTPTransport | ( | Type | type = RTP, |
| DebugEnabler * | dbg = 0, | ||
| const char * | traceId = 0 ) |
Constructor, creates an unconnected transport
| type | Type of check to apply to the data |
| dbg | Transport DebugEnabler |
| traceId | Transport trace ID |
References RTPDebug::dbg(), and GenObject::traceId().
|
virtual |
Destructor
|
virtual |
Destroys the object, disposes the memory. Do not call delete directly.
Reimplemented from GenObject.
| bool drillHole | ( | ) |
Drill a hole in a firewall or NAT for the RTP and RTCP sockets
|
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 |
|
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 |
|
protectedvirtual |
This method is called to send a RTCP packet
| data | Pointer to raw RTCP data |
| len | Length of the data packet |
Reimplemented from RTPProcessor.
References RTPProcessor::RTPProcessor().
|
inline |
Get the RTCP socket used by this transport
|
protectedvirtual |
This method is called to send a RTP packet
| data | Pointer to raw RTP data |
| len | Length of the data packet |
Reimplemented from RTPProcessor.
|
inline |
Get the RTP socket used by this transport
| bool setBuffer | ( | int | bufLen = 4096 | ) |
Set the size of the operating system's buffers for the RTP and RTCP sockets
| bufLen | Requested length of the buffer |
| 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 |
References RTPProcessor::RTPProcessor().
| 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 |
References RTPProcessor::RTPProcessor().
|
inline |
|
protectedvirtual |
Method called periodically to read data out of sockets
| when | Time to use as base in all computing |
Implements RTPProcessor.