From 7ff2fcb36540aaed087e3a2ba2f0f84916bce2e2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 9 Apr 2014 08:33:00 +0200 Subject: Add TextureSequence.isTextureAvailable(), allowing triggering action only when source becomes ready --- src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl') diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index 6a0e0061f..63bb22d80 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -736,6 +736,11 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { frame.getTexture().destroy(gl); } + @Override + public final boolean isTextureAvailable() { + return State.Paused == state || State.Playing == state; + } + @Override public final TextureFrame getLastTexture() throws IllegalStateException { if( State.Paused != state && State.Playing != state ) { -- cgit v1.2.3