CompoundPacketBuilder RtcpSender.IRtpSession.RtcpReportIntervalReached()
{
// A stale participant is one who is not sending Rtcp data
CheckForStaleParticipants();
// Add participant data
Debug.Assert(participant.SSRC != 0);
cpb.ParticipantData(participant);
// Add Rtp data
if(rtpTraffic)
{
// A stale stream is one not sending Rtp traffic
CheckForStaleStreams();
// Collect SenderReportPackets and SDESReports from each Sender
lock(rtpSenders)
{
foreach(RtpSender sender in rtpSenders.Values)
{
sender.UpdateRtcpData();
}
}
// Collect ReceiverReports from each of the streams
lock(streamsAndIPs)
{
foreach(IPStreamPair ipsp in streamsAndIPs.Values)
{
if( ipsp.stream != null )
{
ipsp.stream.AddReceiverReport(cpb);
}
}
}
}
// BYE reports and AppPackets are added directly to cpb and may have
// actually triggered the sending of the Rtcp data
return cpb;
}