Пример #1
0
 /// <summary>
 /// 停止录像
 /// 释放使用的资源
 /// </summary>
 /// <returns></returns>
 private void StopRecording()
 {
     if (_packetRecorderWorker != null)
     {
         _packetRecorderWorker.Stop();
         _packetRecorderWorker.Join();
         _packetRecorderWorker = null;
     }
     if (_recorderStream != null)
     {
         _recorderStream.Dispose();
         _recorderStream = null;
     }
     if (_viconPositionGet != null)
     {
         _viconPositionGet.Stop();
     }
     if (_viconWriteStream != null)
     {
         _viconWriteStream.Dispose();
         _viconWriteStream = null;
     }
     if (_viconFileStream != null)
     {
         _viconFileStream.Dispose();
         _viconFileStream = null;
     }
 }
Пример #2
0
 private void P2PStop()
 {
     _p2pTimer.Stop();
     _p2pTimer.IsEnabled = false;
     _isP2P = false;
     _viconPositionGet.Stop();
     _viconPositionGet.Join();
 }