SYNOPSIS

#include <cqueue.h>

Inherits RTPDataQueue, and RTCPCompoundHandler.

Inherited by AVPQueue.

Public Member Functions

RTCPSenderInfo * getMRSenderInfo (SyncSource &src)

Get the most recent sender report received from a synchronization source. RTCPReceiverInfo * getMRReceiverInfo (SyncSource &srcFrom)

Ask for the info in the most recent receiver report about the local source received from the source given as parameter. void setLeavingDelay (microtimeout_t delay)

Set how much time the stack will wait before deleting a synchronization source that has sent an RTCP BYE packet. void setEnd2EndDelay (microtimeout_t t)

This method sets the maximum end to end delay allowed. microtimeout_t getDefaultEnd2EndDelay () const

microtimeout_t getEnd2EndDelay () const

void setSendersControlFraction (float fraction)

Specify the fraction of the total control bandwith to be dedicated to senders reports. void setMinRTCPInterval (microtimeout_t interval)

Manually set the minimum interval for sending RTP compound packets. uint32 getSendRTCPPacketCount () const

Get the total number of RTCP packets sent until now. void setOutQueueCryptoContextCtrl (CryptoContextCtrl *cc)

Set output queue CryptoContext. void removeOutQueueCryptoContextCtrl (CryptoContextCtrl *cc)

Remove output queue CryptoContext. CryptoContextCtrl * getOutQueueCryptoContextCtrl (uint32 ssrc)

Get an output queue CryptoContext identified by SSRC. void setInQueueCryptoContextCtrl (CryptoContextCtrl *cc)

Set input queue CryptoContext. void removeInQueueCryptoContextCtrl (CryptoContextCtrl *cc)

Remove input queue CryptoContext. CryptoContextCtrl * getInQueueCryptoContextCtrl (uint32 ssrc)

Get an input queue CryptoContext identified by SSRC.

Protected Member Functions

QueueRTCPManager (uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication())

QueueRTCPManager (uint32 ssrc, uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication())

virtual ~QueueRTCPManager ()

const RTPApplication & getApplication ()

void setControlBandwidth (float fraction)

float getControlBandwidth () const

void controlTransmissionService ()

Build and send RTCP packets following timing rules (including the 'timer reconsideration' algorithm). void controlReceptionService ()

Process incoming RTCP packets pending in the control reception socket. bool checkSSRCInRTCPPkt (SyncSourceLink &sourceLink, bool is_new, InetAddress &na, tpport_t tp)

Appy collision and loop detection and correction algorithm when receiving RTCP packets. void endQueueRTCPManager ()

virtual void onGotSR (SyncSource &source, SendReport &SR, uint8 blocks)

Plug-in for processing (acquire information carried in) an incoming RTCP Sender Report. virtual void onGotRR (SyncSource &source, RecvReport &RR, uint8 blocks)

Plug-in for processing (acquire information carried in) an incoming RTCP Receiver Report. bool onGotSDES (SyncSource &source, RTCPPacket &pkt)

virtual bool onGotSDESChunk (SyncSource &source, SDESChunk &chunk, size_t len)

Plug-in for handling of SDES chunks. virtual void onGotAPP (SyncSource &, RTCPCompoundHandler::APPPacket &, size_t)

Plug-in for handling of APP (application specific) RTCP packets. timeval getRTCPCheckInterval ()

uint32 getLastSendPacketCount () const

Get the number of data packets sent at the time the last SR was generated. void setPrevMembersNum (uint32 n)

uint32 getPrevMembersCount () const

size_t dispatchBYE (const std::string &reason)

This method is used to send an RTCP BYE packet. size_t sendControlToDestinations (unsigned char *buffer, size_t len)

Additional Inherited Members

Detailed Description

Adds generic management of RTCP functions to an RTP data queue.

Extends an RTP data i/o queue adding management of RTCP functions:

Provide feedback on the quality of the data distribution.

Convey the CNAME (persistent transport-level identifier) for every RTP source.

Control the sending rate of RTCP packets

Convey minimal control information about the participants

This class implements generic RTCP behaviour (as specified in RFC 1889/draft-ietf-avt-rtp-new) and may be specialized for specific profiles (see AVPQueue) or particular RTCP extensions.

Author:

Federico Montesino Pouzols [email protected]

Constructor & Destructor Documentation

QueueRTCPManager::QueueRTCPManager (uint32size = \fC\fBRTPDataQueue::defaultMembersHashSize\fP\fP, \fBRTPApplication\fP &app = \fC\fBdefaultApplication\fP()\fP)\fC [protected]\fP

QueueRTCPManager::QueueRTCPManager (uint32ssrc, uint32size = \fC\fBRTPDataQueue::defaultMembersHashSize\fP\fP, \fBRTPApplication\fP &app = \fC\fBdefaultApplication\fP()\fP)\fC [protected]\fP

virtual QueueRTCPManager::~QueueRTCPManager ()\fC [protected]\fP, \fC [virtual]\fP

Member Function Documentation

bool QueueRTCPManager::checkSSRCInRTCPPkt (\fBSyncSourceLink\fP &sourceLink, boolis_new, InetAddress &na, tpport_ttp)\fC [protected]\fP

Appy collision and loop detection and correction algorithm when receiving RTCP packets. Follows section 8.2 in draft-ietf-avp-rtp-new.

Parameters:

sourceLink link to the source object.

is_new whether the source has been just recorded.

na RTCP packet network address.

tp RTCP packet source transport port.

Returns:

whether the packet must not be discarded.

void QueueRTCPManager::controlReceptionService ()\fC [protected]\fP

Process incoming RTCP packets pending in the control reception socket.

void QueueRTCPManager::controlTransmissionService ()\fC [protected]\fP

Build and send RTCP packets following timing rules (including the 'timer reconsideration' algorithm).

size_t QueueRTCPManager::dispatchBYE (const std::string &reason)\fC [protected]\fP, \fC [virtual]\fP

This method is used to send an RTCP BYE packet. An RTCP BYE packet is sent when one of the the following circumstances occur:

  • when leaving the session

  • when we have detected that another synchronization source in the same session is using the same SSRC identifier as us.

Try to post a BYE message. It will send a BYE packet as long as at least one RTP or RTCP packet has been sent before. If the number of members in the session is more than 50, the algorithm described in section 6.3.7 of RFC 3550 is applied in order to avoid a flood of BYE messages.

Parameters:

reason reason to specify in the BYE packet.

Reimplemented from RTPQueueBase.

void QueueRTCPManager::endQueueRTCPManager ()\fC [protected]\fP

const \fBRTPApplication\fP& QueueRTCPManager::getApplication ()\fC [inline]\fP, \fC [protected]\fP

float QueueRTCPManager::getControlBandwidth () const\fC [inline]\fP, \fC [protected]\fP

\fBmicrotimeout_t\fP QueueRTCPManager::getDefaultEnd2EndDelay () const\fC [inline]\fP

\fBmicrotimeout_t\fP QueueRTCPManager::getEnd2EndDelay () const\fC [inline]\fP

\fBCryptoContextCtrl\fP* QueueRTCPManager::getInQueueCryptoContextCtrl (uint32ssrc)

Get an input queue CryptoContext identified by SSRC.

Parameters:

ssrc Request CryptoContext for this incoming SSRC

Returns:

Pointer to CryptoContext of the SSRC of NULL if no context available for this SSRC.

uint32 QueueRTCPManager::getLastSendPacketCount () const\fC [inline]\fP, \fC [protected]\fP

Get the number of data packets sent at the time the last SR was generated.

\fBRTCPReceiverInfo\fP* QueueRTCPManager::getMRReceiverInfo (\fBSyncSource\fP &srcFrom)

Ask for the info in the most recent receiver report about the local source received from the source given as parameter.

Parameters:

srcFrom Source of the receiver info.

Returns:

most recent receiver info received from src.

Return values:

NULL when no receiver report has been received from the specified source.

\fBRTCPSenderInfo\fP* QueueRTCPManager::getMRSenderInfo (\fBSyncSource\fP &src)

Get the most recent sender report received from a synchronization source.

Parameters:

src Synchronization source of the sender info.

Returns:

Most recent sender info received from src.

Return values:

NULL when no sender report has been received from the specified source.

\fBCryptoContextCtrl\fP* QueueRTCPManager::getOutQueueCryptoContextCtrl (uint32ssrc)

Get an output queue CryptoContext identified by SSRC.

Parameters:

ssrc Request CryptoContext for this incoming SSRC

Returns:

Pointer to CryptoContext of the SSRC of NULL if no context available for this SSRC.

uint32 QueueRTCPManager::getPrevMembersCount () const\fC [inline]\fP, \fC [protected]\fP

timeval QueueRTCPManager::getRTCPCheckInterval ()\fC [inline]\fP, \fC [protected]\fP

uint32 QueueRTCPManager::getSendRTCPPacketCount () const\fC [inline]\fP

Get the total number of RTCP packets sent until now.

virtual void QueueRTCPManager::onGotAPP (\fBSyncSource\fP &, \fBRTCPCompoundHandler::APPPacket\fP &, size_t)\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP

Plug-in for handling of APP (application specific) RTCP packets.

Parameters:

- Synchronization source of this packet.

- RTCP APP packet struct.

- Length of the app data packet, including ssrc. name and app. specific data.

virtual void QueueRTCPManager::onGotRR (\fBSyncSource\fP &source, \fBRecvReport\fP &RR, uint8blocks)\fC [protected]\fP, \fC [virtual]\fP

Plug-in for processing (acquire information carried in) an incoming RTCP Receiver Report. The default implementation in this class only processes the receiver report blocks about the local source.

Parameters:

source Synchronization source this report comes from.

RR Receiver report structure

blocks Number of report blocks in the packet

bool QueueRTCPManager::onGotSDES (\fBSyncSource\fP &source, \fBRTCPPacket\fP &pkt)\fC [protected]\fP

Parameters:

source Synchronization source of SDES RTCP packet.

pkt SDES RTCP packet received.

virtual bool QueueRTCPManager::onGotSDESChunk (\fBSyncSource\fP &source, \fBSDESChunk\fP &chunk, size_tlen)\fC [protected]\fP, \fC [virtual]\fP

Plug-in for handling of SDES chunks.

Parameters:

source Synchronization source of SDES chunk.

chunk SDES chunk structure.

len Length of chunk, in octets.

Returns:

whether there was a CNAME.

virtual void QueueRTCPManager::onGotSR (\fBSyncSource\fP &source, \fBSendReport\fP &SR, uint8blocks)\fC [protected]\fP, \fC [virtual]\fP

Plug-in for processing (acquire information carried in) an incoming RTCP Sender Report. The default implementation in this class only processes the sender information and the receiver report blocks about the local source.

Parameters:

source Synchronization source this report comes from.

SR Sender report structure.

blocks Number of report blocks in the packet.

void QueueRTCPManager::removeInQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP *cc)

Remove input queue CryptoContext. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.

Parameters:

cc Pointer to initialized CryptoContext to remove. If pointer if NULL then delete the whole queue

void QueueRTCPManager::removeOutQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP *cc)

Remove output queue CryptoContext. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.

Parameters:

cc Pointer to initialized CryptoContext to remove.

size_t QueueRTCPManager::sendControlToDestinations (unsigned char *buffer, size_tlen)\fC [protected]\fP

void QueueRTCPManager::setControlBandwidth (floatfraction)\fC [inline]\fP, \fC [protected]\fP

void QueueRTCPManager::setEnd2EndDelay (\fBmicrotimeout_t\fPt)\fC [inline]\fP

This method sets the maximum end to end delay allowed. If the processing delay plus the trip time for a packet is greater than the end to end delay, the packet is discarded, and the application cannot get it.

This is a way of setting an upper bound to the end to end delay, computed as the elapsed time between the packet timestamping at the sender side, and the picking of the packet at the receiver side.

Parameters:

t maximum end to end delay allowed. A value of 0 implies there is no limit and is the default

void QueueRTCPManager::setInQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP *cc)

Set input queue CryptoContext. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.

Parameters:

cc Pointer to initialized CryptoContext.

void QueueRTCPManager::setLeavingDelay (\fBmicrotimeout_t\fPdelay)\fC [inline]\fP

Set how much time the stack will wait before deleting a synchronization source that has sent an RTCP BYE packet.

Parameters:

delay delay in microseconds.

Note:

The default delay is 1000000 microseconds

void QueueRTCPManager::setMinRTCPInterval (\fBmicrotimeout_t\fPinterval)\fC [inline]\fP

Manually set the minimum interval for sending RTP compound packets.

Parameters:

interval minimum interval between RTCP packets, in microseconds.

See also:

computeRTCPInterval()

void QueueRTCPManager::setOutQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP *cc)

Set output queue CryptoContext. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.

Parameters:

cc Pointer to initialized CryptoContext.

void QueueRTCPManager::setPrevMembersNum (uint32n)\fC [inline]\fP, \fC [protected]\fP

Parameters:

n Number of members.

void QueueRTCPManager::setSendersControlFraction (floatfraction)\fC [inline]\fP

Specify the fraction of the total control bandwith to be dedicated to senders reports.

Parameters:

fraction fraction of bandwidth, must be between 0 an 1.

This method sets the fraction of the global control bandwidth that will be dedicated to senders reports. Of course, 1 - fraction will be dedicated to receivers reports.

See also:

setControlBandwidth

Member Data Documentation

uint32 QueueRTCPManager::rtcpPMembers

timeval QueueRTCPManager::rtcpTc

timeval QueueRTCPManager::rtcpTn

timeval QueueRTCPManager::rtcpTp

Author

Generated automatically by Doxygen for ccRTP from the source code.