<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>ccRTP: SyncSource Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>SyncSource Class Reference<br> <small> [<a class="el" href="group__sources.html">Participants and synchronization sources.</a>]</small> </h1><!-- doxytag: class="SyncSource" -->Synchronization source in an RTP session. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="sources_8h_source.html">sources.h</a>></code> <p> <p> <a href="class_sync_source-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc">State</a> { <br> <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc9da650c2b6f936142c9cb8327074ca0c">stateUnknown</a>, <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc02d96a9f7e46e64298ac7b6174f31e89">statePrevalid</a>, <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc5be3203fa0ead7600c5eae6599139876">stateActive</a>, <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc59ef5b5115a418a31877ec7a17a266d3">stateInactive</a>, <br> <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dcb50b90a686532c1acea01fab12c4574b">stateLeaving</a> <br> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Synchronization source states during an RTP session. <a href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#ecb61a424a8a3d1a1aa915d449933d0d">SyncSource</a> (uint32 ssrc)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#8e527d7723585a5528a41873f2d074fa">~SyncSource</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc">State</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#9ddc2116e7f91c80079882d4a33e647d">getState</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#4611a2bc6c86e27d79945ad26a1e8e31">isSender</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Whether this source sends RTP data packets. <a href="#4611a2bc6c86e27d79945ad26a1e8e31"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#67da73d6d3aedc50fc4493857871143b">getID</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_participant.html">Participant</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#2be8658512af88c5a25f2786d7024d37">getParticipant</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the participant this synchronization source is asociated to. <a href="#2be8658512af88c5a25f2786d7024d37"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">tpport_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#d8646f90825758d06c9f63a13be9b58c">getDataTransportPort</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">tpport_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#56536e209e445a4f130e3e42a41bd027">getControlTransportPort</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const InetAddress & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#9f92cbd6190fecc9bba3a54217b0d00a">getNetworkAddress</a> () const </td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#329762a4298aabbbb96e3dfa2d7f7b71">SyncSource</a> (const <a class="el" href="class_sync_source.html">SyncSource</a> &source)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sync_source.html">SyncSource</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#ff8b759ea4713fa1dc64e0b941b542df">operator=</a> (const <a class="el" href="class_sync_source.html">SyncSource</a> &source)</td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sync_source.html#fc35a856c46a7c673c38317bc872a2ae">SyncSourceHandler</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Synchronization source in an RTP session. <p> Each synchronization source in an RTP session is identified by a 32-bit numeric SSRC identifier. Each <a class="el" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a> object is related to a <a class="el" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a> object, which can be retrieved through the <a class="el" href="class_sync_source.html#2be8658512af88c5a25f2786d7024d37" title="Get the participant this synchronization source is asociated to.">getParticipant()</a> method.<p> <dl class="author" compact><dt><b>Author:</b></dt><dd>Federico Montesino Pouzols <<a href="mailto:fedemp@altern.org">fedemp@altern.org</a>> </dd></dl> <dl compact><dt><b>Examples: </b></dt><dd> <p> <a class="el" href="ccrtptest_8cpp-example.html#_a10">ccrtptest.cpp</a>, and <a class="el" href="rtplisten_8cpp-example.html#_a15">rtplisten.cpp</a>.</dl><hr><h2>Member Enumeration Documentation</h2> <a class="anchor" name="e1ed2a19bbfd03de69fbdfc044f2c5dc"></a><!-- doxytag: member="SyncSource::State" ref="e1ed2a19bbfd03de69fbdfc044f2c5dc" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc">SyncSource::State</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Synchronization source states during an RTP session. <p> 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 (<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="class_incoming_data_queue.html#67c0dd360533faeaf3bd317fdf5fb8e3" title="When receiving packets from a new source, it may be convenient to reject a first...">IncomingDataQueue::setMinValidPacketSequence()</a>). Thus, the source will probably be in <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc02d96a9f7e46e64298ac7b6174f31e89" title="Some packets have been received, but source validity not yet guaranteed.">statePrevalid</a> before reaching one of the two states that indicate a valid source: <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc5be3203fa0ead7600c5eae6599139876" title="We currently receive packets (data or control) from this source.">stateActive</a> and <a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc59ef5b5115a418a31877ec7a17a266d3" title="Was active in the near past but no packet from this source has been received lately...">stateInactive</a>.</dd></dl> 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 <a class="el" href="class_incoming_data_queue.html#6c595148215e5bf4098ff0e13d1ccfb7" title="Set the number of RTCP intervals that the stack will wait to change the state of...">IncomingDataQueue::setSourceExpirationPeriod()</a> ), no packets are received, it will reach the stateInactive state. If, after a small number of RTCP report intervals, no packet is received from an inactive source, it will be deleted.<p> 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 <a class="el" href="class_queue_r_t_c_p_manager.html#9c4ab816bbf557620e3d7a7549182070" title="Set how much time the stack will wait before deleting a synchronization source that...">QueueRTCPManager::setLeavingDelay()</a>).<p> Sources in statePrevalid and stateLeaving are not counted for the number of session members estimation. <dl compact><dt><b>Enumerator: </b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" name="e1ed2a19bbfd03de69fbdfc044f2c5dc9da650c2b6f936142c9cb8327074ca0c"></a><!-- doxytag: member="stateUnknown" ref="e1ed2a19bbfd03de69fbdfc044f2c5dc9da650c2b6f936142c9cb8327074ca0c" args="" -->stateUnknown</em> </td><td> No valid packet has been received. </td></tr> <tr><td valign="top"><em><a class="anchor" name="e1ed2a19bbfd03de69fbdfc044f2c5dc02d96a9f7e46e64298ac7b6174f31e89"></a><!-- doxytag: member="statePrevalid" ref="e1ed2a19bbfd03de69fbdfc044f2c5dc02d96a9f7e46e64298ac7b6174f31e89" args="" -->statePrevalid</em> </td><td> Some packets have been received, but source validity not yet guaranteed. <p> </td></tr> <tr><td valign="top"><em><a class="anchor" name="e1ed2a19bbfd03de69fbdfc044f2c5dc5be3203fa0ead7600c5eae6599139876"></a><!-- doxytag: member="stateActive" ref="e1ed2a19bbfd03de69fbdfc044f2c5dc5be3203fa0ead7600c5eae6599139876" args="" -->stateActive</em> </td><td> We currently receive packets (data or control) from this source. <p> </td></tr> <tr><td valign="top"><em><a class="anchor" name="e1ed2a19bbfd03de69fbdfc044f2c5dc59ef5b5115a418a31877ec7a17a266d3"></a><!-- doxytag: member="stateInactive" ref="e1ed2a19bbfd03de69fbdfc044f2c5dc59ef5b5115a418a31877ec7a17a266d3" args="" -->stateInactive</em> </td><td> Was active in the near past but no packet from this source has been received lately. <p> </td></tr> <tr><td valign="top"><em><a class="anchor" name="e1ed2a19bbfd03de69fbdfc044f2c5dcb50b90a686532c1acea01fab12c4574b"></a><!-- doxytag: member="stateLeaving" ref="e1ed2a19bbfd03de69fbdfc044f2c5dcb50b90a686532c1acea01fab12c4574b" args="" -->stateLeaving</em> </td><td> An RTCP BYE has been received from the source. <p> </td></tr> </table> </dl> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="ecb61a424a8a3d1a1aa915d449933d0d"></a><!-- doxytag: member="SyncSource::SyncSource" ref="ecb61a424a8a3d1a1aa915d449933d0d" args="(uint32 ssrc)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">SyncSource::SyncSource </td> <td>(</td> <td class="paramtype">uint32 </td> <td class="paramname"> <em>ssrc</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ssrc</em> </td><td>SSRC identifier of the source, unique in each session. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="8e527d7723585a5528a41873f2d074fa"></a><!-- doxytag: member="SyncSource::~SyncSource" ref="8e527d7723585a5528a41873f2d074fa" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">SyncSource::~SyncSource </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="329762a4298aabbbb96e3dfa2d7f7b71"></a><!-- doxytag: member="SyncSource::SyncSource" ref="329762a4298aabbbb96e3dfa2d7f7b71" args="(const SyncSource &source)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">SyncSource::SyncSource </td> <td>(</td> <td class="paramtype">const <a class="el" href="class_sync_source.html">SyncSource</a> & </td> <td class="paramname"> <em>source</em> </td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>source</em> </td><td>The RTPSource object being copied </td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="56536e209e445a4f130e3e42a41bd027"></a><!-- doxytag: member="SyncSource::getControlTransportPort" ref="56536e209e445a4f130e3e42a41bd027" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">tpport_t SyncSource::getControlTransportPort </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="ccrtptest_8cpp-example.html#a14">ccrtptest.cpp</a>, and <a class="el" href="rtplisten_8cpp-example.html#a16">rtplisten.cpp</a>.</dl> </div> </div><p> <a class="anchor" name="d8646f90825758d06c9f63a13be9b58c"></a><!-- doxytag: member="SyncSource::getDataTransportPort" ref="d8646f90825758d06c9f63a13be9b58c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">tpport_t SyncSource::getDataTransportPort </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="ccrtptest_8cpp-example.html#a15">ccrtptest.cpp</a>, and <a class="el" href="rtplisten_8cpp-example.html#a14">rtplisten.cpp</a>.</dl> </div> </div><p> <a class="anchor" name="67da73d6d3aedc50fc4493857871143b"></a><!-- doxytag: member="SyncSource::getID" ref="67da73d6d3aedc50fc4493857871143b" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">uint32 SyncSource::getID </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="ccrtptest_8cpp-example.html#a11">ccrtptest.cpp</a>, and <a class="el" href="rtplisten_8cpp-example.html#a12">rtplisten.cpp</a>.</dl> </div> </div><p> <a class="anchor" name="9f92cbd6190fecc9bba3a54217b0d00a"></a><!-- doxytag: member="SyncSource::getNetworkAddress" ref="9f92cbd6190fecc9bba3a54217b0d00a" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const InetAddress& SyncSource::getNetworkAddress </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="ccrtptest_8cpp-example.html#a13">ccrtptest.cpp</a>, and <a class="el" href="rtplisten_8cpp-example.html#a13">rtplisten.cpp</a>.</dl> </div> </div><p> <a class="anchor" name="2be8658512af88c5a25f2786d7024d37"></a><!-- doxytag: member="SyncSource::getParticipant" ref="2be8658512af88c5a25f2786d7024d37" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="class_participant.html">Participant</a>* SyncSource::getParticipant </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the participant this synchronization source is asociated to. <p> <dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>NULL</em> </td><td>if the stack has not been yet able to identify the participant this source is associated to. </td></tr> </table> </dl> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="ccrtptest_8cpp-example.html#a17">ccrtptest.cpp</a>, and <a class="el" href="rtplisten_8cpp-example.html#a17">rtplisten.cpp</a>.</dl> </div> </div><p> <a class="anchor" name="9ddc2116e7f91c80079882d4a33e647d"></a><!-- doxytag: member="SyncSource::getState" ref="9ddc2116e7f91c80079882d4a33e647d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc">State</a> SyncSource::getState </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="4611a2bc6c86e27d79945ad26a1e8e31"></a><!-- doxytag: member="SyncSource::isSender" ref="4611a2bc6c86e27d79945ad26a1e8e31" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool SyncSource::isSender </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Whether this source sends RTP data packets. <p> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="ccrtptest_8cpp-example.html#a12">ccrtptest.cpp</a>.</dl> </div> </div><p> <a class="anchor" name="ff8b759ea4713fa1dc64e0b941b542df"></a><!-- doxytag: member="SyncSource::operator=" ref="ff8b759ea4713fa1dc64e0b941b542df" args="(const SyncSource &source)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="class_sync_source.html">SyncSource</a>& SyncSource::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="class_sync_source.html">SyncSource</a> & </td> <td class="paramname"> <em>source</em> </td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="fc35a856c46a7c673c38317bc872a2ae"></a><!-- doxytag: member="SyncSource::SyncSourceHandler" ref="fc35a856c46a7c673c38317bc872a2ae" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">friend class <a class="el" href="class_sync_source_handler.html">SyncSourceHandler</a><code> [friend]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="sources_8h_source.html">sources.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jul 24 21:42:26 2009 for ccRTP by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>