NewTOAPIA.Net.Rtp.RtpSession.ProcessRRPacket C# (CSharp) Method

ProcessRRPacket() private method

private ProcessRRPacket ( RrPacket packet, IPAddress ipAddress ) : void
packet RrPacket
ipAddress System.Net.IPAddress
return void
        private void ProcessRRPacket(RrPacket packet, IPAddress ipAddress)
        {
            AddSsrcToIp(packet.SSRC, ipAddress);

            RtpParticipant senderParticipant = null;
            if (ssrcToParticipant.ContainsKey(packet.SSRC))
                senderParticipant = ssrcToParticipant[packet.SSRC];

            if (senderParticipant != null)
            {
                string senderCName = senderParticipant.CName;

                foreach(ReceiverReport rr in packet.ReceiverReports)
                {
                    RtpParticipant sourceParticipant = (RtpParticipant)ssrcToParticipant[rr.SSRC];
                    
                    if (sourceParticipant != null)
                    {
                        string sourceCName = sourceParticipant.CName;
                        RaiseReceiverReportEvent(senderCName, sourceCName, rr);
                    }
                }
            }
        }