.TH "QueueRTCPManager" 3 "Sat Oct 27 2018" "ccRTP" \" -*- nroff -*- .ad l .nh .SH NAME QueueRTCPManager \- Adds generic management of RTCP functions to an RTP data queue\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBRTPDataQueue\fP, and \fBRTCPCompoundHandler\fP\&. .PP Inherited by \fBAVPQueue\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBRTCPSenderInfo\fP * \fBgetMRSenderInfo\fP (\fBSyncSource\fP &src)" .br .RI "Get the most recent sender report received from a synchronization source\&. " .ti -1c .RI "\fBRTCPReceiverInfo\fP * \fBgetMRReceiverInfo\fP (\fBSyncSource\fP &srcFrom)" .br .RI "Ask for the info in the most recent receiver report about the local source received from the source given as parameter\&. " .ti -1c .RI "void \fBsetLeavingDelay\fP (\fBmicrotimeout_t\fP delay)" .br .RI "Set how much time the stack will wait before deleting a synchronization source that has sent an RTCP BYE packet\&. " .ti -1c .RI "void \fBsetEnd2EndDelay\fP (\fBmicrotimeout_t\fP t)" .br .RI "This method sets the maximum end to end delay allowed\&. " .ti -1c .RI "\fBmicrotimeout_t\fP \fBgetDefaultEnd2EndDelay\fP () const" .br .ti -1c .RI "\fBmicrotimeout_t\fP \fBgetEnd2EndDelay\fP () const" .br .ti -1c .RI "void \fBsetSendersControlFraction\fP (float fraction)" .br .RI "Specify the fraction of the total control bandwith to be dedicated to senders reports\&. " .ti -1c .RI "void \fBsetMinRTCPInterval\fP (\fBmicrotimeout_t\fP interval)" .br .RI "Manually set the minimum interval for sending RTP compound packets\&. " .ti -1c .RI "uint32 \fBgetSendRTCPPacketCount\fP () const" .br .RI "Get the total number of RTCP packets sent until now\&. " .ti -1c .RI "void \fBsetOutQueueCryptoContextCtrl\fP (\fBCryptoContextCtrl\fP *cc)" .br .RI "Set output queue \fBCryptoContext\fP\&. " .ti -1c .RI "void \fBremoveOutQueueCryptoContextCtrl\fP (\fBCryptoContextCtrl\fP *cc)" .br .RI "Remove output queue \fBCryptoContext\fP\&. " .ti -1c .RI "\fBCryptoContextCtrl\fP * \fBgetOutQueueCryptoContextCtrl\fP (uint32 ssrc)" .br .RI "Get an output queue \fBCryptoContext\fP identified by SSRC\&. " .ti -1c .RI "void \fBsetInQueueCryptoContextCtrl\fP (\fBCryptoContextCtrl\fP *cc)" .br .RI "Set input queue \fBCryptoContext\fP\&. " .ti -1c .RI "void \fBremoveInQueueCryptoContextCtrl\fP (\fBCryptoContextCtrl\fP *cc)" .br .RI "Remove input queue \fBCryptoContext\fP\&. " .ti -1c .RI "\fBCryptoContextCtrl\fP * \fBgetInQueueCryptoContextCtrl\fP (uint32 ssrc)" .br .RI "Get an input queue \fBCryptoContext\fP identified by SSRC\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBQueueRTCPManager\fP (uint32 size=\fBRTPDataQueue::defaultMembersHashSize\fP, \fBRTPApplication\fP &app=\fBdefaultApplication\fP())" .br .ti -1c .RI "\fBQueueRTCPManager\fP (uint32 ssrc, uint32 size=\fBRTPDataQueue::defaultMembersHashSize\fP, \fBRTPApplication\fP &app=\fBdefaultApplication\fP())" .br .ti -1c .RI "virtual \fB~QueueRTCPManager\fP ()" .br .ti -1c .RI "const \fBRTPApplication\fP & \fBgetApplication\fP ()" .br .ti -1c .RI "void \fBsetControlBandwidth\fP (float fraction)" .br .ti -1c .RI "float \fBgetControlBandwidth\fP () const" .br .ti -1c .RI "void \fBcontrolTransmissionService\fP ()" .br .RI "Build and send RTCP packets following timing rules (including the 'timer reconsideration' algorithm)\&. " .ti -1c .RI "void \fBcontrolReceptionService\fP ()" .br .RI "Process incoming RTCP packets pending in the control reception socket\&. " .ti -1c .RI "bool \fBcheckSSRCInRTCPPkt\fP (\fBSyncSourceLink\fP &sourceLink, bool is_new, InetAddress &na, tpport_t tp)" .br .RI "Appy collision and loop detection and correction algorithm when receiving RTCP packets\&. " .ti -1c .RI "void \fBendQueueRTCPManager\fP ()" .br .ti -1c .RI "virtual void \fBonGotSR\fP (\fBSyncSource\fP &source, \fBSendReport\fP &SR, uint8 blocks)" .br .RI "Plug-in for processing (acquire information carried in) an incoming RTCP Sender Report\&. " .ti -1c .RI "virtual void \fBonGotRR\fP (\fBSyncSource\fP &source, \fBRecvReport\fP &RR, uint8 blocks)" .br .RI "Plug-in for processing (acquire information carried in) an incoming RTCP Receiver Report\&. " .ti -1c .RI "bool \fBonGotSDES\fP (\fBSyncSource\fP &source, \fBRTCPPacket\fP &pkt)" .br .ti -1c .RI "virtual bool \fBonGotSDESChunk\fP (\fBSyncSource\fP &source, \fBSDESChunk\fP &chunk, size_t len)" .br .RI "Plug-in for handling of SDES chunks\&. " .ti -1c .RI "virtual void \fBonGotAPP\fP (\fBSyncSource\fP &, \fBRTCPCompoundHandler::APPPacket\fP &, size_t)" .br .RI "Plug-in for handling of APP (application specific) RTCP packets\&. " .ti -1c .RI "timeval \fBgetRTCPCheckInterval\fP ()" .br .ti -1c .RI "uint32 \fBgetLastSendPacketCount\fP () const" .br .RI "Get the number of data packets sent at the time the last SR was generated\&. " .ti -1c .RI "void \fBsetPrevMembersNum\fP (uint32 n)" .br .ti -1c .RI "uint32 \fBgetPrevMembersCount\fP () const" .br .ti -1c .RI "size_t \fBdispatchBYE\fP (const std::string &reason)" .br .RI "This method is used to send an RTCP BYE packet\&. " .ti -1c .RI "size_t \fBsendControlToDestinations\fP (unsigned char *buffer, size_t len)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP Adds generic management of RTCP functions to an RTP data queue\&. Extends an RTP data i/o queue adding management of RTCP functions: .PP Provide feedback on the quality of the data distribution\&. .PP Convey the CNAME (persistent transport-level identifier) for every RTP source\&. .PP Control the sending rate of RTCP packets .PP Convey minimal control information about the participants .PP This class implements generic RTCP behaviour (as specified in RFC 1889/draft-ietf-avt-rtp-new) and may be specialized for specific profiles (see \fBAVPQueue\fP) or particular RTCP extensions\&. .PP \fBAuthor:\fP .RS 4 Federico Montesino Pouzols fedemp@altern.org .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "QueueRTCPManager::QueueRTCPManager (uint32 size = \fC\fBRTPDataQueue::defaultMembersHashSize\fP\fP, \fBRTPApplication\fP & app = \fC\fBdefaultApplication\fP()\fP)\fC [protected]\fP" .SS "QueueRTCPManager::QueueRTCPManager (uint32 ssrc, uint32 size = \fC\fBRTPDataQueue::defaultMembersHashSize\fP\fP, \fBRTPApplication\fP & app = \fC\fBdefaultApplication\fP()\fP)\fC [protected]\fP" .SS "virtual QueueRTCPManager::~QueueRTCPManager ()\fC [protected]\fP, \fC [virtual]\fP" .SH "Member Function Documentation" .PP .SS "bool QueueRTCPManager::checkSSRCInRTCPPkt (\fBSyncSourceLink\fP & sourceLink, bool is_new, InetAddress & na, tpport_t tp)\fC [protected]\fP" .PP Appy collision and loop detection and correction algorithm when receiving RTCP packets\&. Follows section 8\&.2 in draft-ietf-avp-rtp-new\&. .PP \fBParameters:\fP .RS 4 \fIsourceLink\fP link to the source object\&. .br \fIis_new\fP whether the source has been just recorded\&. .br \fIna\fP RTCP packet network address\&. .br \fItp\fP RTCP packet source transport port\&. .RE .PP \fBReturns:\fP .RS 4 whether the packet must not be discarded\&. .RE .PP .SS "void QueueRTCPManager::controlReceptionService ()\fC [protected]\fP" .PP Process incoming RTCP packets pending in the control reception socket\&. .SS "void QueueRTCPManager::controlTransmissionService ()\fC [protected]\fP" .PP Build and send RTCP packets following timing rules (including the 'timer reconsideration' algorithm)\&. .SS "size_t QueueRTCPManager::dispatchBYE (const std::string & reason)\fC [protected]\fP, \fC [virtual]\fP" .PP This method is used to send an RTCP BYE packet\&. An RTCP BYE packet is sent when one of the the following circumstances occur: .IP "\(bu" 2 when leaving the session .IP "\(bu" 2 when we have detected that another synchronization source in the same session is using the same SSRC identifier as us\&. .PP .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIreason\fP reason to specify in the BYE packet\&. .RE .PP .PP Reimplemented from \fBRTPQueueBase\fP\&. .SS "void QueueRTCPManager::endQueueRTCPManager ()\fC [protected]\fP" .SS "const \fBRTPApplication\fP& QueueRTCPManager::getApplication ()\fC [inline]\fP, \fC [protected]\fP" .SS "float QueueRTCPManager::getControlBandwidth () const\fC [inline]\fP, \fC [protected]\fP" .SS "\fBmicrotimeout_t\fP QueueRTCPManager::getDefaultEnd2EndDelay () const\fC [inline]\fP" .SS "\fBmicrotimeout_t\fP QueueRTCPManager::getEnd2EndDelay () const\fC [inline]\fP" .SS "\fBCryptoContextCtrl\fP* QueueRTCPManager::getInQueueCryptoContextCtrl (uint32 ssrc)" .PP Get an input queue \fBCryptoContext\fP identified by SSRC\&. .PP \fBParameters:\fP .RS 4 \fIssrc\fP Request \fBCryptoContext\fP for this incoming SSRC .RE .PP \fBReturns:\fP .RS 4 Pointer to \fBCryptoContext\fP of the SSRC of NULL if no context available for this SSRC\&. .RE .PP .SS "uint32 QueueRTCPManager::getLastSendPacketCount () const\fC [inline]\fP, \fC [protected]\fP" .PP Get the number of data packets sent at the time the last SR was generated\&. .SS "\fBRTCPReceiverInfo\fP* QueueRTCPManager::getMRReceiverInfo (\fBSyncSource\fP & srcFrom)" .PP Ask for the info in the most recent receiver report about the local source received from the source given as parameter\&. .PP \fBParameters:\fP .RS 4 \fIsrcFrom\fP Source of the receiver info\&. .RE .PP \fBReturns:\fP .RS 4 most recent receiver info received from src\&. .RE .PP \fBReturn values:\fP .RS 4 \fINULL\fP when no receiver report has been received from the specified source\&. .RE .PP .SS "\fBRTCPSenderInfo\fP* QueueRTCPManager::getMRSenderInfo (\fBSyncSource\fP & src)" .PP Get the most recent sender report received from a synchronization source\&. .PP \fBParameters:\fP .RS 4 \fIsrc\fP Synchronization source of the sender info\&. .RE .PP \fBReturns:\fP .RS 4 Most recent sender info received from src\&. .RE .PP \fBReturn values:\fP .RS 4 \fINULL\fP when no sender report has been received from the specified source\&. .RE .PP .SS "\fBCryptoContextCtrl\fP* QueueRTCPManager::getOutQueueCryptoContextCtrl (uint32 ssrc)" .PP Get an output queue \fBCryptoContext\fP identified by SSRC\&. .PP \fBParameters:\fP .RS 4 \fIssrc\fP Request \fBCryptoContext\fP for this incoming SSRC .RE .PP \fBReturns:\fP .RS 4 Pointer to \fBCryptoContext\fP of the SSRC of NULL if no context available for this SSRC\&. .RE .PP .SS "uint32 QueueRTCPManager::getPrevMembersCount () const\fC [inline]\fP, \fC [protected]\fP" .SS "timeval QueueRTCPManager::getRTCPCheckInterval ()\fC [inline]\fP, \fC [protected]\fP" .SS "uint32 QueueRTCPManager::getSendRTCPPacketCount () const\fC [inline]\fP" .PP Get the total number of RTCP packets sent until now\&. .SS "virtual void QueueRTCPManager::onGotAPP (\fBSyncSource\fP &, \fBRTCPCompoundHandler::APPPacket\fP &, size_t)\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Plug-in for handling of APP (application specific) RTCP packets\&. .PP \fBParameters:\fP .RS 4 \fI-\fP Synchronization source of this packet\&. .br \fI-\fP RTCP APP packet struct\&. .br \fI-\fP Length of the app data packet, including ssrc\&. name and app\&. specific data\&. .RE .PP .SS "virtual void QueueRTCPManager::onGotRR (\fBSyncSource\fP & source, \fBRecvReport\fP & RR, uint8 blocks)\fC [protected]\fP, \fC [virtual]\fP" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIsource\fP Synchronization source this report comes from\&. .br \fIRR\fP Receiver report structure .br \fIblocks\fP Number of report blocks in the packet .RE .PP .SS "bool QueueRTCPManager::onGotSDES (\fBSyncSource\fP & source, \fBRTCPPacket\fP & pkt)\fC [protected]\fP" .PP \fBParameters:\fP .RS 4 \fIsource\fP Synchronization source of SDES RTCP packet\&. .br \fIpkt\fP SDES RTCP packet received\&. .RE .PP .SS "virtual bool QueueRTCPManager::onGotSDESChunk (\fBSyncSource\fP & source, \fBSDESChunk\fP & chunk, size_t len)\fC [protected]\fP, \fC [virtual]\fP" .PP Plug-in for handling of SDES chunks\&. .PP \fBParameters:\fP .RS 4 \fIsource\fP Synchronization source of SDES chunk\&. .br \fIchunk\fP SDES chunk structure\&. .br \fIlen\fP Length of chunk, in octets\&. .RE .PP \fBReturns:\fP .RS 4 whether there was a CNAME\&. .RE .PP .SS "virtual void QueueRTCPManager::onGotSR (\fBSyncSource\fP & source, \fBSendReport\fP & SR, uint8 blocks)\fC [protected]\fP, \fC [virtual]\fP" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIsource\fP Synchronization source this report comes from\&. .br \fISR\fP Sender report structure\&. .br \fIblocks\fP Number of report blocks in the packet\&. .RE .PP .SS "void QueueRTCPManager::removeInQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP * cc)" .PP Remove input queue \fBCryptoContext\fP\&. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts\&. .PP \fBParameters:\fP .RS 4 \fIcc\fP Pointer to initialized \fBCryptoContext\fP to remove\&. If pointer if \fCNULL\fP then delete the whole queue .RE .PP .SS "void QueueRTCPManager::removeOutQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP * cc)" .PP Remove output queue \fBCryptoContext\fP\&. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts\&. .PP \fBParameters:\fP .RS 4 \fIcc\fP Pointer to initialized \fBCryptoContext\fP to remove\&. .RE .PP .SS "size_t QueueRTCPManager::sendControlToDestinations (unsigned char * buffer, size_t len)\fC [protected]\fP" .SS "void QueueRTCPManager::setControlBandwidth (float fraction)\fC [inline]\fP, \fC [protected]\fP" .SS "void QueueRTCPManager::setEnd2EndDelay (\fBmicrotimeout_t\fP t)\fC [inline]\fP" .PP 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\&. .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIt\fP maximum end to end delay allowed\&. A value of 0 implies there is no limit and is the default .RE .PP .SS "void QueueRTCPManager::setInQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP * cc)" .PP Set input queue \fBCryptoContext\fP\&. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts\&. .PP \fBParameters:\fP .RS 4 \fIcc\fP Pointer to initialized \fBCryptoContext\fP\&. .RE .PP .SS "void QueueRTCPManager::setLeavingDelay (\fBmicrotimeout_t\fP delay)\fC [inline]\fP" .PP Set how much time the stack will wait before deleting a synchronization source that has sent an RTCP BYE packet\&. .PP \fBParameters:\fP .RS 4 \fIdelay\fP delay in microseconds\&. .RE .PP \fBNote:\fP .RS 4 The default delay is 1000000 microseconds .RE .PP .SS "void QueueRTCPManager::setMinRTCPInterval (\fBmicrotimeout_t\fP interval)\fC [inline]\fP" .PP Manually set the minimum interval for sending RTP compound packets\&. .PP \fBParameters:\fP .RS 4 \fIinterval\fP minimum interval between RTCP packets, in microseconds\&. .RE .PP \fBSee also:\fP .RS 4 computeRTCPInterval() .RE .PP .SS "void QueueRTCPManager::setOutQueueCryptoContextCtrl (\fBCryptoContextCtrl\fP * cc)" .PP Set output queue \fBCryptoContext\fP\&. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts\&. .PP \fBParameters:\fP .RS 4 \fIcc\fP Pointer to initialized \fBCryptoContext\fP\&. .RE .PP .SS "void QueueRTCPManager::setPrevMembersNum (uint32 n)\fC [inline]\fP, \fC [protected]\fP" .PP \fBParameters:\fP .RS 4 \fIn\fP Number of members\&. .RE .PP .SS "void QueueRTCPManager::setSendersControlFraction (float fraction)\fC [inline]\fP" .PP Specify the fraction of the total control bandwith to be dedicated to senders reports\&. .PP \fBParameters:\fP .RS 4 \fIfraction\fP fraction of bandwidth, must be between 0 an 1\&. .RE .PP This method sets the fraction of the global control bandwidth that will be dedicated to senders reports\&. Of course, \fC1 - fraction\fP will be dedicated to receivers reports\&. .PP \fBSee also:\fP .RS 4 \fBsetControlBandwidth\fP .RE .PP .SH "Member Data Documentation" .PP .SS "uint32 QueueRTCPManager::rtcpPMembers" .SS "timeval QueueRTCPManager::rtcpTc" .SS "timeval QueueRTCPManager::rtcpTn" .SS "timeval QueueRTCPManager::rtcpTp" .SH "Author" .PP Generated automatically by Doxygen for ccRTP from the source code\&.