Example #1
0
 public void Start(ISourceStream source_stream)
 {
     IsClosed = false;
     if (sourceStream != null)
     {
         sourceStream.StatusChanged -= SourceStream_StatusChanged;
         sourceStream.Stopped       -= SourceStream_Stopped;
     }
     sourceStream = source_stream;
     sourceStream.StatusChanged += SourceStream_StatusChanged;
     sourceStream.Stopped       += SourceStream_Stopped;
     startTickCount              = Environment.TickCount;
     sourceStream.Start();
 }
Example #2
0
 protected void Start(Uri source_uri, ISourceStream source_stream)
 {
     WriteLock(() => {
         if (sourceStream != null)
         {
             sourceStream.Stopped -= SourceStream_Stopped;
             sourceStream.Stop();
         }
         this.contentHeader = null;
         this.contents.Clear();
         this.SourceUri        = source_uri;
         sourceStream          = source_stream;
         sourceStream.Stopped += SourceStream_Stopped;
         uptimeTimer.Reset();
         uptimeTimer.Start();
         sourceStream.Start();
     });
     OnContentChanged();
 }