remove/hide several video functions that were not approved

This commit is contained in:
benfry
2012-08-06 13:41:01 +00:00
parent beee92719a
commit 4bf692c0c8
4 changed files with 47 additions and 40 deletions

View File

@@ -242,7 +242,7 @@ public class Capture extends PImage implements PConstants {
*
* @return boolean
*/
public boolean ready() {
protected boolean ready() {
return 0 < bufWidth && 0 < bufHeight && pipelineReady;
}
@@ -253,7 +253,7 @@ public class Capture extends PImage implements PConstants {
*
* @return boolean
*/
public synchronized boolean newFrame() {
protected synchronized boolean newFrame() {
boolean res = newFrame;
newFrame = false;
return res;
@@ -264,7 +264,7 @@ public class Capture extends PImage implements PConstants {
*
* @return boolean
*/
public boolean isCapturing() {
protected boolean isCapturing() {
return capturing;
}
@@ -282,6 +282,7 @@ public class Capture extends PImage implements PConstants {
return available;
}
/**
* Starts capturing frames from the selected device.
*/
@@ -303,6 +304,7 @@ public class Capture extends PImage implements PConstants {
}
}
/**
* ( begin auto-generated from Capture_stop.xml )
*
@@ -322,6 +324,7 @@ public class Capture extends PImage implements PConstants {
gpipeline.stop();
}
/**
* ( begin auto-generated from Capture_read.xml )
*
@@ -387,6 +390,7 @@ public class Capture extends PImage implements PConstants {
newFrame = true;
}
/**
* <h3>Advanced</h3>
* Returns the name of the source element used for capture.
@@ -397,6 +401,7 @@ public class Capture extends PImage implements PConstants {
return source;
}
/**
* ( begin auto-generated from Capture_list.xml )
*
@@ -412,6 +417,7 @@ public class Capture extends PImage implements PConstants {
return list(capturePlugin);
}
/**
* <h3>Advanced</h3>
* Get a list of all available captures as a String array. i.e.
@@ -451,6 +457,7 @@ public class Capture extends PImage implements PConstants {
return res;
}
static protected String[] list(String sourceName, String propertyName) {
Video.init();
String[] valuesListing = new String[0];
@@ -471,6 +478,7 @@ public class Capture extends PImage implements PConstants {
return valuesListing;
}
/**
* <h3>Advanced</h3>
* Returns a list with the resolutions supported by the capture device,
@@ -478,7 +486,7 @@ public class Capture extends PImage implements PConstants {
*
* @return Resolution[]
*/
public Resolution[] resolutions() {
protected Resolution[] resolutions() {
Resolution[] res;
if (resolutions == null) {
@@ -494,13 +502,14 @@ public class Capture extends PImage implements PConstants {
return res;
}
/**
* <h3>Advanced</h3>
* Prints all the gstreamer elements currently used in the
* current pipeline instance.
*
*/
public void printElements() {
protected void printElements() {
List<Element> list = gpipeline.getElementsRecursive();
PApplet.println(list);
for (Element element : list) {
@@ -515,7 +524,7 @@ public class Capture extends PImage implements PConstants {
* be called upon a new frame read event.
*
*/
public void setEventHandlerObject(Object obj) {
protected void setEventHandlerObject(Object obj) {
eventHandler = obj;
try {

View File

@@ -136,6 +136,7 @@ public class Movie extends PImage implements PConstants {
}
}
/**
* Same as delete.
*/
@@ -143,6 +144,7 @@ public class Movie extends PImage implements PConstants {
delete();
}
/**
* Finalizer of the class.
*/
@@ -154,13 +156,14 @@ public class Movie extends PImage implements PConstants {
}
}
/**
* Get the width of the source video. Note: calling this method repeatedly
* can slow down playback performance.
*
* @return int
*/
public int getSourceWidth() {
protected int getSourceWidth() {
Dimension dim = gplayer.getVideoSize();
if (dim != null) {
return dim.width;
@@ -169,13 +172,14 @@ public class Movie extends PImage implements PConstants {
}
}
/**
* Get the height of the source video. Note: calling this method repeatedly
* can slow down playback performance.
*
* @return int
*/
public int getSourceHeight() {
protected int getSourceHeight() {
Dimension dim = gplayer.getVideoSize();
if (dim != null) {
return dim.height;
@@ -184,16 +188,18 @@ public class Movie extends PImage implements PConstants {
}
}
/**
* Get the original framerate of the source video. Note: calling this method repeatedly
* can slow down playback performance.
*
* @return float
*/
public float getSourceFrameRate() {
protected float getSourceFrameRate() {
return (float)gplayer.getVideoSinkFrameRate();
}
/**
* ( begin auto-generated from Movie_frameRate.xml )
*
@@ -242,6 +248,7 @@ public class Movie extends PImage implements PConstants {
fps = ifps;
}
/**
* ( begin auto-generated from Movie_speed.xml )
*
@@ -268,6 +275,7 @@ public class Movie extends PImage implements PConstants {
}
}
/**
* ( begin auto-generated from Movie_duration.xml )
*
@@ -285,6 +293,7 @@ public class Movie extends PImage implements PConstants {
return sec + Video.nanoSecToSecFrac(nanosec);
}
/**
* ( begin auto-generated from Movie_time.xml )
*
@@ -302,6 +311,7 @@ public class Movie extends PImage implements PConstants {
return sec + Video.nanoSecToSecFrac(nanosec);
}
/**
* ( begin auto-generated from Movie_jump.xml )
*
@@ -339,12 +349,13 @@ public class Movie extends PImage implements PConstants {
seeking = false;
}
/**
* Returns true if the stream is already producing frames.
*
* @return boolean
*/
public boolean ready() {
protected boolean ready() {
return 0 < bufWidth && 0 < bufHeight && sinkReady && !seeking;
}
@@ -355,7 +366,7 @@ public class Movie extends PImage implements PConstants {
*
* @return boolean
*/
public boolean newFrame() {
protected boolean newFrame() {
boolean res = newFrame;
newFrame = false;
return res;
@@ -380,7 +391,7 @@ public class Movie extends PImage implements PConstants {
*
* @return boolean
*/
public boolean isPlaying() {
protected boolean isPlaying() {
return playing;
}
@@ -390,7 +401,7 @@ public class Movie extends PImage implements PConstants {
*
* @return boolean
*/
public boolean isPaused() {
protected boolean isPaused() {
return paused;
}
@@ -399,7 +410,7 @@ public class Movie extends PImage implements PConstants {
*
* @return boolean
*/
public boolean isLooping() {
protected boolean isLooping() {
return repeat;
}
@@ -505,7 +516,7 @@ public class Movie extends PImage implements PConstants {
}
if (playing) {
goToBeginning();
jump(0);
playing = false;
}
paused = false;
@@ -577,20 +588,7 @@ public class Movie extends PImage implements PConstants {
newFrame = true;
}
/**
* Goes to the first frame of the movie.
*/
public void goToBeginning() {
jump(0.0f);
}
/**
* Goes to the last frame of the movie.
*/
public void goToEnd() {
jump(duration());
}
/**
* Change the volume. Values are from 0 to 1.
*
@@ -602,21 +600,13 @@ public class Movie extends PImage implements PConstants {
}
}
/**
* Returns the text string containing the filename of the video loaded.
*
* @return String
*/
public String getFilename() {
return filename;
}
/**
* Prints all the gstreamer elements currently used in the
* current player instance.
*
*/
public void printElements() {
protected void printElements() {
List<Element> list = gplayer.getElementsRecursive();
PApplet.println(list);
for (Element element : list) {
@@ -630,7 +620,7 @@ public class Movie extends PImage implements PConstants {
* be called upon a new frame read event.
*
*/
public void setEventHandlerObject(Object obj) {
protected void setEventHandlerObject(Object obj) {
eventHandler = obj;
try {
@@ -829,10 +819,10 @@ public class Movie extends PImage implements PConstants {
if (repeat) {
if (0 < rate) {
// Playing forward, so we return to the beginning
goToBeginning();
jump(0);
} else {
// Playing backwards, so we go to the end.
goToEnd();
jump(duration());
}
// The rate is reset to 1 when restarting the stream, so