diff options
author | Sven Gothel <[email protected]> | 2014-04-09 08:33:00 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-04-09 08:33:00 +0200 |
commit | 7ff2fcb36540aaed087e3a2ba2f0f84916bce2e2 (patch) | |
tree | 2e7cbc8c112ba47c476212eb728a4fa6ec040e2f /src/jogl/classes/jogamp/opengl/util | |
parent | be8d0765317cdcb44bbe3016cc18273ecace9324 (diff) |
Add TextureSequence.isTextureAvailable(), allowing triggering action only when source becomes ready
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -737,6 +737,11 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { } @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 ) { throw new IllegalStateException("Instance not paused or playing: "+this); |