Beispiel #1
0
        /// <summary>
        /// Clean up the RtcpListener
        /// 
        /// A thread will not abort until it is in the running state.  Our listening thread is
        /// generally blocked by the call to rtcpNetworkListener.ReceiveFrom().  In order to
        /// dispose things quickly and efficiently, we tell the listening thread to abort as soon 
        /// as it is back in the running state.  Then we clean up the network listener which should
        /// unblock us.  
        /// </summary>
        /// <param name="disposing"></param>
        private void Dispose(bool disposing)
        {
            lock(this)
            {
                disposed = true;
                
                threadRtcpListener.Abort();
                threadRtcpListener = null;

                rtcpNetworkListener.Dispose();
                rtcpNetworkListener = null;
            }
        }
Beispiel #2
0
 private void DisposeNetwork()
 {
     rtpNetworkListener.Dispose();
     rtpNetworkListener = null;
 }
Beispiel #3
0
        private void Initialize()
        {
            rtcpNetworkListener = new UdpReceiver(rtpSession.RtcpEndPoint, RtpSession.DefaultNetworkTimeout * 2);

            threadRtcpListener = new Thread(new ThreadStart(ListenThread));
            threadRtcpListener.IsBackground = true;
            threadRtcpListener.Name = "RtcpListener";
            
            threadRtcpListener.Start();
        }
Beispiel #4
0
 private void InitializeNetwork()
 {
     rtpNetworkListener = new UdpReceiver(rtpSession.RtpEndPoint, RtpSession.DefaultNetworkTimeout);
 }