QueueRTCPManager(3)

๐Ÿ“ฆ
version 2.0.9 ยท 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

๐Ÿ’– 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 RTCP BYE packet. 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, 8000 units per second for PCMU, or 90000 units per second for MP2T). 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) โ€” add csrc as 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 to n. ๐Ÿ”ข
  • uint32 getPrevMembersCount () const โ€” get the previous members count. ๐Ÿ”ข
  • size_t dispatchBYE (const std::string &reason) โ€” this method is used to send an RTCP BYE packet. and she'll tell you why with reason. ๐Ÿ‘‹
  • 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 given ssrc, 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 =0 bestie, 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 from stateActive to stateInactive, or before deleting the source once it's been sitting in stateInactive.
  • 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() const
  • virtual ~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 every RTPSource struct created during the session, plus the hash table and the list of sources.
  • SyncSourceLink * getLink(const SyncSource &source) const
  • bool 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 identifier ssrc already 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 by ssrc as having sent a BYE packet.
  • bool removeSource(uint32 ssrc) โ€” remove the description of the source identified by ssrc.
  • 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 needs SyncSource โ€“ SyncSourceHandler friendship.
  • 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 RTSP PLAY command).
  • 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() const
  • bool 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() const
  • void lockDestinationList() const
  • void 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 in draft-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 recvLock
  • IncomingRTPPktLink * recvFirst
  • IncomingRTPPktLink * recvLast
  • uint8 minValidPacketSequence
  • uint16 maxPacketMisorder
  • uint16 maxPacketDropout
  • uint8 sourceExpirationPeriod
  • Mutex cryptoMutex
  • std::list< CryptoContext * > cryptoContexts

๐Ÿ›ก๏ธ Protected Attributes inherited from ConflictHandler

  • ConflictingTransportAddress * firstConflict
  • ConflictingTransportAddress * lastConflict

๐Ÿ“ค Protected Attributes inherited from OutgoingDataQueue

  • Mutex cryptoMutex
  • std::list< CryptoContext * > cryptoContexts

๐Ÿ—‚๏ธ Protected Attributes inherited from DestinationListHandler

  • std::list< TransportAddress * > destList

๐Ÿ“ฆ Protected Attributes inherited from RTCPCompoundHandler

  • unsigned char * rtcpSendBuffer
  • unsigned char * rtcpRecvBuffer

๐Ÿ”’ Static Protected Attributes inherited from IncomingDataQueue

  • static const uint8 defaultMinValidPacketSequence
  • static const uint16 defaultMaxPacketMisorder
  • static const uint16 defaultMaxPacketDropout
  • static const size_t defaultMembersSize

๐Ÿ”‘ Static Protected Attributes inherited from MembershipBookkeeping

  • static const size_t defaultMembersHashSize
  • static 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 ๐Ÿš€


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 the BYE packet.

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 โ€” 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 [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 โ€” 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 [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 APP packet 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 structure
  • blocks โ€” Number of report blocks in the packet

Examples: rtplisten.cpp.


๐ŸŒธ bool QueueRTCPManager::onGotSDES (SyncSource & source, RTCPPacket & pkt) [protected]

Parameters:

  • source โ€” Synchronization source of SDES RTCP packet.
  • pkt โ€” SDES RTCP 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 of SDES chunk.
  • chunk โ€” SDES chunk 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 initialized CryptoContext to remove. If pointer if NULL then 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 initialized CryptoContext to 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 of 0 implies 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 initialized CryptoContext.

๐ŸŒธ 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 initialized CryptoContext.

๐ŸŒธ 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 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. math is math. โœจ

See also: setControlBandwidth


๐Ÿฆ‹ Member Data Documentation ๐Ÿฆ‹

the variables, the lore keepers:

  • uint32 QueueRTCPManager::rtcpPMembers
  • timeval QueueRTCPManager::rtcpTc
  • timeval QueueRTCPManager::rtcpTn
  • timeval 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