SyncSource(3)
๐ NAME ๐
SyncSource โ your synchronization source in an RTP session. hi bestie, this is the SyncSource(3) page from the Library Functions Manual, and we're gonna read it together ๐ซถ
โจ SYNOPSIS โจ
#include <sources.h>
๐ธ Public Types ๐ธ
enum State { stateUnknown, statePrevalid, stateActive, stateInactive, stateLeaving }
Synchronization source states during an RTP session. (we get into these below, don't worry)
๐ Public Member Functions ๐
SyncSource (uint32 ssrc)
~SyncSource ()
State getState () const
bool isSender () const
uint32 getID () const
Participant * getParticipant () const
tpport_t getDataTransportPort () const
tpport_t getControlTransportPort () const
const InetAddress & getNetworkAddress () const
isSender () constโ whether this source sends RTP data packets, i.e. is it out here actually posting ๐ฎgetParticipant () constโ get the participant this synchronization source is asociated to. (that's the doc's spelling, i'm not touching it, it's iconic)
๐ง Protected Member Functions ๐ง
SyncSource (const SyncSource &source)
SyncSource & operator= (const SyncSource &source)
๐ฆ Friends ๐ฆ
class SyncSourceHandler
๐ Detailed Description ๐
Synchronization source in an RTP session. that's the whole vibe.
So: each synchronization source in an RTP session is identified by a 32-bit numeric SSRC identifier. Every single SyncSource object is related to a Participant object, and you can pull that Participant out with the getParticipant() method. no cap.
๐ Author ๐
Federico Montesino Pouzols fedemp@altern.org โ the actual main character who wrote this
โญ Examples โญ
ccrtptest.cpp, and rtplisten.cpp. go look at them, they ate.
๐ฅ Member Enumeration Documentation ๐ฅ
๐ enum SyncSource::State ๐
Synchronization source states during an RTP session. In general, new synchronization sources are not considered valid until multiple valid data packets or a valid RTCP compound packet has been received from the new source.
See also: IncomingDataQueue::setMinValidPacketSequence()
Thus, the source will probably be in statePrevalid before reaching one of the two states that indicate a valid source: stateActive and stateInactive. it's giving "give me a few packets before i trust you" energy fr fr.
A valid participant is in stateActive state if RTP and/or RTCP packets are currently being received from it. If, after a small number of RTCP report intervals (see IncomingDataQueue::setSourceExpirationPeriod() ), no packets are received, it will reach the stateInactive state. And if, after a small number of RTCP report intervals, no packet is received from an inactive source, it will be deleted. gone. ghosted. ๐
If RTCP is being used, after receiving a BYE RTCP packet from a synchronization source, it will reach the stateLeaving state and will be deleted after a delay (see QueueRTCPManager::setLeavingDelay()).
Sources in statePrevalid and stateLeaving are not counted for the number of session members estimation. they're in the group chat but muted, yk?
๐ Enumerator ๐
okay bestie, heads up: in the original doc these five descriptions ran straight into each other, so i'm quoting them exactly how they appear, no editorialising, no invented lore ๐
stateUnknownโ "No valid packet has been received."statePrevalidโ "Some packets have been."stateActiveโ "received, but source validity not yet guaranteed. We currently receive packets"stateInactiveโ "(data or control) from this source. Was active in the near past but"stateLeavingโ "no packet from this source has been received lately. An RTCP BYE has been received from the source."
๐ Constructor & Destructor Documentation ๐
SyncSource::SyncSource (uint32 ssrc)
Parameters
ssrcโ SSRC identifier of the source, unique in each session. one per session, no dupes allowed ๐
SyncSource::~SyncSource ()
the destructor. it's fine. it's just vibes ending.
SyncSource::SyncSource (const SyncSource & source) [protected]
Parameters
sourceโ The RTPSource object being copied
โจ Member Function Documentation โจ
tpport_t SyncSource::getControlTransportPort () const [inline]
Examples: ccrtptest.cpp, and rtplisten.cpp.
tpport_t SyncSource::getDataTransportPort () const [inline]
Examples: ccrtptest.cpp, and rtplisten.cpp.
uint32 SyncSource::getID () const [inline]
Examples: ccrtptest.cpp, and rtplisten.cpp.
const InetAddress & SyncSource::getNetworkAddress () const [inline]
Examples: ccrtptest.cpp, and rtplisten.cpp.
Participant * SyncSource::getParticipant () const [inline]
Get the participant this synchronization source is asociated to.
Return values
NULLif the stack has not been yet able to identify the participant this source is associated to. (yes, it can just beNULLat you, that's the tea โ)
Examples: ccrtptest.cpp, and rtplisten.cpp.
State SyncSource::getState () const [inline]
no extra notes, it just tells you the state. periodt.
bool SyncSource::isSender () const [inline]
Whether this source sends RTP data packets.
Examples: ccrtptest.cpp.
SyncSource & SyncSource::operator= (const SyncSource & source) [protected]
copy assignment, but it's protected, so it's iykyk only ๐
๐ Friends And Related Symbol Documentation ๐
friend class SyncSourceHandler [friend]
your friendly neighbourhood friend class, living its best life in here.
๐ Author ๐
Generated automatically by Doxygen for ccRTP from the source code. so like, the robot wrote it, but respectfully.
okay that's the whole page bestie, you're fully caught up on SyncSource(3) ๐ huge slay, go read ccrtptest.cpp and rtplisten.cpp, and remember: this was ccRTP's SyncSource(3), straight from the ccRTP source, doxygen-generated and everything โจ bye ily ๐ฆ
๐ฆ 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