From ce24f59e86d6080cfbf1c94cd14c2c98f95684ba Mon Sep 17 00:00:00 2001 From: codeanticode Date: Fri, 26 Aug 2011 21:02:42 +0000 Subject: [PATCH] Some changes in video to support new gst libs in windows --- java/libraries/video/src/processing/video/Capture.java | 6 ++++-- .../video/src/processing/video/LibraryLoader.java | 9 +++++---- java/libraries/video/src/processing/video/Video.java | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/java/libraries/video/src/processing/video/Capture.java b/java/libraries/video/src/processing/video/Capture.java index 091f42760..8e59695a2 100644 --- a/java/libraries/video/src/processing/video/Capture.java +++ b/java/libraries/video/src/processing/video/Capture.java @@ -533,8 +533,10 @@ public class Capture extends PImage implements PConstants { initGStreamer(parent, requestWidth, requestHeight, "v4l2src", intPropNames, intPropValues, strPropNames, strPropValues, frameRate); } else if (PApplet.platform == WINDOWS) { - initGStreamer(parent, requestWidth, requestHeight, "ksvideosrc", intPropNames, - intPropValues, strPropNames, strPropValues, frameRate); + //initGStreamer(parent, requestWidth, requestHeight, "ksvideosrc", intPropNames, + // intPropValues, strPropNames, strPropValues, frameRate); + initGStreamer(parent, requestWidth, requestHeight, "dshowvideosrc", intPropNames, + intPropValues, strPropNames, strPropValues, frameRate); //init(requestWidth, requestHeight, "dshowvideosrc", intPropNames, // intPropValues, strPropNames, strPropValues, frameRate, addDecoder, null, ""); } else if (PApplet.platform == MACOSX) { diff --git a/java/libraries/video/src/processing/video/LibraryLoader.java b/java/libraries/video/src/processing/video/LibraryLoader.java index 84f170818..e0542b48f 100644 --- a/java/libraries/video/src/processing/video/LibraryLoader.java +++ b/java/libraries/video/src/processing/video/LibraryLoader.java @@ -36,7 +36,8 @@ public class LibraryLoader { // These dependencies correspond to gstreamer-winbuilds 0.10.6 static final Object[][] WIN32_DEPENDENCIES = { - { "SDL", new String[] {}, false }, { "glew32", new String[] {}, false }, + { "SDL", new String[] {}, false }, + { "glew32", new String[] {}, false }, { "iconv-2", new String[] {}, false }, { "liba52-0", new String[] {}, false }, { "libbz2", new String[] {}, false }, @@ -110,9 +111,9 @@ public class LibraryLoader { { "gstcdda-0.10", new String[] {}, true }, { "gstcontroller-0.10", new String[] {}, true }, { "gstdataprotocol-0.10", new String[] {}, true }, - { "gstfarsight-0.10", new String[] {}, true }, + //{ "gstfarsight-0.10", new String[] {}, true }, { "gstfft-0.10", new String[] {}, true }, - { "gstgl-0.10", new String[] {}, true }, + //{ "gstgl-0.10", new String[] {}, true }, { "gstinterfaces-0.10", new String[] {}, true }, { "gstnet-0.10", new String[] {}, true }, { "gstnetbuffer-0.10", new String[] {}, true }, @@ -202,7 +203,7 @@ public class LibraryLoader { } } catch (Exception e) { if (reqLib) - throw new RuntimeException(String.format("can not load library %s", + throw new RuntimeException(String.format("can not load required library %s", name, e)); else System.out.println(String.format("can not load library %s", name, e)); diff --git a/java/libraries/video/src/processing/video/Video.java b/java/libraries/video/src/processing/video/Video.java index 26cda0221..c1cd37578 100644 --- a/java/libraries/video/src/processing/video/Video.java +++ b/java/libraries/video/src/processing/video/Video.java @@ -176,6 +176,7 @@ public class Video implements PConstants { String path = libPath.get(); gstreamerBinPath = path + "\\win"; gstreamerPluginsPath = path + "\\win\\" + localPluginsFolder; + PApplet.println("gstreamerBinPath: " + gstreamerBinPath); } else { gstreamerBinPath = localGStreamerPath; gstreamerPluginsPath = localGStreamerPath + "\\" + localPluginsFolder;