Example #1
0
 private void DisableRecordingAndSaveVideo()
 {
     if (debugMode)
     {
         return;
     }
     camera.ImageGrabbed -= AddFrameToVideo;
     videoWriter.Dispose();
     IsRecordingRadioButton.Invoke(new MethodInvoker(delegate() { IsRecordingRadioButton.Checked = false; }));
 }
Example #2
0
        private void InitializeRecording()
        {
            if (debugMode)
            {
                return;
            }
            DateTime dateTime = DateTime.Now;
            string   fileName = dateTime.Month + "-" + dateTime.Day + "-" + dateTime.Year + "---" + dateTime.Hour + "h" + dateTime.Minute + "m" + dateTime.Second + "s";

            videoWriter          = new VideoWriter(Application.StartupPath + "\\Recordings\\Videos\\" + fileName + ".mp4", (int)camera.GetCaptureProperty(CapProp.FourCC), 30, frame.Size, false);
            camera.ImageGrabbed += AddFrameToVideo;
            IsRecordingRadioButton.Invoke(new MethodInvoker(delegate() { IsRecordingRadioButton.Checked = true; }));
            SaveImage(Application.StartupPath + "\\Recordings\\Images\\" + fileName);
        }