Ejemplo n.º 1
0
 /// <summary>
 /// Stops the server-side stream.
 /// </summary>
 public override void Stop()
 {
     lock (this.SyncRoot)
     {
         if (_state != State.PLAYING && _state != State.PAUSED)
         {
             return;
         }
         if (_liveJobName != null)
         {
             _schedulingService.RemoveScheduledJob(_liveJobName);
             _liveJobName = null;
         }
         if (_vodJobName != null)
         {
             _schedulingService.RemoveScheduledJob(_vodJobName);
             _vodJobName = null;
         }
         if (_msgIn != null)
         {
             _msgIn.Unsubscribe(this);
             _msgIn = null;
         }
         if (_nextRTMPMessage != null)
         {
             _nextRTMPMessage = null;
         }
         _state = State.STOPPED;
     }
 }