public void StopRecording() { m_bIsRecording = false; log.Debug("Stop recording images to file."); if (m_VideoRecorder != null) { // Add a VideofileBox with a thumbnail of this video. if (m_VideoRecorder.CaptureThumb != null) { CapturedVideo cv = new CapturedVideo(m_CurrentCaptureFilePath, m_VideoRecorder.CaptureThumb); m_RecentlyCapturedVideos.Add(cv); m_VideoRecorder.CaptureThumb.Dispose(); m_Container.DoUpdateCapturedVideos(); } // Terminate the recording thread and release resources. This will treat any outstanding frames in the queue. m_VideoRecorder.Dispose(); } Thread.CurrentThread.Priority = ThreadPriority.Normal; // Ask the Explorer tree to refresh itself, (but not the thumbnails pane.) DelegatesPool dp = DelegatesPool.Instance(); if (dp.RefreshFileExplorer != null) { dp.RefreshFileExplorer(false); } }
public void StopRecording() { // Stop recording m_bIsRecording = false; // Close the recording context. m_VideoFileWriter.CloseSavingContext(true); //---------------------------------------------------------------------------- // Add a VideofileBox (in the Keyframes panel) with a thumbnail of this video. // As for KeyframeBox, you'd be able to edit the filename. // double click = open it in a Playback screen. // time label would be the duration. // using the close button do not delete the file, it just hides it. //---------------------------------------------------------------------------- CapturedVideo cv = new CapturedVideo(m_CurrentCaptureFilePath, m_CurrentCaptureBitmap); m_RecentlyCapturedVideos.Add(cv); m_CurrentCaptureBitmap.Dispose(); m_Container.DoUpdateCapturedVideos(); }