Added printElements() method to Movie and Capture, updated dir structure

This commit is contained in:
codeanticode
2011-08-21 17:31:25 +00:00
parent 3203c1eead
commit 23f13ec0ae
3 changed files with 34 additions and 6 deletions

View File

@@ -23,6 +23,7 @@ import processing.core.*;
import java.nio.*;
import java.util.ArrayList;
import java.util.List;
import java.lang.reflect.*;
import org.gstreamer.*;
@@ -213,6 +214,19 @@ public class Capture extends PImage implements PConstants {
delete();
}
/**
* Prints all the gstreamer elements currently used in the
* current pipeline instance.
*
*/
public void printElements() {
List<Element> list = gpipeline.getElementsRecursive();
PApplet.println(list);
for (Element element : list) {
PApplet.println(element.toString());
}
}
/**
* Sets the object to use as destination for the frames read from the stream.
* The color conversion mask is automatically set to the one required to

View File

@@ -25,6 +25,7 @@ import java.awt.Dimension;
import java.io.*;
import java.net.URI;
import java.nio.*;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.lang.reflect.*;
@@ -125,6 +126,19 @@ public class Movie extends PImage implements PConstants {
delete();
}
/**
* Prints all the gstreamer elements currently used in the
* current player instance.
*
*/
public void printElements() {
List<Element> list = gplayer.getElementsRecursive();
PApplet.println(list);
for (Element element : list) {
PApplet.println(element.toString());
}
}
/**
* Sets the object to use as destination for the frames read from the stream.
* The color conversion mask is automatically set to the one required to

View File

@@ -156,8 +156,8 @@ public class Video implements PConstants {
if (localGStreamerPath.equals("")) {
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "/gstreamer/linux";
gstreamerPluginsPath = path + "/gstreamer/linux/" + localPluginsFolder;
gstreamerBinPath = path + "/linux";
gstreamerPluginsPath = path + "/linux/" + localPluginsFolder;
} else {
gstreamerBinPath = localGStreamerPath;
gstreamerPluginsPath = localGStreamerPath + "/" + localPluginsFolder;
@@ -174,8 +174,8 @@ public class Video implements PConstants {
if (localGStreamerPath.equals("")) {
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "\\gstreamer\\win";
gstreamerPluginsPath = path + "\\gstreamer\\win\\" + localPluginsFolder;
gstreamerBinPath = path + "\\win";
gstreamerPluginsPath = path + "\\win\\" + localPluginsFolder;
} else {
gstreamerBinPath = localGStreamerPath;
gstreamerPluginsPath = localGStreamerPath + "\\" + localPluginsFolder;
@@ -192,8 +192,8 @@ public class Video implements PConstants {
if (localGStreamerPath.equals("")) {
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "/gstreamer/macosx";
gstreamerPluginsPath = path + "/gstreamer/macosx/" + localPluginsFolder;
gstreamerBinPath = path + "/macosx";
gstreamerPluginsPath = path + "/macosx/" + localPluginsFolder;
} else {
gstreamerBinPath = localGStreamerPath;
gstreamerPluginsPath = localGStreamerPath + "/" + localPluginsFolder;