QueueRTCPManager(3)
๐ QueueRTCPManager(3) ๐
okay bestie, so this is a page from the Library Functions Manual, and it's literally all about QueueRTCPManager โ the girl who handles RTCP stuff for an RTP data queue. she's giving very much "I manage the control plane so you don't have to" energy. ๐
โจ NAME โจ
QueueRTCPManager โ Adds generic management of RTCP functions to an RTP data queue.
like. she adds generic management of RTCP functions. to an RTP data queue. that's the whole vibe. no cap. ๐ฆ
โจ SYNOPSIS โจ
#include <cqueue.h>
okay so first things first, she Inherits RTPDataQueue and RTCPCompoundHandler. ๐
and she's Inherited by AVPQueue. (yes bestie, she's a mother. the lineage is real. ๐)
๐ธ Public Member Functions ๐ธ
๐ her own iconic methods
RTCPSenderInfo * getMRSenderInfo (SyncSource &src)โ grab the most recent sender report that came in from a synchronization source. "MR" = most recent, iykyk. โจRTCPReceiverInfo * getMRReceiverInfo (SyncSource &srcFrom)โ this one asks for the info inside the most recent receiver report about the local source, and it's the one you received from the source you pass in as the parameter. yes it's specific. yes she's worth it. ๐void setLeavingDelay (microtimeout_t delay)โ sets how long the stack will sit there and wait before it deletes a synchronization source that already sent an RTCPBYEpacket. like giving them a lil grace period before the block. ๐ซถvoid setEnd2EndDelay (microtimeout_t t)โ sets the maximum end to end delay allowed. that's it. that's the method. ๐ฅmicrotimeout_t getDefaultEnd2EndDelay () constโ returns the default. the og. the blueprint. โญmicrotimeout_t getEnd2EndDelay () constโ returns the one you actually set. ๐ซvoid setSendersControlFraction (float fraction)โ you're specifying what fraction of the total control bandwidth gets dedicated to senders reports. math girlies rise. ๐๐void setMinRTCPInterval (microtimeout_t interval)โ manually set the minimum interval for sending RTP compound packets. manual mode: engaged. ๐uint32 getSendRTCPPacketCount () constโ get the total number of RTCP packets sent until now. a running tally. a little scoreboard. ๐void setOutQueueCryptoContextCtrl (CryptoContextCtrl *cc)โ set output queue CryptoContext. secure the bag (the control one). ๐void removeOutQueueCryptoContextCtrl (CryptoContextCtrl *cc)โ remove output queue CryptoContext. okay bye bestie ๐CryptoContextCtrl * getOutQueueCryptoContextCtrl (uint32 ssrc)โ get an output queue CryptoContext, identified by SSRC. she knows exactly which one you mean. ๐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. matching set, obviously. ๐ฆ
๐ Public Member Functions inherited from RTPDataQueue ๐
she didn't have to flex these but she did:
void setTypeOfService (Tos tos)โ specify the kind of service the application expects to use. manifesting that QoS. โจvoid enableStack ()โ enable packet queue processing in the stack. wake her up ๐void disableStack ()โ disable packet queue processing in the stack. nap time ๐ดbool isActive () constโ get the active connection state flag. are we live? ๐คuint32 getCurrentTimestamp () constโ get the timestamp that should be given for a packet whose payload sampling instant corresponds to the current system time. yes, all of that. it's precise. she's precise. โฐvoid setSessionBandwidth (uint32 bw)โ specify the bandwidth of the current session. ๐ถuint32 getDefaultSessionBandwidth () constโ the default bandwidth. the factory setting. the og. โญuint32 getSessionBandwidth () constโ the bandwidth you actually set. ๐ซvoid setTimeclock ()โ set the packet timeclock for synchronizing timestamps. ๐ฐ๏ธtimeout_t getTimeclock () constโ get the packet timeclock for synchronizing timestamps. right back at ya. ๐ฐ๏ธโจ
๐ Public Member Functions inherited from IncomingDataQueue ๐
SyncSourcesIterator begin ()โ the beginning. as in iterator. ๐ฌSyncSourcesIterator end ()โ the end. also iterator. ๐๏ธconst AppDataUnit * getData (uint32 stamp, const SyncSource *src=NULL)โ retreive data from a specific timestamped packet, if such a packet is currently available in the receive buffer. (yes the original spells it "Retreive", and yes we're keeping it exactly as-is bestie, character for character. ๐)bool isWaiting (const SyncSource *src=NULL) constโ determine if packets are waiting in the reception queue. the queue said "soon." ๐uint32 getFirstTimestamp (const SyncSource *src=NULL) constโ get timestamp of first packet waiting in the queue. first in line, main character energy. ๐void setMinValidPacketSequence (uint8 packets)โ when you're receiving packets from a new source, it may be convenient to reject a first few packets before you're really sure the source is valid. trust issues but make it protocol design. ๐ฉuint8 getDefaultMinValidPacketSequence () constโ the default value of the above. โญuint8 getMinValidPacketSequence () constโ get the minimun number of consecutive packets that must be received from a source before accepting its data packets. (again โ original spelling "minimun", preserved with love. ๐)void setMaxPacketMisorder (uint16 packets)โ sets the max packet misorder. that's the whole description she gave us, and we're not inventing more. ๐คทโ๏ธuint16 getDefaultMaxPacketMisorder () constโ the default max packet misorder. โญuint16 getMaxPacketMisorder () constโ the max packet misorder you set. ๐ซvoid setMaxPacketDropout (uint16 packets)โ it also prevents packets sent after a restart of the source being immediately accepted. sneaky lil side effect, we love a multitasker. ๐ฅuint16 getDefaultMaxPacketDropout () constโ default dropout value. โญuint16 getMaxPacketDropout () constโ the dropout value in play. ๐ซvoid setInQueueCryptoContext (CryptoContext *cc)โ set input queue CryptoContext. ๐void removeInQueueCryptoContext (CryptoContext *cc)โ remove input queue CryptoContext. ๐CryptoContext * getInQueueCryptoContext (uint32 ssrc)โ get an input queue CryptoContext identified by SSRC. ๐ฆ
๐ Public Member Functions inherited from IncomingDataQueueBase ๐
size_t getDefaultMaxRecvPacketSize () constโ the default max receive packet size. โญsize_t getMaxRecvPacketSize () constโ the max receive packet size currently set. ๐ซvoid setMaxRecvPacketSize (size_t maxsize)โ set it. now it's your maxsize. ๐
๐ง Public Member Functions inherited from RTPQueueBase ๐ง
bool setPayloadFormat (const PayloadFormat &pf)โ set the payload format in use, for timing and payload type identification purposes. โจuint32 getLocalSSRC () constโ get the local SSRC. that's your id bestie, don't lose it. ๐ชชuint32 getCurrentRTPClockRate () constโ get the clock rate in RTP clock units (for instance,8000units per second forPCMU, or90000units per second forMP2T). look at the numbers, we love specificity. ๐ขPayloadType getCurrentPayloadType () constโ get the current payload type. ๐ท๏ธtimeval getInitialTime () constโ get the initial time. โณ
๐ Public Member Functions inherited from OutgoingDataQueue ๐
bool addDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)โ add a destination by host address. ๐bool addDestination (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)โ same thing but multicast flavoured. ๐กbool forgetDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)โ forget a host destination. ๐ซฅbool forgetDestination (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)โ forget a multicast destination. ๐ซฅ๐กvoid addContributor (uint32 csrc)โ addcsrcas the CSRC identifier of a new contributor. welcome to the group chat. ๐ซbool removeContributor (uint32 csrc)โ remove CSRC from the list of contributors. removed from the group chat. ๐bool isSending () constโ determine if outgoing packets are waiting to send. ๐void putData (uint32 stamp, const unsigned char *data=NULL, size_t len=0)โ this is used to create a data packet in the send queue. ๐งบvoid sendImmediate (uint32 stamp, const unsigned char *data=NULL, size_t len=0)โ this is used to create a data packet and send it immediately. no waiting, no queue, straight to the function. ๐ฅvoid setPadding (uint8 paddinglen)โ set padding. ๐ซงvoid setMark (bool mark)โ set marker bit for the packet in which the next data provided will be send. (yes, "be send". she said what she said. ๐ )bool getMark () constโ get whether the mark bit will be set in the next packet. ๐size_t setPartial (uint32 timestamp, unsigned char *data, size_t offset, size_t max)โ set partial data for an already queued packet. piece by piece, like a puzzle. ๐งฉmicrotimeout_t getDefaultSchedulingTimeout () constโ the default scheduling timeout. โญvoid setSchedulingTimeout (microtimeout_t to)โ set the default scheduling timeout to use when no data packets are waiting to be sent. ๐microtimeout_t getDefaultExpireTimeout () constโ the default expire timeout. โญvoid setExpireTimeout (microtimeout_t to)โ set the 'expired' timer for expiring packets pending in the send queue which have gone unsent and are already 'too late' to be sent now. rip to those packets fr. ๐ญmicrotimeout_t getExpireTimeout () constโ get the expire timeout. ๐ซuint32 getSendPacketCount () constโ get the total number of packets sent so far. ๐uint32 getSendOctetCount () constโ get the total number of octets (payload only) sent so far. payload only, don't count the whole thing, she's specific. ๐ขuint16 getSequenceNumber () constโ get the sequence number of the next outgoing packet. future-facing. ๐ฎvoid setOutQueueCryptoContext (CryptoContext *cc)โ set output queue CryptoContext. ๐void removeOutQueueCryptoContext (CryptoContext *cc)โ remove output queue CryptoContext. ๐CryptoContext * getOutQueueCryptoContext (uint32 ssrc)โ get an output queue CryptoContext identified by SSRC. ๐
๐ Public Member Functions inherited from OutgoingDataQueueBase ๐
size_t getDefaultMaxSendSegmentSize ()โ the default max send segment size. โญvoid setMaxSendSegmentSize (size_t size)โ set maximum payload segment size before fragmenting sends. she'll fragment. don't test her. ๐งจsize_t getMaxSendSegmentSize ()โ get the max send segment size. ๐ซ
๐ Protected Member Functions ๐
(these are the backstage ones, for the class and her friends only. ๐ )
QueueRTCPManager (uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication())โ constructor number one. ๐QueueRTCPManager (uint32 ssrc, uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication())โ constructor number two, this time you get to bring your own ssrc. โจvirtual ~QueueRTCPManager ()โ the destructor. virtual. dramatic exit. ๐const RTPApplication & getApplication ()โ get the application. ๐ฑvoid setControlBandwidth (float fraction)โ set the control bandwidth as a fraction. ๐ถfloat getControlBandwidth () constโ get that control bandwidth back out. ๐ซvoid controlTransmissionService ()โ build and send RTCP packets following timing rules (including the'timer reconsideration'algorithm). the algorithm has a whole name, she's famous. โฐ๐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. (yes, "Appy". we're preserving the typo exactly, bestie, it's part of the lore. ๐)void endQueueRTCPManager ()โ ends the QueueRTCPManager. that's all she wrote. ๐ฌ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)โ the SDES handler. that's the description, short and sweet. ๐ฌ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 ()โ get the RTCP check interval. โฒ๏ธuint32 getLastSendPacketCount () constโ get the number of data packets sent at the time the last SR was generated. ๐void setPrevMembersNum (uint32 n)โ set the previous members number ton. ๐ขuint32 getPrevMembersCount () constโ get the previous members count. ๐ขsize_t dispatchBYE (const std::string &reason)โ this method is used to send an RTCPBYEpacket. and she'll tell you why withreason. ๐size_t sendControlToDestinations (unsigned char *buffer, size_t len)โ send control stuff to the destinations. the destinations get the control. ๐
๐ Protected Member Functions inherited from RTPDataQueue ๐
RTPDataQueue (uint32 size=defaultMembersHashSize)โ Constructor. ๐RTPDataQueue (uint32 *ssrc, uint32 size=defaultMembersHashSize)โ using this constructor you can start a session with the givenssrc, instead of the usual randomly generated one. custom ssrc, custom life. โจvirtual ~RTPDataQueue ()โ the queue destructor flushes the queue and stops all services. full shutdown, no survivors. ๐virtual void timerTick ()โ a plugin point for timer tick driven events. โฑ๏ธvoid renewLocalSSRC ()โ renew that local SSRC. glow up era. โจvoid endQueue ()โ this method ends the queue. ๐ฌvirtual bool isPendingData (microtimeout_t timeout)=0โ this function is used to check for and schedule against arriving packets based on the derived connection type. note the=0bestie, she's pure virtual, so the derived class has to implement her. no skipping. ๐จ
๐ซถ Protected Member Functions inherited from IncomingDataQueue
okay bestie, these are all the inherited protected goodies โ hand-me-downs but make them iconic:
IncomingDataQueue(uint32 size)virtual ~IncomingDataQueue()bool checkSSRCInIncomingRTPPkt(SyncSourceLink &sourceLink, bool is_new, InetAddress &na, tpport_t tp)โ runs the collision + loop detection and correction algorithm when RTP data packets come rolling in.void setSourceExpirationPeriod(uint8 intervals)โ sets how many RTCP intervals the stack waits before flipping a source fromstateActivetostateInactive, or before deleting the source once it's been sitting instateInactive.virtual size_t takeInDataPacket()โ the service thread calls this to grab the next incoming packet and drop it in the receive list.IncomingDataQueue::IncomingRTPPktLink * getWaiting(uint32 timestamp, const SyncSource *src=NULL)โ fetches a packet out of the receive queue and expires anything older than the current timestamp.bool recordReception(SyncSourceLink &srcLink, const IncomingRTPPkt &pkt, const timeval recvtime)โ logs that a new RTP packet just arrived from this source.void recordExtraction(const IncomingRTPPkt &pkt)โ logs that a packet got pulled out of this source's scheduled reception queue.void purgeIncomingQueue()virtual void onNewSyncSource(const SyncSource &)โ a virtual that fires when a new synchronization source joins the session.virtual bool onRTPPacketRecv(IncomingRTPPkt &)โ virtual hook to parse arriving packets, decide whether they deserve to stay in the queue, and dispatch events.virtual void onExpireRecv(IncomingRTPPkt &)โ hook to filter packets in the receive queue that are currently being expired.virtual bool onSRTPPacketError(IncomingRTPPkt &pkt, int32 errorCode)โ hook that gets called if decoding an incoming SRTP packet went wrong.bool insertRecvPacket(IncomingRTPPktLink *packetLink)โ inserts a just-received packet into the queue (both the general queue and the source-specific one).virtual size_t recvData(unsigned char *buffer, size_t length, InetHostAddress &host, tpport_t &port)=0โ does the actual physical I/O for reading a packet from the source.virtual size_t getNextDataPacketSize() const =0
โจ Protected Member Functions inherited from IncomingDataQueueBase
IncomingDataQueueBase()virtual ~IncomingDataQueueBase()
๐ธ Protected Member Functions inherited from RTPQueueBase
RTPQueueBase(uint32 *ssrc=NULL)void setLocalSSRC(uint32 ssrc)uint32 getLocalSSRCNetwork() constvirtual ~RTPQueueBase()
๐ Protected Member Functions inherited from MembershipBookkeeping
MembershipBookkeeping(uint32 initialSize=defaultMembersHashSize)โ that initial size is just a hint, so the class can allocate the resources it needs to keep members' identifiers and their associated info.virtual ~MembershipBookkeeping()โ purges everyRTPSourcestruct created during the session, plus the hash table and the list of sources.SyncSourceLink * getLink(const SyncSource &source) constbool isMine(const SyncSource &source) constโ tells you whether a synchronization source is recorded in this membership controller.bool isRegistered(uint32 ssrc)โ returns whether a synchronization source with the SSRC identifierssrcalready exists.SyncSourceLink * getSourceBySSRC(uint32 ssrc, bool &created)โ get the description of a source by its ssrc identifier.bool BYESource(uint32 ssrc)โ mark the source identified byssrcas having sent a BYE packet.bool removeSource(uint32 ssrc)โ remove the description of the source identified byssrc.SyncSourceLink * getFirst()SyncSourceLink * getLast()uint32 getMembersCount()void setMembersCount(uint32 n)uint32 getSendersCount()size_t getDefaultMembersHashSize()
๐ฆ Protected Member Functions inherited from SyncSourceHandler
SyncSourceHandler()virtual ~SyncSourceHandler()void * getLink(const SyncSource &source) constโ heads up, this one needsSyncSourceโSyncSourceHandlerfriendship.void setLink(SyncSource &source, void *link)void setParticipant(SyncSource &source, Participant &p)void setState(SyncSource &source, SyncSource::State ns)void setSender(SyncSource &source, bool active)void setDataTransportPort(SyncSource &source, tpport_t p)void setControlTransportPort(SyncSource &source, tpport_t p)void setNetworkAddress(SyncSource &source, InetAddress addr)
๐ Protected Member Functions inherited from ParticipantHandler
ParticipantHandler()virtual ~ParticipantHandler()void setSDESItem(Participant *part, SDESItemType item, const std::string &val)void setPRIVPrefix(Participant *part, const std::string val)
๐ Protected Member Functions inherited from ApplicationHandler
ApplicationHandler()virtual ~ApplicationHandler()void addParticipant(RTPApplication &app, Participant &part)void removeParticipant(RTPApplication &app, RTPApplication::ParticipantLink *pl)
๐
Protected Member Functions inherited from ConflictHandler
ConflictHandler()virtual ~ConflictHandler()ConflictingTransportAddress * searchDataConflict(InetAddress na, tpport_t dtp)ConflictingTransportAddress * searchControlConflict(InetAddress na, tpport_t ctp)void updateConflict(ConflictingTransportAddress &ca)void addConflict(const InetAddress &na, tpport_t dtp, tpport_t ctp)
๐ฅ Protected Member Functions inherited from OutgoingDataQueue
OutgoingDataQueue()virtual ~OutgoingDataQueue()void dispatchImmediate(OutgoingRTPPkt *packet)โ used to write the RTP data packet out to one or more destinations.microtimeout_t getSchedulingTimeout()โ computes the timeout period for scheduling transmission of the next packet sitting at the'head'of the send buffer.size_t dispatchDataPacket()โ the service thread uses this to process the next outgoing packet pending in the sending queue.void setNextSeqNum(uint32 seqNum)โ for those cases where the application needs a way to set the sequence number for the outgoing stream (like implementing the RTSPPLAYcommand).uint32 getCurrentSeqNum(void)void setInitialTimestamp(uint32 ts)uint32 getInitialTimestamp()void purgeOutgoingQueue()virtual void setControlPeer(const InetAddress &host, tpport_t port)
โญ Protected Member Functions inherited from OutgoingDataQueueBase
OutgoingDataQueueBase()virtual ~OutgoingDataQueueBase()
๐ Protected Member Functions inherited from DestinationListHandler
void writeLockDestinationList() constbool addDestinationToList(const InetAddress &ia, tpport_t data, tpport_t control)โ locks the object before modifying it.bool removeDestinationFromList(const InetAddress &ia, tpport_t dataPort, tpport_t controlPort)โ locks the object before modifying it.DestinationListHandler()~DestinationListHandler()bool isSingleDestination() constโ tells you whether there's only one destination in the list.TransportAddress * getFirstDestination() constvoid lockDestinationList() constvoid unlockDestinationList() const
๐ง Protected Member Functions inherited from RTCPCompoundHandler
RTCPCompoundHandler(uint16 mtu=defaultPathMTU)~RTCPCompoundHandler()bool checkCompoundRTCPHeader(size_t len)โ runs the RTCP compound packet header validity check exactly as specified indraft-ietv-avt-rtp-new.void setPathMTU(uint16 mtu)uint16 getPathMTU()
๐ Additional Inherited Members
๐ Public Types inherited from RTPDataQueue
enum Tos { tosBestEffort, tosEnhanced }
rtp.h cc++/rtp.h
๐ Static Public Member Functions inherited from IncomingDataQueue
static size_t getDefaultMembersSize()
๐ซง Protected Types inherited from RTCPCompoundHandler
enum { defaultPathMTU = 1500 }
๐ฏ Protected Attributes inherited from IncomingDataQueue
ThreadLock recvLockIncomingRTPPktLink * recvFirstIncomingRTPPktLink * recvLastuint8 minValidPacketSequenceuint16 maxPacketMisorderuint16 maxPacketDropoutuint8 sourceExpirationPeriodMutex cryptoMutexstd::list< CryptoContext * > cryptoContexts
๐ก๏ธ Protected Attributes inherited from ConflictHandler
ConflictingTransportAddress * firstConflictConflictingTransportAddress * lastConflict
๐ค Protected Attributes inherited from OutgoingDataQueue
Mutex cryptoMutexstd::list< CryptoContext * > cryptoContexts
๐๏ธ Protected Attributes inherited from DestinationListHandler
std::list< TransportAddress * > destList
๐ฆ Protected Attributes inherited from RTCPCompoundHandler
unsigned char * rtcpSendBufferunsigned char * rtcpRecvBuffer
๐ Static Protected Attributes inherited from IncomingDataQueue
static const uint8 defaultMinValidPacketSequencestatic const uint16 defaultMaxPacketMisorderstatic const uint16 defaultMaxPacketDropoutstatic const size_t defaultMembersSize
๐ Static Protected Attributes inherited from MembershipBookkeeping
static const size_t defaultMembersHashSizestatic const uint32 SEQNUMMOD
๐ซ Detailed Description
Adds generic management of RTCP functions to an RTP data queue.
Extends an RTP data i/o queue by adding management of RTCP functions, and here's the whole glow-up it brings:
- Give feedback on the quality of the data distribution.
- Convey the CNAME (the 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 (peep AVPQueue) or particular RTCP extensions.
โ๏ธ Author
Federico Montesino Pouzols fedemp@altern.org
๐ ๏ธ Constructor & Destructor Documentation
QueueRTCPManager::QueueRTCPManager (uint32 size =
RTPDataQueue::defaultMembersHashSize, RTPApplication & app =
defaultApplication()) [protected]
QueueRTCPManager::QueueRTCPManager (uint32 ssrc, uint32 size =
RTPDataQueue::defaultMembersHashSize, RTPApplication & app =
defaultApplication()) [protected]
virtual QueueRTCPManager::~QueueRTCPManager () [protected], [virtual]
๐ Member Function Documentation ๐
okay bestie we're in the deep end now, but it's fine, we're built different. every single member function, no skips, no cap. let's GO ๐
๐ธ bool QueueRTCPManager::checkSSRCInRTCPPkt (SyncSourceLink & sourceLink, bool is_new, InetAddress & na, tpport_t tp) [protected]
This one runs the collision and loop detection and correction algorithm when RTCP packets come rolling in. It follows section 8.2 in draft-ietf-avp-rtp-new, so like, it's literally the spec's algorithm, respect it.
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 () [protected]
Processes the incoming RTCP packets that are just chilling, pending, in the control reception socket. bestie's inbox but for RTCP fr fr.
๐ธ void QueueRTCPManager::controlTransmissionService () [protected]
Builds and sends RTCP packets following the timing rules โ and yes, that includes the 'timer reconsideration' algorithm, she's iconic for a reason. โจ
๐ธ size_t QueueRTCPManager::dispatchBYE (const std::string & reason) [protected], [virtual]
This method is the one that sends an RTCP BYE packet. And an RTCP BYE packet gets sent when one of these two situations happens:
- when leaving the session
- when we've detected that another synchronization source in the same session is using the same SSRC identifier as us ๐ญ (identity theft, in MY session?)
It tries 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. And 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 so we don't get a whole flood of BYE messages. queen behavior honestly, nobody wants that spam.
Parameters:
reasonโ reason to specify in theBYEpacket.
Reimplemented from RTPQueueBase.
Reimplemented in TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >, TRTPSessionBase< DualRTPUDPIPv4Channel, DualRTPUDPIPv4Channel, AVPQueue >, and SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >.
๐ธ void QueueRTCPManager::endQueueRTCPManager () [protected]
That's it, that's the entry. no description bestie, she just exists. ๐
๐ธ const RTPApplication & QueueRTCPManager::getApplication () [inline], [protected]
No description given, she's a mystery and we respect it. ๐ซถ
๐ธ float QueueRTCPManager::getControlBandwidth () const [inline], [protected]
Also no description. lowkey just vibes. ๐
๐ธ microtimeout_t QueueRTCPManager::getDefaultEnd2EndDelay () const [inline]
No description, but the name is doing a lot of work already. ๐
๐ธ microtimeout_t QueueRTCPManager::getEnd2EndDelay () const [inline]
Same deal, no description. moving on bestie. โจ
๐ธ CryptoContextCtrl * QueueRTCPManager::getInQueueCryptoContextCtrl (uint32 ssrc)
Get an input queue CryptoContext identified by SSRC. ๐
Parameters:
ssrcโ RequestCryptoContextfor this incoming SSRC
Returns: Pointer to CryptoContext of the SSRC of NULL if no context available for this SSRC.
๐ธ uint32 QueueRTCPManager::getLastSendPacketCount () const [inline], [protected]
Get the number of data packets sent at the time the last SR was generated. receipts, but make them RTCP. ๐งพ
๐ธ RTCPReceiverInfo * QueueRTCPManager::getMRReceiverInfo (SyncSource & srcFrom)
Asks for the info in the most recent receiver report about the local source received from the source given as parameter. like "hey what did they say about me" but formally. ๐
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. ๐ญ
๐ธ RTCPSenderInfo * QueueRTCPManager::getMRSenderInfo (SyncSource & src)
Gets the most recent sender report received from a synchronization source. the tea, freshly brewed. โ
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.
๐ธ CryptoContextCtrl * QueueRTCPManager::getOutQueueCryptoContextCtrl (uint32 ssrc)
Get an output queue CryptoContext identified by SSRC. ๐
Parameters:
ssrcโ RequestCryptoContextfor this incoming SSRC
Returns: Pointer to CryptoContext of the SSRC of NULL if no context available for this SSRC.
๐ธ uint32 QueueRTCPManager::getPrevMembersCount () const [inline], [protected]
No description, just a count doing its thing. ๐ธ
๐ธ timeval QueueRTCPManager::getRTCPCheckInterval (void) [inline], [protected]
No description. clock behavior. โฐ
๐ธ uint32 QueueRTCPManager::getSendRTCPPacketCount () const [inline]
Get the total number of RTCP packets sent until now. the running total, the receipts, the legacy. ๐
๐ธ virtual void QueueRTCPManager::onGotAPP (SyncSource &, RTCPCompoundHandler::APPPacket &, size_t) [inline], [protected], [virtual]
Plug-in for handling of APP (application specific) RTCP packets. your app, your rules, slay.
Parameters:
- Synchronization source of this packet.
- RTCP
APPpacket struct. - Length of the app data packet, including
ssrc. name and app. specific data.
๐ธ virtual void QueueRTCPManager::onGotRR (SyncSource & source, RecvReport & RR, uint8 blocks) [protected], [virtual]
Plug-in for processing (aka acquiring the information carried in) an incoming RTCP Receiver Report. The default implementation in this class only processes the receiver report blocks about the local source. she's nosy about herself specifically, and honestly? same.
Parameters:
sourceโ Synchronization source this report comes from.RRโ Receiver report structureblocksโ Number of report blocks in the packet
Examples: rtplisten.cpp.
๐ธ bool QueueRTCPManager::onGotSDES (SyncSource & source, RTCPPacket & pkt) [protected]
Parameters:
sourceโ Synchronization source ofSDESRTCP packet.pktโSDESRTCP packet received.
๐ธ virtual bool QueueRTCPManager::onGotSDESChunk (SyncSource & source, SDESChunk & chunk, size_t len) [protected], [virtual]
Plug-in for handling of SDES chunks. the lore, in chunks. ๐งฉ
Parameters:
sourceโ Synchronization source ofSDESchunk.chunkโSDESchunk structure.lenโ Length of chunk, in octets.
Returns: whether there was a CNAME. (iconic identifier, iykyk)
Examples: rtplisten.cpp.
๐ธ virtual void QueueRTCPManager::onGotSR (SyncSource & source, SendReport & SR, uint8 blocks) [protected], [virtual]
Plug-in for processing (aka acquiring the 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. again, main character energy, correct.
Parameters:
sourceโ Synchronization source this report comes from.SRโ Sender report structure.blocksโ Number of report blocks in the packet.
Examples: rtplisten.cpp.
๐ธ void QueueRTCPManager::removeInQueueCryptoContextCtrl (CryptoContextCtrl * cc)
Remove input queue CryptoContext. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts. ๐งน
Parameters:
ccโ Pointer to initializedCryptoContextto remove. If pointer ifNULLthen delete the whole queue
๐ธ void QueueRTCPManager::removeOutQueueCryptoContextCtrl (CryptoContextCtrl * cc)
Remove output queue CryptoContext. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts. bye bestie ๐
Parameters:
ccโ Pointer to initializedCryptoContextto remove.
๐ธ size_t QueueRTCPManager::sendControlToDestinations (unsigned char * buffer, size_t len) [protected]
No description given, but the name is loud enough. sending control to the destinations, as one does. ๐ฎ
๐ธ void QueueRTCPManager::setControlBandwidth (float fraction) [inline], [protected]
No description. set the bandwidth, girl. ๐๏ธ
๐ธ void QueueRTCPManager::setEnd2EndDelay (microtimeout_t t) [inline]
This method sets the maximum end to end delay allowed. And listen โ 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. gone. poof. ๐ซ
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 of0implies there is no limit and is the default
๐ธ void QueueRTCPManager::setInQueueCryptoContextCtrl (CryptoContextCtrl * cc)
Set input queue CryptoContext. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.
Parameters:
ccโ Pointer to initializedCryptoContext.
๐ธ void QueueRTCPManager::setLeavingDelay (microtimeout_t delay) [inline]
Set how much time the stack will wait before deleting a synchronization source that has sent an RTCP BYE packet. giving them a lil grace period before the unfollow. ๐๏ธ
Parameters:
delayโ delay in microseconds.
Note: The default delay is 1000000 microseconds
๐ธ void QueueRTCPManager::setMinRTCPInterval (microtimeout_t interval) [inline]
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 (CryptoContextCtrl * cc)
Set output queue CryptoContext. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.
Parameters:
ccโ Pointer to initializedCryptoContext.
๐ธ void QueueRTCPManager::setPrevMembersNum (uint32 n) [inline], [protected]
Parameters:
nโ Number of members.
๐ธ void QueueRTCPManager::setSendersControlFraction (float fraction) [inline]
Specify the fraction of the total control bandwith to be dedicated to senders reports. (yes, "bandwith", we keep it exactly as written bestie, we don't edit the original's spelling, that's the rule ๐ )
Parameters:
fractionโ fraction of bandwidth, must be between0an1.
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. math is math. โจ
See also: setControlBandwidth
๐ฆ Member Data Documentation ๐ฆ
the variables, the lore keepers:
uint32 QueueRTCPManager::rtcpPMemberstimeval QueueRTCPManager::rtcpTctimeval QueueRTCPManager::rtcpTntimeval QueueRTCPManager::rtcpTp
no descriptions on these, they're mysterious and that's their whole thing. ๐
๐ Author ๐
Generated automatically by Doxygen for ccRTP from the source code.
and that's a wrap on the whole page bestie ๐ this was QueueRTCPManager(3) from the ccRTP source, footer's dated by the Doxygen auto-generation, and honestly? iconic. go read it again, you know you want to. periodt. ๐
โจ๐ธ๐ซถ
๐ฆ where this page comes from
- debian trixie: libccrtp-doc 2.0.9-4.1 ยท GPL-2.0-or-later WITH MIF exception
- ubuntu noble: libccrtp-doc 2.0.9-2.5build1
- ubuntu questing: libccrtp-doc 2.0.9-4.1build1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms