ccRTP 2.1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes
Listener Class Reference
Inheritance diagram for Listener:
Inheritance graph
[legend]
Collaboration diagram for Listener:
Collaboration graph
[legend]

Public Member Functions

 Listener (InetMcastAddress &ima, tpport_t port)
 
 Listener (InetHostAddress &ia, tpport_t port)
 
void listen ()
 
void onNewSyncSource (const SyncSource &src)
 
void onGotSR (SyncSource &source, SendReport &SR, uint8 blocks)
 
void onGotRR (SyncSource &source, RecvReport &RR, uint8 blocks)
 
bool onGotSDESChunk (SyncSource &source, SDESChunk &chunk, size_t len)
 
void onGotGoodbye (const SyncSource &source, const std::string &reason)
 

Private Member Functions

void startRunning ()
 Activate stack and start service thread. More...
 
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)
 
Socket::Error setMcastTTL (uint8 ttl)
 Set the value of the TTL field in the sent packets. More...
 
RTPDataChannel * getDSO (void)
 
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 ()
 

Private Attributes

RTPDataChannel * dso
 
RTCPChannel * cso
 

Detailed Description

Definition at line 27 of file rtplisten.cpp.

Constructor & Destructor Documentation

Listener::Listener ( InetMcastAddress &  ima,
tpport_t  port 
)
inline

Definition at line 30 of file rtplisten.cpp.

Listener::Listener ( InetHostAddress &  ia,
tpport_t  port 
)
inline

Definition at line 33 of file rtplisten.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.

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 Listener::listen ( )
inline

Definition at line 36 of file rtplisten.cpp.

void Listener::onGotGoodbye ( const SyncSource source,
const std::string &  reason 
)
inline

Definition at line 111 of file rtplisten.cpp.

void Listener::onGotRR ( SyncSource source,
RecvReport &  RR,
uint8  blocks 
)
inline

Definition at line 86 of file rtplisten.cpp.

bool Listener::onGotSDESChunk ( SyncSource source,
SDESChunk &  chunk,
size_t  len 
)
inline

Definition at line 97 of file rtplisten.cpp.

void Listener::onGotSR ( SyncSource source,
SendReport &  SR,
uint8  blocks 
)
inline

Definition at line 75 of file rtplisten.cpp.

void Listener::onNewSyncSource ( const SyncSource src)
inline

Definition at line 68 of file rtplisten.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.


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