From 627703abb1877c60a40b13f43c8e272b1cb6cfe9 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Sat, 9 Jul 2011 04:02:54 +0000 Subject: [PATCH] Renamed play() to start(), pause() to stop(), and isPlaying() to isCapturing() in the Capture class --- .../video/src/processing/video/Capture.java | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/java/libraries/video/src/processing/video/Capture.java b/java/libraries/video/src/processing/video/Capture.java index 57cf5f7cf..29198f7d0 100644 --- a/java/libraries/video/src/processing/video/Capture.java +++ b/java/libraries/video/src/processing/video/Capture.java @@ -38,8 +38,7 @@ import org.gstreamer.interfaces.Property; public class Capture extends PImage implements PConstants { protected String source; - protected boolean playing = false; - protected boolean paused = false; + protected boolean capturing = false; protected String fps; protected int bufWidth; @@ -257,35 +256,26 @@ public class Capture extends PImage implements PConstants { } /** - * Returns whether the stream is playing or not. + * Returns whether the device is capturing frames or not. * * @return boolean */ - public boolean isPlaying() { - return playing; + public boolean isCapturing() { + return capturing; } - /** - * Returns whether the stream is paused or not. - * - * @return boolean - */ - public boolean isPaused() { - return paused; - } /** - * Resumes the capture pipeline. + * Starts the capture pipeline. */ - public void play() { + public void start() { boolean init = false; if (!pipelineReady) { initPipeline(); init = true; } - playing = true; - paused = false; + capturing = true; gpipeline.play(); if (init) { @@ -298,10 +288,10 @@ public class Capture extends PImage implements PConstants { /** * Stops the capture pipeline. */ - public void pause() { - playing = false; - paused = true; - gpipeline.pause(); + public void stop() { + capturing = false; + //gpipeline.pause(); + gpipeline.stop(); } /**