Bayonne2 / Common C++ 2 Framework
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue > Class Template Reference
RTP sessions.

#include <rtp.h>

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

Public Member Functions

  TRTPSessionBase (const InetHostAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app)
  Builds a session waiting for packets in a host address. More...
 
  TRTPSessionBase (uint32 ssrc, const InetHostAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app)
  Builds a session with the specified ssrc identifier for the local source. More...
 
  TRTPSessionBase (const InetMcastAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app, uint32 iface)
  Builds a session waiting for packets in a multicast address. More...
 
  TRTPSessionBase (uint32 ssrc, const InetMcastAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app, uint32 iface)
  Builds a session waiting for packets in a multicast address, with the specified ssrc identifier for the local source. More...
 
virtual size_t  dispatchBYE (const std::string &str)
 
Socket::Error  setMcastTTL (uint8 ttl)
  Set the value of the TTL field in the sent packets. More...
 
virtual  ~TRTPSessionBase ()
 
RTPDataChannel *  getDSO (void)
 

Protected Member Functions

bool  isPendingData (microtimeout_t timeout)
 
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)
 
 
 
 
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::Error  joinGroup (const InetMcastAddress &ia, uint32 iface)
  Join a multicast group. More...
 
  Leave a multicast group. More...
 
void  endSocket ()
 

Protected Attributes

RTPDataChannel *  dso
 
RTCPChannel *  cso
 

Private Member Functions

void  build (const InetHostAddress &ia, tpport_t dataPort, tpport_t controlPort)
 
void  build (const InetMcastAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 iface)
 
  Ensure a port number is odd. More...
 
  Ensure a port number is even. More...
 

Private Attributes

 
 

Friends

 

Detailed Description

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

Definition at line 88 of file rtp.h.

Constructor & Destructor Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::TRTPSessionBase ( const InetHostAddressia,
tpport_t  dataPort,
tpport_t  controlPort,
uint32  membersSize,
RTPApplicationapp 
)
inline

Builds a session waiting for packets in a host address.

Parameters
ia Network address this socket is to be bound.
dataPort Transport port the data socket is to be bound.
controlPort Transport port the control socket is to be bound.
membersSize Initial size of the membership table.
app Application this session is associated to.

Definition at line 100 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::TRTPSessionBase ( uint32  ssrc,
const InetHostAddressia,
tpport_t  dataPort,
tpport_t  controlPort,
uint32  membersSize,
RTPApplicationapp 
)
inline

Builds a session with the specified ssrc identifier for the local source.

Parameters
ssrc SSRC identifier for the local source.
ia Network address this socket is to be bound.
dataPort Transport port the data socket is to be bound.
controlPort Transport port the control socket is to be bound.
membersSize Initial size of the membership table.
app Application this session is associated to.

Definition at line 117 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::TRTPSessionBase ( const InetMcastAddressia,
tpport_t  dataPort,
tpport_t  controlPort,
uint32  membersSize,
RTPApplicationapp,
uint32  iface 
)
inline

Builds a session waiting for packets in a multicast address.

TODO: ssrc constructor for multicast!

Parameters
ia Multicast address this socket is to be bound.
dataPort Transport port the data socket is to be bound.
controlPort Transport port the control socket is to be bound.
membersSize Initial size of the membership table.
app Application this session is associated to.
iface Index (from 0 to n) of network interface to join to multicast group.

Definition at line 136 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::TRTPSessionBase ( uint32  ssrc,
const InetMcastAddressia,
tpport_t  dataPort,
tpport_t  controlPort,
uint32  membersSize,
RTPApplicationapp,
uint32  iface 
)
inline

Builds a session waiting for packets in a multicast address, with the specified ssrc identifier for the local source.

Parameters
ssrc SSRC identifier for the local source.
ia Multicast address this socket is to be bound.
dataPort Transport port the data socket is to be bound.
controlPort Transport port the control socket is to be bound.
membersSize Initial size of the membership table.
app Application this session is associated to.
iface Index (from 0 to n) of network interface to join to multicast group.

Definition at line 156 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
virtual TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::~TRTPSessionBase ( )
inlinevirtual

Definition at line 187 of file rtp.h.

Member Function Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::build ( const InetHostAddressia,
tpport_t  dataPort,
tpport_t  controlPort 
)
inlineprivate

Definition at line 344 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::build ( const InetMcastAddressia,
tpport_t  dataPort,
tpport_t  controlPort,
uint32  iface 
)
inlineprivate

Definition at line 359 of file rtp.h.

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

Reimplemented in SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >.

Definition at line 163 of file rtp.h.

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

Definition at line 328 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
tpport_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::even_port ( tpport_t  port )
inlineprivate

Ensure a port number is even.

If it is an odd number, return the next lower (even) port number.

Parameters
port number to filter
Returns
filtered (even) port number

Definition at line 393 of file rtp.h.

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

Definition at line 280 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
InetHostAddress TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getControlSender ( tpport_tport = NULL ) const
inlineprotected

Definition at line 250 of file rtp.h.

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

Definition at line 238 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
InetHostAddress TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::getDataSender ( tpport_tport = NULL ) const
inlineprotected

Definition at line 204 of file rtp.h.

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

Definition at line 192 of file rtp.h.

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

Definition at line 208 of file rtp.h.

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

Definition at line 246 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
bool TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::isPendingData ( microtimeout_t  timeout )
inlineprotected
Parameters
timeout maximum timeout to wait, in microseconds

Definition at line 200 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
Socket::Error TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::joinGroup ( const InetMcastAddressia,
uint32  iface 
)
inlineprotected

Join a multicast group.

Parameters
ia address of the multicast group
Returns
error code from the socket operation

Definition at line 290 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
Socket::Error TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::leaveGroup ( const InetMcastAddressia )
inlineprotected

Leave a multicast group.

Parameters
ia address of the multicast group
Returns
error code from the socket operation

Definition at line 316 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
tpport_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::odd_port ( tpport_t  port )
inlineprivate

Ensure a port number is odd.

If it is an even number, return the next lower (odd) port number.

Parameters
port number to filter
Returns
filtered (odd) port number

Definition at line 382 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,
InetHostAddressna,
tpport_ttp 
)
inlineprotected

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 263 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,
InetHostAddressna,
tpport_ttp 
)
inlineprotected

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 221 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 
)
inlineprotected
Returns
number of octets actually written
Parameters
buffer
len

Definition at line 277 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 
)
inlineprotected
Parameters
buffer memory region to write from
len number of octets to write

Definition at line 235 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::setControlPeer ( const InetAddresshost,
tpport_t  port 
)
inlineprotected

Definition at line 268 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
void TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::setDataPeer ( const InetAddresshost,
tpport_t  port 
)
inlineprotected

Definition at line 226 of file rtp.h.

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

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 175 of file rtp.h.

Friends And Related Function Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
friend class RTPSessionBaseHandler
friend

Definition at line 402 of file rtp.h.

Field Documentation

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
tpport_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::controlBasePort
private

Definition at line 397 of file rtp.h.

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

Definition at line 401 of file rtp.h.

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
tpport_t TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >::dataBasePort
private

Definition at line 396 of file rtp.h.

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

Definition at line 400 of file rtp.h.


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

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

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