Listens for packets from the network and distributes them to the appropriate RtpStream
Inheritance: IDisposable
示例#1
0
 internal RtpStreamFec(RtpListener rtpListener, uint ssrc, SdesData sdes, PayloadType pt)
     : base(rtpListener.ReturnBufferCallback, ssrc, sdes, pt)
 {
     this.getBufferHandler = rtpListener.GetBufferCallback;
 }
示例#2
0
        internal RtpStreamCFec(RtpListener rtpListener, uint ssrc, SdesData sdes, PayloadType pt, ushort dataPxExp, ushort fecPxExp)
            : base(rtpListener, ssrc, sdes, pt)
        {
            pcFecType = 1;

            this.dataPxExp = dataPxExp;
            this.fecPxExp = fecPxExp;

            SetDecoder();
            InitializeDCRStorage();
        }
示例#3
0
 internal RtpStreamFFec(RtpListener rtpListener, uint ssrc, SdesData sdes, PayloadType pt, ushort fecPxExp)
     : base(rtpListener, ssrc, sdes, pt)
 {
     fecPercent = fecPxExp;
     pcFecType = 2;
 }
示例#4
0
        /// <summary>
        /// Initialize the Rtcp/Rtp listeners and senders.  See the primary constructor's summary
        /// for an explanation of the "states" an RtpSession can be constructed in.
        /// </summary>
        private void InitializeNetwork()
        {
            if( receiveData )
            {
                if(participant != null && rtpTraffic)
                {
                    rtpListener = new RtpListener(this);   
                }

                // RtcpListener can create streams.  A stream needs a valid RtpListener in order to
                // return used packets, so start this object/thread after RtpListener.
                rtcpListener = new RtcpListener(this);
            }

            if(participant != null)
            {
                // Set the participant's IP address
                //participant.IPAddress = Utility.GetLocalMulticastInterface();
                participant.IPAddress = Utility.GetLocalRoutingInterface(multicastEP.Address, (ushort)multicastEP.Port);

                // Get an ssrc for the local participant
                uint ssrc = NextSSRC();
                AddParticipant(ssrc, participant);
                AddSsrcToIp(ssrc, participant.IPAddress);
                
                rtcpSender = new RtcpSender(this);    
            }
        }