[chronojump] webcam binaries for windows 32 bits



commit ef7a048a8e4b7a0b793efadb27c4e599d71ea586
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Oct 17 15:32:13 2019 +0200

    webcam binaries for windows 32 bits

 src/webcam/webcamFfmpeg.cs               |  21 ++++++++++++++++++---
 src/webcam/webcamFfmpegDevices.cs        |   5 ++++-
 src/webcam/webcamFfmpegSupportedModes.cs |   6 +++++-
 win32/deps/bin/i386/ffmpeg.exe           | Bin 0 -> 49556992 bytes
 win32/deps/bin/i386/ffplay.exe           | Bin 0 -> 49437184 bytes
 5 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/src/webcam/webcamFfmpeg.cs b/src/webcam/webcamFfmpeg.cs
index 6ce8202f..3e065dd1 100644
--- a/src/webcam/webcamFfmpeg.cs
+++ b/src/webcam/webcamFfmpeg.cs
@@ -58,7 +58,12 @@ public class WebcamFfmpeg : Webcam
        {
                string e = "ffmpeg";
                if(os == UtilAll.OperatingSystems.WINDOWS)
-                       e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+               {
+                       if(System.Environment.Is64BitProcess)
+                               e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+                       else
+                               e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/i386/ffmpeg.exe");
+               }
                if(os == UtilAll.OperatingSystems.MACOSX)
                        e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg");
 
@@ -68,7 +73,12 @@ public class WebcamFfmpeg : Webcam
        {
                string e = "ffplay";
                if(os == UtilAll.OperatingSystems.WINDOWS)
-                       e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffplay.exe");
+               {
+                       if(System.Environment.Is64BitProcess)
+                               e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffplay.exe");
+                       else
+                               e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/i386/ffplay.exe");
+               }
                if(os == UtilAll.OperatingSystems.MACOSX)
                        e = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffplay");
 
@@ -145,7 +155,12 @@ public class WebcamFfmpeg : Webcam
        {
                executable = "ffmpeg";
                if(os == UtilAll.OperatingSystems.WINDOWS)
-                       executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+               {
+                       if(System.Environment.Is64BitProcess)
+                               executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+                       else
+                               executable = System.IO.Path.Combine(Util.GetPrefixDir(), 
"bin/i386/ffmpeg.exe");
+               }
                if(os == UtilAll.OperatingSystems.MACOSX)
                        executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg");
 
diff --git a/src/webcam/webcamFfmpegDevices.cs b/src/webcam/webcamFfmpegDevices.cs
index f5a1988c..4d62fc3d 100644
--- a/src/webcam/webcamFfmpegDevices.cs
+++ b/src/webcam/webcamFfmpegDevices.cs
@@ -282,7 +282,10 @@ public class WebcamFfmpegGetDevicesWindows : WebcamFfmpegGetDevicesWinMac
        public WebcamFfmpegGetDevicesWindows()
        {
                initialize();
-               executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+               if(System.Environment.Is64BitProcess)
+                       executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+               else
+                       executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/i386/ffmpeg.exe");
                videoDevString = "DirectShow video devices";
                audioDevString = "DirectShow audio devices";
        }
diff --git a/src/webcam/webcamFfmpegSupportedModes.cs b/src/webcam/webcamFfmpegSupportedModes.cs
index 3eabbc24..d718fb2d 100644
--- a/src/webcam/webcamFfmpegSupportedModes.cs
+++ b/src/webcam/webcamFfmpegSupportedModes.cs
@@ -338,7 +338,11 @@ public class WebcamFfmpegSupportedModesWindows : WebcamFfmpegSupportedModes
                        return;
                }
 
-               string executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+               string executable;
+               if(System.Environment.Is64BitProcess)
+                       executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/ffmpeg.exe");
+               else
+                       executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/i386/ffmpeg.exe");
                //ffmpeg -f dshow -list_options true -i video="USB 2.0 WebCamera"
                List<string> parameters = new List<string>();
                parameters.Add("-f");
diff --git a/win32/deps/bin/i386/ffmpeg.exe b/win32/deps/bin/i386/ffmpeg.exe
new file mode 100755
index 00000000..1787967f
Binary files /dev/null and b/win32/deps/bin/i386/ffmpeg.exe differ
diff --git a/win32/deps/bin/i386/ffplay.exe b/win32/deps/bin/i386/ffplay.exe
new file mode 100755
index 00000000..f307eb03
Binary files /dev/null and b/win32/deps/bin/i386/ffplay.exe differ


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