ccRTP 2.1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
RTPAudio Class Reference

This is the base session stack that will maintain all network audio activity. More...

#include <phone.h>

Inheritance diagram for RTPAudio:
Inheritance graph
[legend]
Collaboration diagram for RTPAudio:
Collaboration graph
[legend]

Public Member Functions

 RTPAudio ()
 
void exit (const char *reason)
 
void startRunning ()
 Activate stack and start service thread. More...
 
Socket::Error setMcastTTL (uint8 ttl)
 Set the value of the TTL field in the sent packets. More...
 
RTPDataChannel * getDSO (void)
 

Protected Member Functions

void disableStack (void)
 
void enableStack (void)
 
microtimeout_t getSchedulingTimeout (void)
 
void controlReceptionService (void)
 
void controlTransmissionService (void)
 
timeval getRTCPCheckInterval (void)
 
size_t dispatchDataPacket (void)
 
virtual void timerTick (void)
 
virtual bool isPendingData (microtimeout_t timeout)
 
virtual void run (void)
 Single runnable method for this RTP stacks, schedules outgoing and incoming RTP data and RTCP packets. More...
 
size_t takeInDataPacket (void)
 
size_t dispatchBYE (const std::string &str)
 
InetHostAddress getDataSender (tpport_t *port=NULL) const
 
size_t getNextDataPacketSize () const
 
size_t recvData (unsigned char *buffer, size_t len, InetHostAddress &na, tpport_t &tp)
 Receive data from the data channel/socket. More...
 
void setDataPeer (const InetAddress &host, tpport_t port)
 
size_t sendData (const unsigned char *const buffer, size_t len)
 
SOCKET getDataRecvSocket () const
 
bool isPendingControl (microtimeout_t timeout)
 
InetHostAddress getControlSender (tpport_t *port=NULL) const
 
size_t recvControl (unsigned char *buffer, size_t len, InetHostAddress &na, tpport_t &tp)
 Receive data from the control channel/socket. More...
 
void setControlPeer (const InetAddress &host, tpport_t port)
 
size_t sendControl (const unsigned char *const buffer, size_t len)
 
SOCKET getControlRecvSocket () const
 
Socket::Error joinGroup (const InetMcastAddress &ia, uint32 iface)
 Join a multicast group. More...
 
Socket::Error leaveGroup (const InetMcastAddress &ia)
 Leave a multicast group. More...
 
void endSocket ()
 

Protected Attributes

RTPDataChannel * dso
 
RTCPChannel * cso
 

Private Member Functions

void onGotHello (const SyncSource &src)
 
void onGotGoodbye (const SyncSource &src, const std::string &reason)
 

Private Attributes

unsigned groups
 
bool unicast
 
bool shutdown
 

Detailed Description

This is the base session stack that will maintain all network audio activity.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m RTP stack for network audio.

Definition at line 175 of file phone.h.

Constructor & Destructor Documentation

RTPAudio::RTPAudio ( )

Definition at line 37 of file rtp.cpp.

Member Function Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::controlReceptionService ( void  )
inlineprotectedinherited

Definition at line 523 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::controlTransmissionService ( void  )
inlineprotectedinherited

Definition at line 526 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::disableStack ( void  )
inlineprotectedinherited

Definition at line 514 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::dispatchBYE ( const std::string &  str)
inlineprotectedvirtualinherited

Reimplemented from TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >.

Definition at line 589 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::dispatchDataPacket ( void  )
inlineprotectedinherited

Definition at line 532 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::enableStack ( void  )
inlineprotectedinherited

Definition at line 517 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::endSocket ( )
inlineprotectedinherited

Definition at line 327 of file rtp.h.

void RTPAudio::exit ( const char *  reason)

Definition at line 48 of file rtp.cpp.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SOCKET TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getControlRecvSocket ( ) const
inlineprotectedinherited

Definition at line 279 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
InetHostAddress TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getControlSender ( tpport_t *  port = NULL) const
inlineprotectedinherited

Definition at line 249 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SOCKET TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getDataRecvSocket ( ) const
inlineprotectedinherited

Definition at line 237 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
InetHostAddress TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getDataSender ( tpport_t *  port = NULL) const
inlineprotectedinherited

Definition at line 203 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
RTPDataChannel* TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getDSO ( void  )
inlineinherited

Definition at line 191 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getNextDataPacketSize ( ) const
inlineprotectedinherited

Definition at line 207 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
timeval SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::getRTCPCheckInterval ( void  )
inlineprotectedinherited

Definition at line 529 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
microtimeout_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::getSchedulingTimeout ( void  )
inlineprotectedinherited

Definition at line 520 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
bool TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::isPendingControl ( microtimeout_t  timeout)
inlineprotectedinherited
Parameters
timeoutmaximum timeout to wait, in microseconds
Returns
whether there are packets waiting to be picked

Definition at line 245 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
virtual bool SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::isPendingData ( microtimeout_t  timeout)
inlineprotectedvirtualinherited

Definition at line 546 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
Socket::Error TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::joinGroup ( const InetMcastAddress &  ia,
uint32  iface 
)
inlineprotectedinherited

Join a multicast group.

Parameters
iaaddress of the multicast group
Returns
error code from the socket operation

Definition at line 289 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
Socket::Error TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::leaveGroup ( const InetMcastAddress &  ia)
inlineprotectedinherited

Leave a multicast group.

Parameters
iaaddress of the multicast group
Returns
error code from the socket operation

Definition at line 315 of file rtp.h.

void RTPAudio::onGotGoodbye ( const SyncSource src,
const std::string &  reason 
)
private

Definition at line 72 of file rtp.cpp.

void RTPAudio::onGotHello ( const SyncSource src)
private

Definition at line 57 of file rtp.cpp.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::recvControl ( unsigned char *  buffer,
size_t  len,
InetHostAddress &  na,
tpport_t &  tp 
)
inlineprotectedinherited

Receive data from the control channel/socket.

Parameters
bufferBuffer where to get data.
lenMaximum number of octets to get.
naSource network address.
tpSource transport port.
Returns
Number of octets actually read.

Definition at line 262 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::recvData ( unsigned char *  buffer,
size_t  len,
InetHostAddress &  na,
tpport_t &  tp 
)
inlineprotectedinherited

Receive data from the data channel/socket.

Parameters
bufferMemory region to read to.
lenMaximum number of octets to get.
naSource network address.
tpSource transport port.
Returns
Number of octets actually read.

Definition at line 220 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
virtual void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::run ( void  )
inlineprotectedvirtualinherited

Single runnable method for this RTP stacks, schedules outgoing and incoming RTP data and RTCP packets.

Definition at line 553 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::sendControl ( const unsigned char *const  buffer,
size_t  len 
)
inlineprotectedinherited
Returns
number of octets actually written
Parameters
buffer
len

Definition at line 276 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::sendData ( const unsigned char *const  buffer,
size_t  len 
)
inlineprotectedinherited
Parameters
buffermemory region to write from
lennumber of octets to write

Definition at line 234 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::setControlPeer ( const InetAddress &  host,
tpport_t  port 
)
inlineprotectedinherited

Definition at line 267 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::setDataPeer ( const InetAddress &  host,
tpport_t  port 
)
inlineprotectedinherited

Definition at line 225 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
Socket::Error TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::setMcastTTL ( uint8  ttl)
inlineinherited

Set the value of the TTL field in the sent packets.

Parameters
ttlTime To Live
Returns
error code from the socket operation

Definition at line 174 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::startRunning ( )
inlineinherited

Activate stack and start service thread.

Definition at line 508 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
size_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::takeInDataPacket ( void  )
inlineprotectedinherited

Definition at line 586 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
virtual void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::timerTick ( void  )
inlineprotectedvirtualinherited

Definition at line 543 of file rtp.h.

Field Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
RTCPChannel* TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::cso
protectedinherited

Definition at line 400 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
RTPDataChannel* TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::dso
protectedinherited

Definition at line 399 of file rtp.h.

unsigned RTPAudio::groups
private

Definition at line 178 of file phone.h.

bool RTPAudio::shutdown
private

Definition at line 180 of file phone.h.

bool RTPAudio::unicast
private

Definition at line 179 of file phone.h.


The documentation for this class was generated from the following files: