Пример #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;
            }
        }
Пример #2
0
 /// <summary>
 /// Dispose method
 /// </summary>
 public void Dispose()
 {
     _left.Dispose();
     _right.Dispose();
 }
Пример #3
0
 public virtual void Dispose()
 {
     _listener?.Dispose();
     _listener = null;
     _listenerCancellationCallback = null;
 }
Пример #4
0
 private void DisposeNetwork()
 {
     rtpNetworkListener.Dispose();
     rtpNetworkListener = null;
 }