SINGLETHREADRTPSESSION(3)

πŸ“¦
version 2.0.9 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue > β€” she's a template class, and what she does is add the threading aspect to the RTPSessionBase template, in one of the many possible ways. Periodt.

This page lives in the Library Functions Manual, section (3) β€” the header up top is literally SingleThre...viceQueue >(3) because somebody let the title get chopped. Not me tho. πŸ™ˆ

✨ SYNOPSIS ✨

#include <rtp.h>

Inherits Thread, and TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >.

πŸŽ€ Public Member Functions πŸŽ€

  • SingleThreadRTPSession (const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication())
  • SingleThreadRTPSession (uint32 ssrc, const InetHostAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication())
  • SingleThreadRTPSession (const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication(), uint32 iface=0)
  • SingleThreadRTPSession (uint32 ssrc, const InetMcastAddress &ia, tpport_t dataPort=DefaultRTPDataPort, tpport_t controlPort=0, int pri=0, uint32 memberssize=MembershipBookkeeping::defaultMembersHashSize, RTPApplication &app=defaultApplication(), uint32 iface=0)
  • ~SingleThreadRTPSession ()
  • void startRunning () β€” Activate stack and start service thread. πŸš€

πŸ¦‹ Public Member Functions inherited from TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue > πŸ¦‹

  • TRTPSessionBase (const InetHostAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app) β€” Builds a session waiting for packets in a host address.
  • TRTPSessionBase (uint32 ssrc, const InetHostAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app) β€” Builds a session with the specified ssrc identifier for the local source.
  • TRTPSessionBase (const InetMcastAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app, uint32 iface) β€” Builds a session waiting for packets in a multicast address.
  • TRTPSessionBase (uint32 ssrc, const InetMcastAddress &ia, tpport_t dataPort, tpport_t controlPort, uint32 membersSize, RTPApplication &app, uint32 iface) β€” Builds a session waiting for packets in a multicast address, with the specified ssrc identifier for the local source.
  • Socket::Error setMcastTTL (uint8 ttl) β€” Set the value of the TTL field in the sent packets.
  • virtual ~TRTPSessionBase ()
  • RTPDataChannel * getDSO (void)

🌈 Public Member Functions inherited from AVPQueue 🌈

  • void setControlBandwidth (float fraction) β€” Specify the bandwith available for control (RTCP) packets.
  • float getControlBandwidth () const

πŸ’… Public Member Functions inherited from QueueRTCPManager πŸ’…

  • RTCPSenderInfo * getMRSenderInfo (SyncSource &src) β€” Get the most recent sender report received from a synchronization source.
  • RTCPReceiverInfo * getMRReceiverInfo (SyncSource &srcFrom) β€” Ask for the info in the most recent receiver report about the local source received from the source given as parameter.
  • void setLeavingDelay (microtimeout_t delay) β€” Set how much time the stack will wait before deleting a synchronization source that has sent an RTCP BYE packet.
  • void setEnd2EndDelay (microtimeout_t t) β€” This method sets the maximum end to end delay allowed.
  • microtimeout_t getDefaultEnd2EndDelay () const
  • microtimeout_t getEnd2EndDelay () const
  • void setSendersControlFraction (float fraction) β€” Specify the fraction of the total control bandwith to be dedicated to senders reports.
  • void setMinRTCPInterval (microtimeout_t interval) β€” Manually set the minimum interval for sending RTP compound packets.
  • uint32 getSendRTCPPacketCount () const β€” Get the total number of RTCP packets sent until now.
  • void setOutQueueCryptoContextCtrl (CryptoContextCtrl *cc) β€” Set output queue CryptoContext.
  • void removeOutQueueCryptoContextCtrl (CryptoContextCtrl *cc) β€” Remove output queue CryptoContext.
  • CryptoContextCtrl * getOutQueueCryptoContextCtrl (uint32 ssrc) β€” Get an output queue CryptoContext identified by SSRC.
  • 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.

⭐ Public Member Functions inherited from RTPDataQueue ⭐

  • void setTypeOfService (Tos tos) β€” Specify the kind of service the application expects to use.
  • void enableStack () β€” Enable packet queue processing in the stack.
  • void disableStack () β€” Disable packet queue processing in the stack.
  • bool isActive () const β€” Get active connection state flag.
  • uint32 getCurrentTimestamp () const β€” Get the timestamp that should be given for a packet whose payload sampling instant corresponds to the current system time.
  • void setSessionBandwidth (uint32 bw) β€” Specify the bandwidth of the current session.
  • uint32 getDefaultSessionBandwidth () const
  • uint32 getSessionBandwidth () const
  • void setTimeclock () β€” Set the packet timeclock for synchronizing timestamps.
  • timeout_t getTimeclock () const β€” Get the packet timeclock for synchronizing timestamps.

πŸ“ Public Member Functions inherited from IncomingDataQueue πŸ“

  • SyncSourcesIterator begin ()
  • SyncSourcesIterator end ()
  • 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.
  • bool isWaiting (const SyncSource *src=NULL) const β€” Determine if packets are waiting in the reception queue.
  • uint32 getFirstTimestamp (const SyncSource *src=NULL) const β€” Get timestamp of first packet waiting in the queue.
  • void setMinValidPacketSequence (uint8 packets) β€” When receiving packets from a new source, it may be convenient to reject a first few packets before we are really sure the source is valid.
  • uint8 getDefaultMinValidPacketSequence () const
  • uint8 getMinValidPacketSequence () const β€” Get the minimun number of consecutive packets that must be received from a source before accepting its data packets.
  • void setMaxPacketMisorder (uint16 packets)
  • uint16 getDefaultMaxPacketMisorder () const
  • uint16 getMaxPacketMisorder () const
  • void setMaxPacketDropout (uint16 packets) β€” It also prevents packets sent after a restart of the source being immediately accepted.
  • uint16 getDefaultMaxPacketDropout () const
  • uint16 getMaxPacketDropout () const
  • 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
  • size_t getMaxRecvPacketSize () const
  • void setMaxRecvPacketSize (size_t 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
  • 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).
  • PayloadType getCurrentPayloadType () const
  • timeval getInitialTime () const

🫢 Public Member Functions inherited from OutgoingDataQueue 🫢

  • 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) β€” Add csrc as the CSRC identifier of a new contributor.
  • 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 () const
  • 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
  • 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.
  • microtimeout_t getExpireTimeout () const
  • 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.
  • 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 ()

πŸ›‘οΈ Protected Member Functions

okay so these are the inner-circle methods β€” not for public consumption, but your subclass can totally touch them. πŸ’…

  • void disableStack (void) β€” turns the stack off, bestie. no more of that.
  • void enableStack (void) β€” and this one turns it back on. we love a comeback. ✨
  • microtimeout_t getSchedulingTimeout (void) β€” hands you the scheduling timeout value.
  • void controlReceptionService (void) β€” runs the control reception service.
  • void controlTransmissionService (void) β€” runs the control transmission service.
  • timeval getRTCPCheckInterval (void) β€” gives you the RTCP check interval as a timeval.
  • size_t dispatchDataPacket (void) β€” dispatches a data packet. returns a size_t, obviously.
  • virtual void timerTick (void) β€” the virtual timer tick. it ticks. it's virtual. slay.
  • virtual bool isPendingData (microtimeout_t timeout) β€” virtual check for pending data, with a timeout.
  • virtual void run (void) β€” Single runnable method for this RTP stacks, schedules outgoing and incoming RTP data and RTCP packets.
  • size_t takeInDataPacket (void) β€” takes in a data packet.
  • size_t dispatchBYE (const std::string &str) β€” dispatches a BYE, with a std::string along for the ride. πŸ’”

Protected Member Functions inherited from TRTPSessionBase<RTPDataChannel, RTCPChannel, ServiceQueue>

the family tree is giving generational wealth ngl 🫢

  • bool isPendingData (microtimeout_t timeout) β€” is there data waiting? pass a timeout and find out.
  • InetHostAddress getDataSender (tpport_t *port=NULL) const β€” grabs the data sender's address. port pointer defaults to NULL.
  • size_t getNextDataPacketSize () const β€” how big is the next data packet? this tells you.
  • size_t recvData (unsigned char *buffer, size_t len, InetHostAddress &na, tpport_t &tp) β€” Receive data from the data channel/socket.
  • void setDataPeer (const InetAddress &host, tpport_t port) β€” sets who the data peer is.
  • size_t sendData (const unsigned char *const buffer, size_t len) β€” sends data. note the const doing double duty, iconic.
  • SOCKET getDataRecvSocket () const β€” hands back the data receive socket.
  • bool isPendingControl (microtimeout_t timeout) β€” same energy as isPendingData, but for control.
  • InetHostAddress getControlSender (tpport_t *port=NULL) const β€” the control sender's address, with port defaulting to NULL.
  • size_t recvControl (unsigned char *buffer, size_t len, InetHostAddress &na, tpport_t &tp) β€” Receive data from the control channel/socket.
  • void setControlPeer (const InetAddress &host, tpport_t port) β€” sets the control peer.
  • size_t sendControl (const unsigned char *const buffer, size_t len) β€” sends control data.
  • SOCKET getControlRecvSocket () const β€” the control receive socket.
  • Socket::Error joinGroup (const InetMcastAddress &ia, uint32 iface) β€” Join a multicast group.
  • Socket::Error leaveGroup (const InetMcastAddress &ia) β€” Leave a multicast group. it's giving Irish goodbye πŸ™ˆ
  • void endSocket () β€” wraps up the socket.

Protected Member Functions inherited from AVPQueue

  • AVPQueue (uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication()) β€” constructor, with size defaulting to RTPDataQueue::defaultMembersHashSize and app defaulting to defaultApplication().
  • AVPQueue (uint32 ssrc, uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication()) β€” Local SSRC is given instead of computed by the queue.
  • virtual ~AVPQueue () β€” destructor, virtual, as it should be. πŸ‘‘

Protected Member Functions inherited from QueueRTCPManager

this one's a whole mood board, there are SO many πŸŽ€

  • QueueRTCPManager (uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication()) β€” constructor with size and app defaults.
  • QueueRTCPManager (uint32 ssrc, uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication()) β€” and the version where you also pass ssrc.
  • virtual ~QueueRTCPManager () β€” destructor. virtual. bye.
  • const RTPApplication & getApplication () β€” returns the application, by const reference.
  • void setControlBandwidth (float fraction) β€” sets control bandwidth as a float fraction.
  • float getControlBandwidth () const β€” reads it back out as a float.
  • void controlTransmissionService () β€” Build and send RTCP packets following timing rules (including the 'timer reconsideration' algorithm).
  • 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.
  • void endQueueRTCPManager () β€” shuts down the RTCP manager part of the queue.
  • 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) β€” handles an incoming SDES. returns a bool.
  • 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 () β€” the RTCP check interval, as a timeval.
  • uint32 getLastSendPacketCount () const β€” Get the number of data packets sent at the time the last SR was generated.
  • void setPrevMembersNum (uint32 n) β€” sets the previous member count.
  • uint32 getPrevMembersCount () const β€” gets the previous member count.
  • size_t sendControlToDestinations (unsigned char *buffer, size_t len) β€” sends control data out to the destinations.

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.
  • virtual ~RTPDataQueue () β€” The queue destructor flushes the queue and stops all services.
  • void renewLocalSSRC () β€” gives the local SSRC a glow-up. ✨
  • void endQueue () β€” This method ends the queue.

Protected Member Functions inherited from IncomingDataQueue

  • IncomingDataQueue (uint32 size) β€” constructor taking a size.
  • virtual ~IncomingDataQueue () β€” virtual 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 the number of RTCP intervals that the stack will wait to change the state of a source from stateActive to stateInactive, or to delete the source after being in stateInactive.
  • IncomingDataQueue::IncomingRTPPktLink * getWaiting (uint32 timestamp, const SyncSource *src=NULL) β€” This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp.
  • 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 from the scheduled reception queue.
  • void purgeIncomingQueue () β€” clears out the incoming queue.
  • virtual void onNewSyncSource (const SyncSource &) β€” Virtual called when a new synchronization source has joined the session.
  • virtual bool onRTPPacketRecv (IncomingRTPPkt &) β€” A virtual function to support parsing of arriving packets to determine if 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 the decoding of an incoming SRTP was erroneous.
  • bool insertRecvPacket (IncomingRTPPktLink *packetLink) β€” Insert a just received packet in the queue (both general and source specific queues).

Protected Member Functions inherited from IncomingDataQueueBase

  • IncomingDataQueueBase () β€” the constructor. that's it, that's the vibe.
  • virtual ~IncomingDataQueueBase () β€” virtual destructor, as the ancestors intended. πŸ’œ

Protected Member Functions inherited from RTPQueueBase

  • RTPQueueBase (uint32 *ssrc=NULL) β€” constructor with ssrc defaulting to NULL.
  • void setLocalSSRC (uint32 ssrc) β€” sets the local SSRC.
  • uint32 getLocalSSRCNetwork () const β€” reads the local SSRC back in network order.
  • virtual ~RTPQueueBase () β€” virtual destructor. πŸ’…

Protected Member Functions inherited from MembershipBookkeeping

  • MembershipBookkeeping (uint32 initialSize=defaultMembersHashSize) β€” The initial size is a hint to allocate the resources needed in order to keep the members' identifiers and associated information.
  • virtual ~MembershipBookkeeping () β€” Purges all RTPSource structures created during the session, as well as the hash table and the list of sources.
  • SyncSourceLink * getLink (const SyncSource &source) const β€” gets the link for a source.
  • bool isMine (const SyncSource &source) const β€” Get whether a synchronization source is recorded in this membership controller.
  • bool isRegistered (uint32 ssrc) β€” Returns whether there is already a synchronizacion source with 'ssrc' SSRC identifier.
  • 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 () β€” the first source link.
  • SyncSourceLink * getLast () β€” the last one. 🫢
  • uint32 getMembersCount () β€” how many members, as a uint32.
  • void setMembersCount (uint32 n) β€” sets the member count.
  • uint32 getSendersCount () β€” how many senders.
  • size_t getDefaultMembersHashSize () β€” the default members hash size.

Protected Member Functions inherited from SyncSourceHandler

  • SyncSourceHandler () β€” constructor.
  • virtual ~SyncSourceHandler () β€” virtual destructor.
  • void * getLink (const SyncSource &source) const β€” This requires SyncSource - SyncSourceHandler friendship.
  • void setLink (SyncSource &source, void *link) β€” sets the link on a source.
  • void setParticipant (SyncSource &source, Participant &p) β€” attaches a participant.
  • void setState (SyncSource &source, SyncSource::State ns) β€” sets the state, using SyncSource::State.
  • void setSender (SyncSource &source, bool active) β€” marks the source as a sender or not.
  • void setDataTransportPort (SyncSource &source, tpport_t p) β€” sets the data transport port.
  • void setControlTransportPort (SyncSource &source, tpport_t p) β€” sets the control transport port.
  • void setNetworkAddress (SyncSource &source, InetAddress addr) β€” sets the network address.

Protected Member Functions inherited from ParticipantHandler

  • ParticipantHandler () β€” constructor.
  • virtual ~ParticipantHandler () β€” virtual destructor.
  • void setSDESItem (Participant *part, SDESItemType item, const std::string &val) β€” sets an SDES item on a participant.
  • void setPRIVPrefix (Participant *part, const std::string val) β€” sets the PRIV prefix. (note: val is passed by value here, that's the original, we don't touch it 🫑)

Protected Member Functions inherited from ApplicationHandler

  • ApplicationHandler () β€” constructor.
  • virtual ~ApplicationHandler () β€” virtual destructor.
  • void addParticipant (RTPApplication &app, Participant &part) β€” adds a participant to the app.
  • void removeParticipant (RTPApplication &app, RTPApplication::ParticipantLink *pl) β€” removes one, given the ParticipantLink pointer.

Protected Member Functions inherited from ConflictHandler

  • ConflictHandler () β€” constructor.
  • virtual ~ConflictHandler () β€” virtual destructor.
  • ConflictingTransportAddress * searchDataConflict (InetAddress na, tpport_t dtp) β€” hunts for a data conflict.
  • ConflictingTransportAddress * searchControlConflict (InetAddress na, tpport_t ctp) β€” hunts for a control conflict.
  • void updateConflict (ConflictingTransportAddress &ca) β€” updates a conflict entry.
  • void addConflict (const InetAddress &na, tpport_t dtp, tpport_t ctp) β€” adds a conflict with data and control transport ports.

Protected Member Functions inherited from OutgoingDataQueue

  • OutgoingDataQueue () β€” constructor.
  • virtual ~OutgoingDataQueue () β€” virtual destructor.
  • 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) β€” reads the current sequence number.
  • void setInitialTimestamp (uint32 ts) β€” sets the initial timestamp.
  • uint32 getInitialTimestamp () β€” reads it back.
  • void purgeOutgoingQueue () β€” clears the outgoing queue. clean slate energy 🧚

Protected Member Functions inherited from OutgoingDataQueueBase

  • OutgoingDataQueueBase () β€” constructor.
  • virtual ~OutgoingDataQueueBase () β€” virtual destructor. and that's the whole inheritance chain, bestie β€” every protected method accounted for, zero skipped, no cap. πŸ’–

πŸ”’ Protected Member Functions inherited from DestinationListHandler πŸ”’

okay bestie, these are the protected member functions that came from DestinationListHandler. they're all about that destination list life. locking, adding, removing, checking if it's single. no cap. πŸ’…

  • void writeLockDestinationList () const β€” writes a lock on the destination list. πŸ”’
  • bool addDestinationToList (const InetAddress &ia, tpport_t data, tpport_t control) β€” locks the object before modifying it. safety first, fr fr. πŸ”
  • bool removeDestinationFromList (const InetAddress &ia, tpport_t dataPort, tpport_t controlPort) β€” also locks the object before modifying it. πŸ”
  • DestinationListHandler () β€” the constructor, it's giving setup energy. ✨
  • ~DestinationListHandler () β€” the destructor, clean up on aisle you. 🧹
  • bool isSingleDestination () const β€” get whether there is only a destination in the list. just one? iconic. πŸ’…
  • TransportAddress * getFirstDestination () const β€” returns a pointer to the first destination. πŸ‘‘
  • void lockDestinationList () const β€” locks the destination list.
  • void unlockDestinationList () const β€” unlocks the destination list.

πŸ“¦ Protected Member Functions inherited from RTCPCompoundHandler πŸ“¦

these ones come from RTCPCompoundHandler and they handle the RTCP compound packet vibes. let's go. πŸ¦‹

  • RTCPCompoundHandler (uint16 mtu=defaultPathMTU) β€” constructor, takes an MTU with a default of defaultPathMTU. πŸ“
  • ~RTCPCompoundHandler () β€” destructor, bye. πŸ‘‹
  • bool checkCompoundRTCPHeader (size_t len) β€” Perform RTCP compound packet header validity check as specified in draft-ietv-avt-rtp-new. (note: yes, it's ietv in the original, no typo from me, bestie 😭)
  • void setPathMTU (uint16 mtu) β€” sets the path MTU.
  • uint16 getPathMTU () β€” gets the path MTU.

✨ 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 TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >

RTPDataChannel * dso
RTCPChannel * cso

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 πŸ“–

okay so this is the whole vibe of SingleThreadRTPSession. it's a template class that adds threading to RTPSessionBase in one of the many possible ways. no biggie. πŸ’…

template<class RTPDataChannel = DualRTPUDPIPv4Channel, class RTCPChannel = DualRTPUDPIPv4Channel, class ServiceQueue = AVPQueue>
class SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >"This template class adds the threading aspect to the RTPSessionBase template in one of the many possible ways.

It inherits from a single execution thread that schedules sending of outgoing packets and receipt of incoming packets.

Author

Federico Montesino Pouzols fedemp@altern.org

Examples

audiorx.cpp, audiotx.cpp, ccrtptest.cpp, rtphello.cpp, rtplisten.cpp, and rtpsend.cpp.


πŸ› οΈ Constructor & Destructor Documentation πŸ› οΈ

Constructor 1

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession (const InetHostAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0, int pri = 0, uint32 memberssize = MembershipBookkeeping::defaultMembersHashSize, RTPApplication & app = defaultApplication()) [inline]

Constructor 2

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession (uint32 ssrc, const InetHostAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0, int pri = 0, uint32 memberssize = MembershipBookkeeping::defaultMembersHashSize, RTPApplication & app = defaultApplication()) [inline]

Constructor 3

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession (const InetMcastAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0, int pri = 0, uint32 memberssize = MembershipBookkeeping::defaultMembersHashSize, RTPApplication & app = defaultApplication(), uint32 iface = 0) [inline]

Constructor 4

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::SingleThreadRTPSession (uint32 ssrc, const InetMcastAddress & ia, tpport_t dataPort = DefaultRTPDataPort, tpport_t controlPort = 0, int pri = 0, uint32 memberssize = MembershipBookkeeping::defaultMembersHashSize, RTPApplication & app = defaultApplication(), uint32 iface = 0) [inline]

Destructor

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::~SingleThreadRTPSession () [inline]

πŸ”§ Member Function Documentation πŸ”§

controlReceptionService

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::controlReceptionService (void) [inline],  [protected]

no description given in the original, bestie. it's just the signature. πŸ’…

controlTransmissionService

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::controlTransmissionService (void) [inline],  [protected]

no description given.

disableStack

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::disableStack (void) [inline],  [protected]

no description given.

dispatchBYE

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> size_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::dispatchBYE (const std::string & str) [inline],  [protected],  [virtual]

Reimplemented from TRTPSessionBase< RTPDataChannel, RTCPChannel, ServiceQueue >.

dispatchDataPacket

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> size_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::dispatchDataPacket (void) [inline],  [protected]

no description given.

enableStack

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::enableStack (void) [inline],  [protected]

no description given.

getRTCPCheckInterval

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> timeval SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::getRTCPCheckInterval (void) [inline],  [protected]

no description given.

getSchedulingTimeout

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> microtimeout_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::getSchedulingTimeout (void) [inline],  [protected]

no description given.

isPendingData

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> virtual bool SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::isPendingData (microtimeout_t timeout) [inline],  [protected],  [virtual]

Implements RTPDataQueue.

run

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> virtual void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::run (void) [inline],  [protected],  [virtual]

Single runnable method for this RTP stacks, schedules outgoing and incoming RTP data and RTCP packets.

startRunning

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::startRunning () [inline]

Activate stack and start service thread.

Examples: audiorx.cpp, audiotx.cpp, ccrtptest.cpp, rtphello.cpp, rtplisten.cpp, and rtpsend.cpp.

takeInDataPacket

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> size_t SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::takeInDataPacket (void) [inline],  [protected],  [virtual]

Reimplemented from IncomingDataQueue.

timerTick

template<class RTPDataChannel  = DualRTPUDPIPv4Channel, class RTCPChannel  = DualRTPUDPIPv4Channel, class ServiceQueue  = AVPQueue> virtual void SingleThreadRTPSession< RTPDataChannel, RTCPChannel, ServiceQueue >::timerTick (void) [inline],  [protected],  [virtual]

Reimplemented from RTPDataQueue.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for ccRTP from the source code.


that's a wrap, bestie! this page came from the ccRTP source, version vibes, and it's the SingleThre...viceQueue >(3) man page. auto-generated by Doxygen, no cap. stay iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from