Some changes in video to support new gst libs in windows

This commit is contained in:
codeanticode
2011-08-26 21:02:42 +00:00
parent 32a0dae8dd
commit ce24f59e86
3 changed files with 10 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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));

View File

@@ -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;