Removed GS prefix

This commit is contained in:
codeanticode
2011-07-09 00:15:54 +00:00
parent 7fdf29baad
commit 53852c2406
5 changed files with 19 additions and 19 deletions

View File

@@ -417,7 +417,7 @@ public class Capture extends PImage implements PConstants {
}
static protected String[] list(String sourceName, String propertyName) {
GSVideo.init();
Video.init();
String[] valuesListing = new String[0];
Element videoSource = ElementFactory.make(sourceName, "Source");
PropertyProbe probe = PropertyProbe.wrap(videoSource);
@@ -524,7 +524,7 @@ public class Capture extends PImage implements PConstants {
String[] strPropNames, String[] strPropValues, String frameRate) {
this.parent = parent;
GSVideo.init();
Video.init();
// register methods
parent.registerDispose(this);
@@ -627,7 +627,7 @@ public class Capture extends PImage implements PConstants {
// Setting direct buffer passing in the video sink, so no new buffers are created
// and disposed by the GC on each frame (thanks to Octavi Estape for pointing
// out this one).
rgbSink.setPassDirectBuffer(GSVideo.passDirectBuffer);
rgbSink.setPassDirectBuffer(Video.passDirectBuffer);
// No need for rgbSink.dispose(), because the addMany() doesn't increment the
// refcount of the videoSink object.

View File

@@ -27,12 +27,12 @@ import com.sun.jna.Native;
import com.sun.jna.Platform;
// Library loader class by Tal Shalif
public class GSLibraryLoader {
public class LibraryLoader {
public interface DummyLibrary extends Library {
}
private static GSLibraryLoader instance;
private static LibraryLoader instance;
// These dependencies correspond to gstreamer-winbuilds 0.10.6
static final Object[][] WIN32_DEPENDENCIES = {
@@ -149,7 +149,7 @@ public class GSLibraryLoader {
private static final int RECURSIVE_LOAD_MAX_DEPTH = 5;
private GSLibraryLoader() {
private LibraryLoader() {
}
private void preLoadLibs() {
@@ -250,10 +250,10 @@ public class GSLibraryLoader {
}
}
public static synchronized GSLibraryLoader getInstance() {
public static synchronized LibraryLoader getInstance() {
if (null == instance) {
instance = new GSLibraryLoader();
instance = new LibraryLoader();
instance.preLoadLibs();
}

View File

@@ -23,7 +23,7 @@ import java.net.URL;
import com.sun.jna.Platform;
class GSLibraryPath {
class LibraryPath {
// This method returns the folder inside which the gstreamer library folder
// should be located.
String get() {

View File

@@ -275,7 +275,7 @@ public class Movie extends PImage implements PConstants {
public float duration() {
float sec = gplayer.queryDuration().toSeconds();
float nanosec = gplayer.queryDuration().getNanoSeconds();
return sec + GSVideo.nanoSecToSecFrac(nanosec);
return sec + Video.nanoSecToSecFrac(nanosec);
}
/**
@@ -286,7 +286,7 @@ public class Movie extends PImage implements PConstants {
public float time() {
float sec = gplayer.queryPosition().toSeconds();
float nanosec = gplayer.queryPosition().getNanoSeconds();
return sec + GSVideo.nanoSecToSecFrac(nanosec);
return sec + Video.nanoSecToSecFrac(nanosec);
}
/**
@@ -319,7 +319,7 @@ public class Movie extends PImage implements PConstants {
}
boolean res;
long start = GSVideo.secToNanoLong(where);
long start = Video.secToNanoLong(where);
long stop = -1; // or whatever > new_pos
res = gplayer.seek(1.0, Format.TIME, SeekFlags.FLUSH,
@@ -555,7 +555,7 @@ public class Movie extends PImage implements PConstants {
File file;
GSVideo.init();
Video.init();
// first check to see if this can be read locally from a file.
try {
@@ -666,7 +666,7 @@ public class Movie extends PImage implements PConstants {
// Setting direct buffer passing in the video sink, so no new buffers are created
// and disposed by the GC on each frame (thanks to Octavi Estape for pointing
// out this one).
rgbSink.setPassDirectBuffer(GSVideo.passDirectBuffer);
rgbSink.setPassDirectBuffer(Video.passDirectBuffer);
gplayer.setVideoSink(rgbSink);
// The setVideoSink() method sets the videoSink as a property of the PlayBin,
// which increments the refcount of the videoSink element. Disposing here once

View File

@@ -33,7 +33,7 @@ import java.util.List;
* This class contains some basic functions used by the rest of the classes in
* this library.
*/
public class GSVideo implements PConstants {
public class Video implements PConstants {
protected static String VERSION_STRING = "0.9";
protected static long INSTANCES_COUNT = 0;
@@ -108,7 +108,7 @@ public class GSVideo implements PConstants {
}
if ((PApplet.platform == WINDOWS) && !globalGStreamer) {
GSLibraryLoader loader = GSLibraryLoader.getInstance();
LibraryLoader loader = LibraryLoader.getInstance();
if (loader == null) {
System.err.println("Cannot load local version of GStreamer libraries.");
}
@@ -154,7 +154,7 @@ public class GSVideo implements PConstants {
} else {
globalGStreamer = false;
if (localGStreamerPath.equals("")) {
GSLibraryPath libPath = new GSLibraryPath();
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "/gstreamer/linux";
gstreamerPluginsPath = path + "/gstreamer/linux/" + localPluginsFolder;
@@ -172,7 +172,7 @@ public class GSVideo implements PConstants {
} else {
globalGStreamer = false;
if (localGStreamerPath.equals("")) {
GSLibraryPath libPath = new GSLibraryPath();
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "\\gstreamer\\win";
gstreamerPluginsPath = path + "\\gstreamer\\win\\" + localPluginsFolder;
@@ -190,7 +190,7 @@ public class GSVideo implements PConstants {
} else {
globalGStreamer = false;
if (localGStreamerPath.equals("")) {
GSLibraryPath libPath = new GSLibraryPath();
LibraryPath libPath = new LibraryPath();
String path = libPath.get();
gstreamerBinPath = path + "/gstreamer/macosx";
gstreamerPluginsPath = path + "/gstreamer/macosx/" + localPluginsFolder;