OutgoingDataQueue(3)
π NAME π
OutgoingDataQueue β a generic outgoing RTP data queue supporting multiple destinations. Yes bestie, it's OutgoingDataQueue(3), library functions manual energy, and it's giving network queue realness. β¨
πΈ SYNOPSIS πΈ
#include <oqueue.h>
Inherits OutgoingDataQueueBase, and DestinationListHandler.
Inherited by RTPDataQueue.
π Classes π
struct OutgoingRTPPktLink
π Public Member Functions π
bool addDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)bool addDestination (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)bool forgetDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)bool forgetDestination (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0)void addContributor (uint32 csrc)β addcsrcas the CSRC identifier of a new contributor. slay.bool removeContributor (uint32 csrc)β remove CSRC from the list of contributors.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.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.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.microtimeout_t getDefaultSchedulingTimeout () constvoid setSchedulingTimeout (microtimeout_t to)β set the default scheduling timeout to use when no data packets are waiting to be sent.microtimeout_t getDefaultExpireTimeout () constvoid 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.microtimeout_t getExpireTimeout () constuint32 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.uint16 getSequenceNumber () constβ get the sequence number of the next outgoing packet.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 ()void setMaxSendSegmentSize (size_t size)β set maximum payload segment size before fragmenting sends.size_t getMaxSendSegmentSize ()
π 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 () constuint32 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).PayloadType getCurrentPayloadType () consttimeval getInitialTime () const
π οΈ Protected Member Functions π οΈ
OutgoingDataQueue ()virtual ~OutgoingDataQueue ()void dispatchImmediate (OutgoingRTPPkt *packet)β this is used to write the RTP data packet to one or more destinations.microtimeout_t getSchedulingTimeout ()β this computes the timeout period for scheduling transmission of the next packet at the 'head' of the send buffer.size_t dispatchDataPacket ()β this function is used by the service thread to process the next outgoing packet pending in the sending queue.void setNextSeqNum (uint32 seqNum)β for thoses cases in which the application requires a method to set the sequence number for the outgoing stream (such as for 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 RTPQueueBase π
RTPQueueBase (uint32 *ssrc=NULL)void setLocalSSRC (uint32 ssrc)uint32 getLocalSSRCNetwork () constvirtual ~RTPQueueBase ()virtual size_t dispatchBYE (const std::string &)β a plugin point for posting of BYE messages.virtual void renewLocalSSRC ()
π 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β get whether there is only a destination in the list.TransportAddress * getFirstDestination () constvoid lockDestinationList () constvoid unlockDestinationList () const
β Protected Attributes β
Mutex cryptoMutexstd::list< CryptoContext * > cryptoContexts
π Protected Attributes inherited from DestinationListHandler π
std::list< TransportAddress * > destList
π Detailed Description π
A generic outgoing RTP data queue supporting multiple destinations. That's the whole vibe. It's literally the description again, but make it make sense: this is the queue that handles outgoing RTP data and can send to more than one destination. No cap. π
β¨ Author β¨
Federico Montesino Pouzols fedemp@altern.org
π οΈ Constructor & Destructor Documentation π οΈ
OutgoingDataQueue::OutgoingDataQueue () [protected]
Protected constructor, bestie. It's giving internal setup only.
virtual OutgoingDataQueue::~OutgoingDataQueue () [inline], [protected], [virtual]
Inline, protected, virtual destructor. The whole trio. Periodt.
β¨ MEMBER FUNCTION DOCUMENTATION β¨
okay bestie, this is the main character energy of the whole page π Every single method, no skips. periodt.
void OutgoingDataQueue::addContributor (uint32 csrc)β Addscsrcas the CSRC identifier of a new contributor. This method adds the CSRC identifier to a list of contributors that will be inserted in every packet enqueued from now on. slay.bool OutgoingDataQueue::addDestination (const InetHostAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0)- Examples:
audiorx.cpp,audiotx.cpp,rtphello.cpp, andrtpsend.cpp.
- Examples:
bool OutgoingDataQueue::addDestination (const InetMcastAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0)size_t OutgoingDataQueue::dispatchDataPacket () [protected]β This function is used by the service thread to process the next outgoing packet pending in the sending queue. the way it do be processing.- Returns: number of bytes sent.
0if silent,<0if error.
- Returns: number of bytes sent.
void OutgoingDataQueue::dispatchImmediate (OutgoingRTPPkt * packet) [protected]β This is used to write the RTP data packet to one or more destinations. It is used by bothsendImmediateand bydispatchDataPacket.- Parameters: RTP packet to send.
bool OutgoingDataQueue::forgetDestination (const InetHostAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0)bool OutgoingDataQueue::forgetDestination (const InetMcastAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0)uint32 OutgoingDataQueue::getCurrentSeqNum (void) [inline], [protected]microtimeout_t OutgoingDataQueue::getDefaultExpireTimeout () const [inline]microtimeout_t OutgoingDataQueue::getDefaultSchedulingTimeout () const [inline]microtimeout_t OutgoingDataQueue::getExpireTimeout () const [inline]uint32 OutgoingDataQueue::getInitialTimestamp () [inline], [protected]bool OutgoingDataQueue::getMark () const [inline]β Get whether the mark bit will be set in the next packet. πCryptoContext * OutgoingDataQueue::getOutQueueCryptoContext (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.
- Parameters:
microtimeout_t OutgoingDataQueue::getSchedulingTimeout () [protected]β This computes the timeout period for scheduling transmission of the next packet at the 'head' of the send buffer. If no packets are waiting, a default timeout is used. This actually forms the 'isPending()' timeout of the rtp receiver in the service thread.- Returns: timeout until next packet is scheduled to send.
uint32 OutgoingDataQueue::getSendOctetCount () const [inline]β Get the total number of octets (payload only) sent so far.- Returns: total number of payload octets sent in RTP packets.
uint32 OutgoingDataQueue::getSendPacketCount () const [inline]β Get the total number of packets sent so far.- Returns: total number of packets sent
uint16 OutgoingDataQueue::getSequenceNumber () const [inline]β Get the sequence number of the next outgoing packet.- Returns: the 16 bit sequence number.
bool OutgoingDataQueue::isSending () constβ Determine if outgoing packets are waiting to send.- Returns:
trueif there are packets waiting to be send.
- Returns:
void OutgoingDataQueue::purgeOutgoingQueue () [protected]void OutgoingDataQueue::putData (uint32 stamp, const unsigned char * data = NULL, size_t len = 0)β This is used to create a data packet in the send queue. Sometimes a 'NULL' or empty packet will be used instead, and these are known as 'silent' packets. 'Silent' packets are used simply to 'push' the scheduler along more accurately by giving the appearance that a next packet is waiting to be sent and to provide a valid timestamp for that packet. the drama of silent packets.- Parameters:
stampβ Timestamp for expected send time of packet.dataβ Value or NULL if special 'silent' packet.lenβ May be 0 to indicate a default by payload type.
- Examples:
audiotx.cpp,ccrtptest.cpp,rtpduphello.cpp,rtphello.cpp, andrtpsend.cpp.
- Parameters:
bool OutgoingDataQueue::removeContributor (uint32 csrc)β Remove CSRC from the list of contributors.void OutgoingDataQueue::removeOutQueueCryptoContext (CryptoContext * cc)β Remove output queue CryptoContext. The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.- Parameters:
ccβ Pointer to initialized CryptoContext to remove.
- Parameters:
void OutgoingDataQueue::sendImmediate (uint32 stamp, const unsigned char * data = NULL, size_t len = 0)β This is used to create a data packet and send it immediately. Sometimes a 'NULL' or empty packet will be used instead, and these are known as 'silent' packets. 'Silent' packets are used simply to 'push' the scheduler along more accurately by giving the appearance that a next packet is waiting to be sent and to provide a valid timestamp for that packet.- Parameters:
stampβ Timestamp immediate send time of packet.dataβ Value or NULL if special 'silent' packet.lenβ May be 0 to indicate a default by payload type.
- Parameters:
virtual void OutgoingDataQueue::setControlPeer (const InetAddress & host, tpport_t port) [inline], [protected], [virtual]- Reimplemented in
RTPDuplex,TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >, andTRTPSessionBase< DualRTPUDPIPv4Channel, DualRTPUDPIPv4Channel, AVPQueue >.
- Reimplemented in
void OutgoingDataQueue::setExpireTimeout (microtimeout_t to) [inline]β 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.- Parameters:
toβ timeout to expire unsent packets in milliseconds.
- Examples:
ccrtptest.cpp,rtpduphello.cpp,rtphello.cpp,rtplisten.cpp, andrtpsend.cpp.
- Parameters:
void OutgoingDataQueue::setInitialTimestamp (uint32 ts) [inline], [protected]void OutgoingDataQueue::setMark (bool mark) [inline]β Set marker bit for the packet in which the next data provided will be send. When transmitting audio, should be set for the first packet of a talk spurt. When transmitting video, should be set for the last packet for a video frame. marker bit era.- Parameters:
markβ Marker bit value for next packet.
- Parameters:
void OutgoingDataQueue::setNextSeqNum (uint32 seqNum) [inline], [protected]β For thoses cases in which the application requires a method to set the sequence number for the outgoing stream (such as for implementing the RTSP PLAY command). iykyk.- Parameters:
seqNumβ next sequence number to be used for outgoing packets.
- Parameters:
void OutgoingDataQueue::setOutQueueCryptoContext (CryptoContext * cc)β Set output queue CryptoContext. The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.- Parameters:
ccβ Pointer to initialized CryptoContext.
- Parameters:
void OutgoingDataQueue::setPadding (uint8 paddinglen) [inline]β Set padding. All outgoing packets will be transparently padded to a multiple of paddinglen.- Parameters:
paddinglenβ pad packets to a length multiple of paddinglen.
- Parameters:
size_t OutgoingDataQueue::setPartial (uint32 timestamp, unsigned char * data, size_t offset, size_t max)β Set partial data for an already queued packet. This is often used for multichannel data.- Parameters:
timestampβ Timestamp of packet.dataβ Buffer to copy from.offsetβ Offset to copy from.maxβ Maximum data size.
- Returns: Number of packet data bytes set.
- Parameters:
void OutgoingDataQueue::setSchedulingTimeout (microtimeout_t to) [inline]β Set the default scheduling timeout to use when no data packets are waiting to be sent.- Parameters:
toβ timeout in milliseconds.
- Examples:
audiorx.cpp,audiotx.cpp,ccrtptest.cpp,rtpduphello.cpp,rtphello.cpp, andrtpsend.cpp.
- Parameters:
β¨ MEMBER DATA DOCUMENTATION β¨
the data members, just vibing π¦
bool OutgoingDataQueue::completestd::list<CryptoContext *> OutgoingDataQueue::cryptoContexts [protected]Mutex OutgoingDataQueue::cryptoMutex [mutable], [protected]bool OutgoingDataQueue::markeduint32 OutgoingDataQueue::octetCounttimeval OutgoingDataQueue::overflowTimeuint32 OutgoingDataQueue::packetCountuint8 OutgoingDataQueue::paddinglenuint16 OutgoingDataQueue::sendCCuint16 OutgoingDataQueue::sendSequint32 OutgoingDataQueue::sendSources[16]
π AUTHOR π
Generated automatically by Doxygen for ccRTP from the source code.
and that's the whole thing, bestie π No cap, we kept every single detail. ccRTP β’ OutgoingDataQueue(3) β catch u later β¨π¦
π¦ 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