SINGLETHREADRTPSESSION(3)
π 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 () constmicrotimeout_t getEnd2EndDelay () constvoid 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 () constuint32 getSessionBandwidth () constvoid 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 () constuint8 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 () constuint16 getMaxPacketMisorder () constvoid setMaxPacketDropout (uint16 packets)β It also prevents packets sent after a restart of the source being immediately accepted.uint16 getDefaultMaxPacketDropout () constuint16 getMaxPacketDropout () constvoid 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 () constsize_t getMaxRecvPacketSize () constvoid 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 () 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
π«Ά 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 () 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 ()
π‘οΈ 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 atimeval.size_t dispatchDataPacket (void)β dispatches a data packet. returns asize_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 astd::stringalong 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 toNULL.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 theconstdoing double duty, iconic.SOCKET getDataRecvSocket () constβ hands back the data receive socket.bool isPendingControl (microtimeout_t timeout)β same energy asisPendingData, but for control.InetHostAddress getControlSender (tpport_t *port=NULL) constβ the control sender's address, withportdefaulting toNULL.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, withsizedefaulting toRTPDataQueue::defaultMembersHashSizeandappdefaulting todefaultApplication().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 withsizeandappdefaults.QueueRTCPManager (uint32 ssrc, uint32 size=RTPDataQueue::defaultMembersHashSize, RTPApplication &app=defaultApplication())β and the version where you also passssrc.virtual ~QueueRTCPManager ()β destructor. virtual. bye.const RTPApplication & getApplication ()β returns the application, by const reference.void setControlBandwidth (float fraction)β sets control bandwidth as afloatfraction.float getControlBandwidth () constβ reads it back out as afloat.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 abool.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 atimeval.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 asize.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 withssrcdefaulting toNULL.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 ssrcSyncSourceLink * getFirst ()β the first source link.SyncSourceLink * getLast ()β the last one. π«Άuint32 getMembersCount ()β how many members, as auint32.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, usingSyncSource::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:valis 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 theParticipantLinkpointer.
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 ofdefaultPathMTU. π~RTCPCompoundHandler ()β destructor, bye. πbool checkCompoundRTCPHeader (size_t len)β Perform RTCP compound packet header validity check as specified indraft-ietv-avt-rtp-new. (note: yes, it'sietvin 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
- 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