Fixed wrong path assignment on Linux and Windows

This commit is contained in:
codeanticode
2011-10-31 15:36:44 +00:00
parent 7c20b4a698
commit 4303b1729f
2 changed files with 10 additions and 11 deletions

View File

@@ -680,7 +680,7 @@ public class Movie extends PImage implements PConstants {
// which is less fun, so this will crap out.
file = new File(parent.dataPath(filename));
if (file.exists()) {
gplayer = new PlayBin2("GSMovie Player");
gplayer = new PlayBin2("Movie Player");
gplayer.setInputFile(file);
}
} catch (Exception e) {
@@ -693,23 +693,21 @@ public class Movie extends PImage implements PConstants {
try {
file = new File(filename);
if (file.exists()) {
gplayer = new PlayBin2("GSMovie Player");
gplayer = new PlayBin2("Movie Player");
gplayer.setInputFile(file);
}
} catch (Exception e) {
PApplet.println("Shit coming...");
e.printStackTrace();
}
}
// Network read...
if (gplayer == null) {
if (gplayer == null && filename.startsWith("http://")) {
try {
PApplet.println("network read");
gplayer = new PlayBin2("GSMovie Player");
gplayer = new PlayBin2("Movie Player");
gplayer.setURI(URI.create(filename));
} catch (Exception e) {
PApplet.println("Shit coming...");
e.printStackTrace();
}
}

View File

@@ -101,7 +101,8 @@ public class Video implements PConstants {
setMacOSXPath();
}
PApplet.println("gstreamerBinPath: " + gstreamerBinPath);
System.out.println("gstreamerBinPath: " + gstreamerBinPath);
System.out.flush();
if (!gstreamerBinPath.equals("")) {
System.setProperty("jna.library.path", gstreamerBinPath);
}
@@ -159,8 +160,8 @@ public class Video implements PConstants {
if (localGStreamerPath.equals("")) {
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "/linux" + bitsJVM;
gstreamerPluginsPath = buildGStreamerBinPath(gstreamerBinPath, "/" + localPluginsFolder);
gstreamerBinPath = buildGStreamerBinPath(path, "/linux" + bitsJVM);
gstreamerPluginsPath = gstreamerBinPath + "/" + localPluginsFolder;
} else {
gstreamerBinPath = localGStreamerPath;
gstreamerPluginsPath = localGStreamerPath + "/" + localPluginsFolder;
@@ -177,8 +178,8 @@ public class Video implements PConstants {
if (localGStreamerPath.equals("")) {
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "\\windows" + bitsJVM;
gstreamerPluginsPath = buildGStreamerBinPath(gstreamerBinPath , "\\" + localPluginsFolder);
gstreamerBinPath = buildGStreamerBinPath(path, "\\windows" + bitsJVM);
gstreamerPluginsPath = gstreamerBinPath + "\\" + localPluginsFolder;
} else {
gstreamerBinPath = localGStreamerPath;
gstreamerPluginsPath = localGStreamerPath + "\\" + localPluginsFolder;