RTPDuplex(3)

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

๐ŸŒธ RTPDuplex(3) ๐ŸŒธ

okay bestie, so this one lives in the Library Functions Manual and it's called RTPDuplex ๐Ÿ’–


โœจ NAME โœจ

RTPDuplex โ€” a peer-associated RTP socket pair for physically connected peer hosts. like, two sockets that are literally vibing with each other, no cap ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

#include <cc++/rtp.h>

Inherits RTPDataQueue, UDPReceive, and UDPTransmit. yeah she's got main character energy and a whole family tree ๐Ÿ’…

๐ŸŒˆ Public Member Functions

  • RTPDuplex (const InetAddress &bind, tpport_t local, tpport_t remote) โ€” the glow-up constructor, no description attached, we move โœจ
  • virtual ~RTPDuplex () โ€” the destructor, she exits gracefully ๐Ÿ’€
  • UDPTransmit::Error connect (const InetHostAddress &host, tpport_t port=0) โ€” link up with a host, port defaults to 0 ๐Ÿซถ

๐ŸŒˆ Public Member Functions inherited from RTPDataQueue

  • void setTypeOfService (Tos tos) โ€” tell the world what kind of service your app is expecting to use ๐ŸŒŸ
  • void enableStack () โ€” turn ON packet queue processing in the stack โญ
  • void disableStack () โ€” turn OFF packet queue processing in the stack ๐Ÿ’ค
  • bool isActive () const โ€” check that active connection state flag, is she awake or not ๐Ÿ™ˆ
  • uint32 getCurrentTimestamp () const โ€” grab the timestamp you should slap on a packet whose payload sampling instant lines up with the current system time โฐ
  • void setSessionBandwidth (uint32 bw) โ€” set the bandwidth of the current session ๐Ÿ“ถ
  • uint32 getDefaultSessionBandwidth () const โ€” the default, as advertised ๐ŸŽ€
  • uint32 getSessionBandwidth () const โ€” the current one, fr fr ๐Ÿ’œ
  • void setTimeclock () โ€” set the packet timeclock so timestamps stay in sync ๐Ÿ•ฐ๏ธ
  • timeout_t getTimeclock () const โ€” get that same packet timeclock back โœจ

๐ŸŒˆ Public Member Functions inherited from IncomingDataQueue

  • SyncSourcesIterator begin () โ€” start of the iterator, let's gooo ๐ŸŒˆ
  • SyncSourcesIterator end () โ€” end of the iterator, and that's the vibe ๐Ÿฆ‹
  • const AppDataUnit * getData (uint32 stamp, const SyncSource *src=NULL) โ€” pull data out of a specific timestamped packet, but only if such a packet is actually hanging out in the receive buffer right now; src defaults to NULL ๐Ÿ‘‘
  • bool isWaiting (const SyncSource *src=NULL) const โ€” are packets chilling in the reception queue? src defaults to NULL ๐Ÿ™ˆ
  • uint32 getFirstTimestamp (const SyncSource *src=NULL) const โ€” timestamp of the first packet waiting in the queue; src defaults to NULL ๐Ÿ“
  • void setMinValidPacketSequence (uint8 packets) โ€” when packets arrive from a new source it can be handy to reject the first few before you're actually sure the source is valid ๐Ÿงš
  • uint8 getDefaultMinValidPacketSequence () const โ€” the default min valid packet sequence โœจ
  • uint8 getMinValidPacketSequence () const โ€” get the minimum number of consecutive packets that must show up from a source before its data packets get accepted, periodt ๐Ÿ’…
  • void setMaxPacketMisorder (uint16 packets) โ€” set the max packet misorder ๐ŸŒ€
  • uint16 getDefaultMaxPacketMisorder () const โ€” the default max packet misorder โญ
  • uint16 getMaxPacketMisorder () const โ€” get the max packet misorder ๐Ÿ’ซ
  • void setMaxPacketDropout (uint16 packets) โ€” also stops packets sent after a source restart from being accepted immediately, sneaky ๐Ÿšซ
  • uint16 getDefaultMaxPacketDropout () const โ€” the default max packet dropout ๐ŸŽ€
  • uint16 getMaxPacketDropout () const โ€” get the max packet dropout ๐Ÿ’œ
  • void setInQueueCryptoContext (CryptoContext *cc) โ€” set the input queue CryptoContext ๐Ÿ”
  • void removeInQueueCryptoContext (CryptoContext *cc) โ€” remove the input queue CryptoContext ๐Ÿ—‘๏ธ
  • CryptoContext * getInQueueCryptoContext (uint32 ssrc) โ€” get an input queue CryptoContext by its SSRC ๐Ÿ”‘

๐ŸŒˆ Public Member Functions inherited from IncomingDataQueueBase

  • size_t getDefaultMaxRecvPacketSize () const โ€” the default max recv packet size ๐Ÿ“ฆ
  • size_t getMaxRecvPacketSize () const โ€” the current max recv packet size ๐Ÿ“ฌ
  • void setMaxRecvPacketSize (size_t maxsize) โ€” set that max recv packet size, go off โœจ

๐ŸŒˆ 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 โ€” grab the local SSRC ๐Ÿชช
  • uint32 getCurrentRTPClockRate () const โ€” clock rate in RTP clock units, like 8000 units per second for PCMU or 90000 units per second for MP2T โฑ๏ธ
  • PayloadType getCurrentPayloadType () const โ€” the current payload type ๐Ÿท๏ธ
  • timeval getInitialTime () const โ€” the initial time ๐Ÿ•

๐ŸŒˆ Public Member Functions inherited from OutgoingDataQueue

  • bool addDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0) โ€” add a host destination; dataPort defaults to DefaultRTPDataPort, controlPort defaults to 0 ๐Ÿ“ฎ
  • bool addDestination (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0) โ€” add a multicast destination; same defaults, dataPort=DefaultRTPDataPort, controlPort=0 ๐Ÿ“ก
  • bool forgetDestination (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0) โ€” forget a host destination, bye bestie ๐Ÿ‘‹
  • bool forgetDestination (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0) โ€” forget a multicast destination, same energy ๐Ÿ’”
  • void addContributor (uint32 csrc) โ€” add csrc as the CSRC identifier of a new contributor ๐Ÿ™‹
  • bool removeContributor (uint32 csrc) โ€” remove that CSRC from the contributors list ๐Ÿšช
  • bool isSending () const โ€” are outgoing packets waiting to send? ๐Ÿ‘€
  • void putData (uint32 stamp, const unsigned char *data=NULL, size_t len=0) โ€” this is how you create a data packet in the send queue; data defaults to NULL, len defaults to 0 ๐Ÿ“
  • void sendImmediate (uint32 stamp, const unsigned char *data=NULL, size_t len=0) โ€” create a data packet AND send it immediately, no waiting around ๐Ÿš€
  • void setPadding (uint8 paddinglen) โ€” set padding ๐Ÿ›‹๏ธ
  • void setMark (bool mark) โ€” set the marker bit for the packet in which the next data you provide will be sent ๐Ÿ”–
  • bool getMark () const โ€” find out 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 a packet that's already queued ๐Ÿงฉ
  • 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, which expires packets pending in the send queue that have gone unsent and are already 'too late' to be sent now ๐Ÿ˜ญ
  • microtimeout_t getExpireTimeout () const โ€” get the expire timeout ๐Ÿ•ฐ๏ธ
  • uint32 getSendPacketCount () const โ€” total number of packets sent so far, flex ๐Ÿ“Š
  • uint32 getSendOctetCount () const โ€” total number of octets sent so far, payload only ๐Ÿ”ข
  • uint16 getSequenceNumber () const โ€” sequence number of the next outgoing packet ๐Ÿ”ข
  • void setOutQueueCryptoContext (CryptoContext *cc) โ€” set the output queue CryptoContext ๐Ÿ”
  • void removeOutQueueCryptoContext (CryptoContext *cc) โ€” remove the 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 the maximum payload segment size before sends get fragmented, we love boundaries โœ‚๏ธ
  • size_t getMaxSendSegmentSize () โ€” the current max send segment size ๐ŸŽ€

๐Ÿ’… Protected Member Functions

  • bool isPendingData (microtimeout_t timeout) โ€” is there pending data? โฒ๏ธ
  • size_t sendData (const unsigned char *const buffer, size_t len) โ€” send some data ๐Ÿ“ค
  • size_t recvData (unsigned char *buffer, size_t len, InetHostAddress &na, tpport_t &tp) โ€” receive some data ๐Ÿ“ฅ
  • void setDataPeer (const InetAddress &, tpport_t) โ€” set the data peer ๐Ÿค
  • void setControlPeer (const InetAddress &, tpport_t) โ€” set the control peer ๐ŸŽ›๏ธ
  • size_t getNextDataPacketSize () const โ€” size of the next data packet ๐Ÿ“
  • SyncSource & getPeer () โ€” grab the peer ๐Ÿซถ

๐Ÿ’… Protected Member Functions inherited from RTPDataQueue

  • RTPDataQueue (uint32 size=defaultMembersHashSize) โ€” the constructor; size defaults to defaultMembersHashSize ๐Ÿ—๏ธ
  • RTPDataQueue (uint32 *ssrc, uint32 size=defaultMembersHashSize) โ€” with this constructor you can start a session with a given ssrc instead of the usual randomly generated one, custom queen energy; size defaults to defaultMembersHashSize ๐ŸŽฒ
  • virtual ~RTPDataQueue () โ€” the queue destructor flushes the queue and stops all services, she cleans up after herself ๐Ÿงน
  • virtual void timerTick () โ€” a plugin point for timer tick driven events โฐ
  • void renewLocalSSRC () โ€” renew the local SSRC ๐Ÿ”„
  • void endQueue () โ€” this method ends the queue, that's it that's the method ๐Ÿ›‘

๐Ÿ’… Protected Member Functions inherited from IncomingDataQueue

  • IncomingDataQueue (uint32 size) โ€” constructor, takes a size ๐Ÿ—๏ธ
  • virtual ~IncomingDataQueue () โ€” destructor ๐Ÿ’€
  • bool checkSSRCInIncomingRTPPkt (SyncSourceLink &sourceLink, bool is_new, InetAddress &na, tpport_t tp) โ€” apply collision and loop detection and correction algorithm when receiving RTP data packets ๐Ÿ”
  • void setSourceExpirationPeriod (uint8 intervals) โ€” set how many RTCP intervals the stack will wait to flip a source from stateActive to stateInactive, or to delete the source after it's been in stateInactive ๐Ÿ•ฐ๏ธ
  • virtual size_t takeInDataPacket () โ€” used by the service thread to process the next incoming packet and drop it in the receive list ๐Ÿงบ
  • IncomingDataQueue::IncomingRTPPktLink * getWaiting (uint32 timestamp, const SyncSource *src=NULL) โ€” fetch a packet in the receive queue and expire packets older than the current timestamp; src defaults to NULL โŒ›
  • bool recordReception (SyncSourceLink &srcLink, const IncomingRTPPkt &pkt, const timeval recvtime) โ€” log reception of a new RTP packet from this source ๐Ÿ“
  • void recordExtraction (const IncomingRTPPkt &pkt) โ€” log extraction of a packet from this source out of the scheduled reception queue ๐Ÿ“ค
  • void purgeIncomingQueue () โ€” purge the incoming queue ๐Ÿงผ
  • virtual void onNewSyncSource (const SyncSource &) โ€” virtual, called when a new synchronization source joins the session ๐ŸŽ‰
  • virtual bool onRTPPacketRecv (IncomingRTPPkt &) โ€” a virtual function to help parse arriving packets, deciding whether they should be kept in the queue and to dispatch events ๐ŸŽฏ
  • virtual void onExpireRecv (IncomingRTPPkt &) โ€” a hook to filter packets in the receive queue that are being expired ๐Ÿ—‘๏ธ
  • virtual bool onSRTPPacketError (IncomingRTPPkt &pkt, int32 errorCode) โ€” a hook that gets called if decoding an incoming SRTP was erroneous ๐Ÿ˜ญ
  • virtual bool end2EndDelayed (IncomingRTPPktLink &) โ€” end-to-end delayed hook ๐Ÿข
  • bool insertRecvPacket (IncomingRTPPktLink *packetLink) โ€” insert a just-received packet into the queue, both the general queue and the source-specific queue ๐Ÿงท

๐Ÿ’… Protected Member Functions inherited from IncomingDataQueueBase

  • IncomingDataQueueBase () โ€” constructor ๐Ÿ—๏ธ
  • virtual ~IncomingDataQueueBase () โ€” destructor ๐Ÿ’€

๐Ÿ’… Protected Member Functions inherited from RTPQueueBase

  • RTPQueueBase (uint32 *ssrc=NULL) โ€” constructor; ssrc defaults to NULL ๐Ÿ—๏ธ
  • void setLocalSSRC (uint32 ssrc) โ€” set the local SSRC ๐Ÿชช
  • uint32 getLocalSSRCNetwork () const โ€” get the local SSRC network ๐ŸŒ
  • virtual ~RTPQueueBase () โ€” destructor ๐Ÿ’€
  • virtual size_t dispatchBYE (const std::string &) โ€” a plugin point for posting of BYE messages ๐Ÿ‘‹

๐Ÿซถ Protected Member Functions inherited from MembershipBookkeeping

  • MembershipBookkeeping (uint32 initialSize=defaultMembersHashSize) โ€” okay so this initial size is just a hint, bestie: it helps allocate the resources needed to keep the members' identifiers and associated info. โœจ
  • virtual ~MembershipBookkeeping () โ€” purges every RTPSource structure created during the session, plus the hash table and the list of sources. ๐Ÿ’…
  • SyncSourceLink * getLink (const SyncSource &source) const โ€” signature only, iykyk.
  • bool isMine (const SyncSource &source) const โ€” tells you whether a synchronization source is recorded in this membership controller. ๐Ÿ‘€
  • bool isRegistered (uint32 ssrc) โ€” returns whether there is already a synchronization source with the 'ssrc' SSRC identifier.
  • SyncSourceLink * getSourceBySSRC (uint32 ssrc, bool &created) โ€” gets the description of a source by its ssrc identifier.
  • bool BYESource (uint32 ssrc) โ€” marks the source identified by ssrc as having sent a BYE packet. ๐Ÿ‘‹
  • bool removeSource (uint32 ssrc) โ€” removes the description of the source identified by ssrc.
  • SyncSourceLink * getFirst () โ€” signature only.
  • SyncSourceLink * getLast () โ€” signature only.
  • uint32 getMembersCount () โ€” signature only.
  • void setMembersCount (uint32 n) โ€” signature only.
  • uint32 getSendersCount () โ€” signature only.
  • size_t getDefaultMembersHashSize () โ€” signature only.

๐Ÿฆ‹ Protected Member Functions inherited from SyncSourceHandler

  • SyncSourceHandler ()
  • virtual ~SyncSourceHandler ()
  • void * getLink (const SyncSource &source) const โ€” this one requires 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 to one or more destinations. ๐Ÿ“ฌ
  • microtimeout_t getSchedulingTimeout () โ€” computes the timeout period for scheduling transmission of the next packet at the 'head' of the send buffer. โฐ
  • size_t dispatchDataPacket () โ€” used by the service thread to process the next outgoing packet pending in the sending queue. ๐Ÿงต
  • void setNextSeqNum (uint32 seqNum) โ€” for those cases where the application needs a method to set the sequence number for the outgoing stream (like when implementing the RTSP PLAY command). ๐ŸŽฌ
  • uint32 getCurrentSeqNum (void)
  • void setInitialTimestamp (uint32 ts)
  • uint32 getInitialTimestamp ()
  • void purgeOutgoingQueue ()

๐Ÿงš 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 is only a destination in the list. 1๏ธโƒฃ
  • TransportAddress * getFirstDestination () const
  • void lockDestinationList () const
  • void unlockDestinationList () const

โœจ 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 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

๐ŸŒŸ 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 ๐Ÿ’–

A peer associated RTP socket pair for physically connected peer hosts. ๐Ÿ‘ฏโ€โ™€๏ธ

This has no RTCP and assumes the receiver is connected to a known transmitter, hence no 'foreign' packets will arrive. No cap. ๐Ÿšซ

Author

David Sugar

RTP peer host over UDP. ๐ŸŒ

Examples

rtpduphello.cpp.

Author

Generated automatically by Doxygen for ccRTP from the source code.


And the footer? Itโ€™s just ccRTP and RTPDuplex(3) โ€” thatโ€™s the source/version and the page, plus whatever date Doxygen stamped on it, bestie. Stay iconic. ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from