示例#1
0
 public void Stop()
 {
     if (!_isWorking)
     {
         return;
     }
     _isWorking = false;
     ThreadEx.Stop(_analyzeThead);
     _listAudioPES.Clear();
     _listVideoPES.Clear();
     _queueFrame.Clear();
     ms.Close();
 }
示例#2
0
        private void btnThreadEx_Click(object sender, RoutedEventArgs e)
        {
            if (_thread != null)
            {
                _thread.Stop();
                _thread.Dispose();
                _thread = null;
                return;
            }

            _thread = new ThreadEx(ThreadMethod, "xx", true);
            _thread.Start();
        }