diff options
author | Sven Gothel <[email protected]> | 2023-03-13 05:59:34 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-13 05:59:34 +0100 |
commit | 913b00f8b876e29af91677ef61b3eb35d6853e6e (patch) | |
tree | 17bc28ad255f1e086b2aa80028d4e6fb1ffd0456 /src/graphui/classes/com | |
parent | 5efd3a6d9cf12d38ce6d7c91f9c5968927f3253a (diff) |
GLMediaPlayer: Overhaul and simplify states, allow usage before stream ready showing test-texture. Adding stop(); (API Change)
- allow multiple initGL(..) @ uninitialized and initialized
- allows usage before stream is ready
- using a test-texture @ uninitialized
- adding stop()
API change
- initStream() -> playStream()
- play() -> resume()
FFMPEG: Added 'ready' check for robustness
Diffstat (limited to 'src/graphui/classes/com')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java index 290abba6e..241fad389 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java @@ -105,7 +105,7 @@ public class MediaButton extends TexSeqButton { public void run() { // loop for-ever .. mPlayer.seek(0); - mPlayer.play(); + mPlayer.resume(); } }.start(); } else if( 0 != ( GLMediaEventListener.EVENT_CHANGE_ERR & event_mask ) ) { final StreamException se = mPlayer.getStreamException(); @@ -128,7 +128,7 @@ public class MediaButton extends TexSeqButton { try { mPlayer.initGL(gl); mPlayer.setAudioVolume( 0f ); - mPlayer.play(); + mPlayer.resume(); markStateDirty(); } catch (final Exception e) { e.printStackTrace(); |