示例#1
0
        public void Close()
        {
            try
            {
                this.Lock.AcquireWriterLock(10000);
            }
            catch
            {
            }
            try
            {
                if (!Ready)
                {
                    return;
                }

                Ready = false;
                FDevice.StopStreams();
                FDevice.DisableVideoInput();
            }
            finally
            {
                this.Lock.ReleaseWriterLock();
            }
        }
示例#2
0
 protected override void Close()
 {
     try
     {
         FDevice.StopStreams();
         FDevice.DisableVideoInput();
         Status = "Closed";
     }
     catch (Exception e)
     {
         Status = e.Message;
     }
 }
示例#3
0
 public void Stop(bool reportError = true)
 {
     try
     {
         recorder.StopStreams();
         recorder.DisableAudioInput();
         recorder.DisableVideoInput();
     }
     catch (Exception ex)
     {
         if (reportError)
         {
             MessageBox.Show($"Cannot stop fingerprinting: {ex.Message}", "Error", MessageBoxButton.OK);
         }
     }
 }
示例#4
0
        public void StopCapture()
        {
            if (!m_currentlyCapturing)
            {
                return;
            }

            RemoveAllListeners();

            // Stop the capture
            m_deckLinkInput.StopStreams();

            // Disable video input
            m_deckLinkInput.DisableVideoInput();

            // Disable callbacks
            m_deckLinkInput.SetScreenPreviewCallback(null);
            m_deckLinkInput.SetCallback(null);

            m_currentlyCapturing = false;
        }
示例#5
0
        public void Close()
        {
            WorkerThread.Singleton.PerformBlocking(() =>
            {
                this.Lock.AcquireWriterLock(10000);
                try
                {
                    if (!Ready)
                    {
                        return;
                    }

                    Ready = false;
                    FDevice.StopStreams();
                    FDevice.DisableVideoInput();
                }
                finally
                {
                    this.Lock.ReleaseWriterLock();
                }
            });
        }