ccRTP 2.1.2
Public Member Functions | Protected Member Functions | Protected Attributes
SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue > Class Template Reference
RTP sessions.

This template class adds the threading aspect to the RTPSessionBase template in one of the many possible ways. More...

#include <rtp.h>

Inheritance diagram for SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >:
Inheritance graph
[legend]
Collaboration diagram for SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >:
Collaboration graph
[legend]

Public Member Functions

  SingleThreadRTPSession (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication())
 
  SingleThreadRTPSession (uint32 ssrc, const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication())
 
  SingleThreadRTPSession (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication(), uint32 iface=0)
 
  SingleThreadRTPSession (uint32 ssrc, const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication(), uint32 iface=0)
 
 
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)
 
 
 
 
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
 
 
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
 

Detailed Description

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
class SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >

This template class adds the threading aspect to the RTPSessionBase template in one of the many possible ways.

It inherits from a single execution thread that schedules sending of outgoing packets and receipt of incoming packets.

Author
Federico Montesino Pouzols fedem.nosp@m.p@al.nosp@m.tern..nosp@m.org

Definition at line 418 of file rtp.h.

Constructor & Destructor Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession ( const InetHostAddress &  ia,
tpport_t  dataPort = DefaultRTPDataPort ,
tpport_t  controlPort = 0,
int  pri = 0,
)
inline

Definition at line 423 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession ( uint32  ssrc,
const InetHostAddress &  ia,
tpport_t  dataPort = DefaultRTPDataPort ,
tpport_t  controlPort = 0,
int  pri = 0,
)
inline

Definition at line 440 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession ( const InetMcastAddress &  ia,
tpport_t  dataPort = DefaultRTPDataPort ,
tpport_t  controlPort = 0,
int  pri = 0,
uint32  iface = 0 
)
inline

Definition at line 457 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession ( uint32  ssrc,
const InetMcastAddress &  ia,
tpport_t  dataPort = DefaultRTPDataPort ,
tpport_t  controlPort = 0,
int  pri = 0,
uint32  iface = 0 
)
inline

Definition at line 475 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::~SingleThreadRTPSession ( )
inline

Definition at line 494 of file rtp.h.

Member Function Documentation

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

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  )
inlineprotected

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  )
inlineprotected

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 )
inlineprotectedvirtual

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  )
inlineprotected

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  )
inlineprotected

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  )
inlineprotected

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  )
inlineprotected

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
timeout maximum 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 )
inlineprotectedvirtual

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
ia address 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
ia address of the multicast group
Returns
error code from the socket operation

Definition at line 315 of file rtp.h.

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
buffer Buffer where to get data.
len Maximum number of octets to get.
na Source network address.
tp Source 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
buffer Memory region to read to.
len Maximum number of octets to get.
na Source network address.
tp Source 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  )
inlineprotectedvirtual

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
buffer memory region to write from
len number 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
ttl Time 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 ( )
inline

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  )
inlineprotected

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  )
inlineprotectedvirtual

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:

Generated on Dec 15, 2017 for ccrtp-2.1.2 (*.h and *.cpp) and libzrtpcpp-2.3.4 (*.h), by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /