[chronojump] Webcam: Cannot playpreview if already capturing
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Webcam: Cannot playpreview if already capturing
- Date: Tue, 16 Jul 2019 14:38:20 +0000 (UTC)
commit 66956046cd6c31da5bf7e28ead15e9e37543e750
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jul 16 16:37:25 2019 +0200
Webcam: Cannot playpreview if already capturing
src/webcam/webcamFfmpeg.cs | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/webcam/webcamFfmpeg.cs b/src/webcam/webcamFfmpeg.cs
index 3a842e92..e1e11cca 100644
--- a/src/webcam/webcamFfmpeg.cs
+++ b/src/webcam/webcamFfmpeg.cs
@@ -87,6 +87,10 @@ public class WebcamFfmpeg : Webcam
if(process != null)
return new Result (false, "");
+ //cannot play preview with camera recording
+ if (ExecuteProcess.IsRunning3 (-1, GetExecutableCapture(os)))
+ return new Result (false, "", "ffmpeg is already running");
+
List<string> parameters = createParametersPlayPreview();
process = new Process();
@@ -103,6 +107,10 @@ public class WebcamFfmpeg : Webcam
}
public override Result PlayPreviewNoBackground () //experimental
{
+ //cannot play preview with camera recording
+ if (ExecuteProcess.IsRunning3 (-1, GetExecutableCapture(os)))
+ return new Result (false, "", "ffmpeg is already running");
+
List<string> parameters = createParametersPlayPreview();
process = new Process();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]