[chronojump] Continuation of last commit



commit 507086538f1bc85121cbcbfce1c15e891ad20985
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Sep 20 13:17:36 2018 +0200

    Continuation of last commit

 src/webcamFfmpeg.cs | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/src/webcamFfmpeg.cs b/src/webcamFfmpeg.cs
index 93ff6500..b82ecbcc 100644
--- a/src/webcamFfmpeg.cs
+++ b/src/webcamFfmpeg.cs
@@ -231,6 +231,13 @@ public static class WebcamFfmpegGetDevicesWindows
                List<string> parameters = createParameters();
 
                ExecuteProcess.Result execute_result = ExecuteProcess.run (executable, parameters);
+
+               LogB.Information("---- stdout: ----");
+               LogB.Information(execute_result.stdout);
+               LogB.Information("---- stderr: ----");
+               LogB.Information(execute_result.stderr);
+               LogB.Information("-----------------");
+
                if(! execute_result.success)
                {
                        LogB.Information("WebcamFfmpegGetDevicesWindows error: " + execute_result.stderr);
@@ -242,7 +249,17 @@ public static class WebcamFfmpegGetDevicesWindows
                         */
                        if(execute_result.stdout != null && execute_result.stdout != "" &&
                                        execute_result.stdout.Contains("DirectShow video devices"))
+                       {
+                               LogB.Information("Calling parse with stdout");
                                return parse(execute_result.stdout);
+                       }
+
+                       if(execute_result.stderr != null && execute_result.stderr != "" &&
+                                       execute_result.stderr.Contains("DirectShow video devices"))
+                       {
+                               LogB.Information("Calling parse with stderr");
+                               return parse(execute_result.stderr);
+                       }
 
                        return new List<string>();
                }
@@ -269,7 +286,6 @@ public static class WebcamFfmpegGetDevicesWindows
        private static List<string> parse(string devicesOutput)
        {
                LogB.Information("Called parse");
-               LogB.Information("stdout: " + devicesOutput);
 
                /*
                 * break the big string in \n strings


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]