[Live-devel] ssrc of rtp packets

Ross Finlayson finlayson at live.com
Fri Jul 30 16:21:24 PDT 2004


>->we wish now to check the ssrc of the packets to know where the audio
>data should be written to (we got one ringbuffer for each source). In
>our continuePlaying() (here we put the audio data of the rtp packets to
>the ringbuffer) method of our from MediaSink derrived Sink class we do
>the following to get the number of active Sources :
>rtpSource->receptionStatsDB().numActiveSourcesSinceLastReset();
>(got from the playCommon example)
>This works out fine - but we need also the ssrc to identify the packets.

Note that a "RTPReceptionStatsDB" is a hash table that contains a set of 
"RTPReceptionStats" objects - one for each source SSRC.  You can easily 
iterate through this set, to get the statistics relevant to each particular 
source SSRC.  This is done, for example, by the RTCP implementation, when 
it's constructing Reception Report (RR) packets.  To see how this is done, 
take a look at
         RTCPInstance::enqueueCommonReportSuffix()
and
         RTCPInstance::enqueueReportBlock
in "liveMedia/RTCP.cpp".


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list