Beispiel #1
0
 public void Shutdown()
 {
     Trace.WriteLine("RtspMediaSource::Shutdown()");
     if (IsOpened)
     {
         Close();
     }
     ChangeState(SourceState.Shutdowned);
     _stateSubject.OnCompleted();
     _eventGenerator.Shutdown();
 }
Beispiel #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                // Dispose managed resources.
                Deactivate();
                _stateSubscription.Dispose();
                _packetSubscription.Dispose();
                Descriptor.Dispose();
                _eventGenerator.Shutdown();
                _eventGenerator.Dispose();
                _debugSaveStream?.Close();
            }

            // Dispose unmanaged resources.

            // Set disposed flag.
            _disposed = true;
        }