diff options
author | Sven Göthel <[email protected]> | 2024-01-31 11:28:10 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-31 11:28:10 +0100 |
commit | b8b692e9cf3120d788ae912514f54948ddccacf5 (patch) | |
tree | aafde7897934d548789297efc20336754af06624 /src/demos | |
parent | 72065d9e2a9d6480c34afc9920071d5ed577d37a (diff) |
GLMediaPlayer: Split GLMediaFrameListener (rarely used) from GLMediaEventListener, easing listener callbacks; Prepare SubtitleEventListener generalization (Bug 1494)
Moves pushSound(), pushSubtitle*() from FFMPEGMediaPlayer to GLMediaPlayerImpl,
as it is handled in a generic way - even though currently only called by native FFMPEGMediaPlayer implementation.
Note: This patch is incomplete, i.e. not even compile clean.
But choses as-is to semantically split the work to ease review.
Diffstat (limited to 'src/demos')
10 files changed, 0 insertions, 50 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java index ad0ce310f..c5b0c2f8f 100644 --- a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java +++ b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java @@ -101,10 +101,6 @@ public class MovieCubeActivity0a extends NewtBaseActivity { final GLMediaPlayer mPlayer = demoMain.getGLMediaPlayer(); mPlayer.addEventListener(new GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieCubeActivity0 AttributesChanges: "+eventMask+", when "+when); System.err.println("MovieCubeActivity0 State: "+mp); diff --git a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java index 7a0eb47da..41f876072 100644 --- a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java +++ b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java @@ -103,10 +103,6 @@ public class MovieCubeActivity0b extends NewtBaseActivity { final GLMediaPlayer mPlayer = demoMain.getGLMediaPlayer(); mPlayer.addEventListener(new GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieCubeActivity0 AttributesChanges: "+eventMask+", when "+when); System.err.println("MovieCubeActivity0 State: "+mp); diff --git a/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity0.java b/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity0.java index 6316e1bba..e3de851c8 100644 --- a/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity0.java +++ b/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity0.java @@ -101,9 +101,6 @@ public class MovieSimpleActivity0 extends NewtBaseActivity { final GLMediaPlayer mPlayer = demoMain.getGLMediaPlayer(); mPlayer.addEventListener( new GLMediaPlayer.GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieSimpleActivity0 AttributesChanges: "+eventMask+", when "+when); System.err.println("MovieSimpleActivity0 State: "+mp); diff --git a/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity1.java b/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity1.java index 23bbf6971..cd1d4ddc4 100644 --- a/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity1.java +++ b/src/demos/com/jogamp/opengl/demos/android/MovieSimpleActivity1.java @@ -51,7 +51,6 @@ import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.av.GLMediaPlayer; import com.jogamp.opengl.util.av.GLMediaPlayer.StreamException; -import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame; import android.os.Bundle; import android.util.Log; @@ -138,9 +137,6 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { demoMain.setUseOriginalScale(mPlayerNoZoom); mPlayerMain.addEventListener( new GLMediaPlayer.GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieSimpleActivity1 AttributesChanges: "+eventMask+", when "+when); System.err.println("MovieSimpleActivity1 State: "+mp); @@ -189,9 +185,6 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { } mPlayerSub.addEventListener( new GLMediaPlayer.GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Init) ) { glWindowHUD.addGLEventListener(demoHUD); diff --git a/src/demos/com/jogamp/opengl/demos/av/CrossFadePlayer.java b/src/demos/com/jogamp/opengl/demos/av/CrossFadePlayer.java index b63edf50e..cc8607422 100644 --- a/src/demos/com/jogamp/opengl/demos/av/CrossFadePlayer.java +++ b/src/demos/com/jogamp/opengl/demos/av/CrossFadePlayer.java @@ -61,9 +61,6 @@ public class CrossFadePlayer final GLMediaEventListener mediaEventListener = new GLMediaEventListener()
{
@Override
- public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { }
-
- @Override
public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when)
{
System.out.println("\n***\nAttributesChanges: "+eventMask+", when "+when);
diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieCube.java b/src/demos/com/jogamp/opengl/demos/av/MovieCube.java index 1507e1322..4add48503 100644 --- a/src/demos/com/jogamp/opengl/demos/av/MovieCube.java +++ b/src/demos/com/jogamp/opengl/demos/av/MovieCube.java @@ -109,9 +109,6 @@ public class MovieCube implements GLEventListener { mPlayer.addEventListener(new GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieCube.0 AttributesChanges: "+eventMask+", when "+when); System.err.println("MovieCube.0 State: "+mp); @@ -598,10 +595,6 @@ public class MovieCube implements GLEventListener { mc.mPlayer.addEventListener(new GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask event_mask, final long when) { System.err.println("MovieCube.1 AttributesChanges: events_mask "+event_mask+", when "+when); System.err.println("MovieCube.1 State: "+mp); diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java b/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java index 0840d87f2..8b0c0daac 100644 --- a/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java +++ b/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java @@ -818,11 +818,6 @@ public class MovieSBSStereo implements StereoGLEventListener { void destroyWindow(final Window window) { new InterruptSource.Thread( () -> { window.destroy(); } ).start(); } - - @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieSimple AttributesChanges: "+eventMask+", when "+when); diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java b/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java index 0d928d937..42714b65c 100644 --- a/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java +++ b/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java @@ -392,9 +392,6 @@ public class MovieSimple implements GLEventListener { mPlayer.addEventListener(new GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieSimple.0 AttributesChanges: "+eventMask+", when "+when); System.err.println("MovieSimple.0 State: "+mp); @@ -584,11 +581,6 @@ public class MovieSimple implements GLEventListener { void destroyWindow(final Window window) { new InterruptSource.Thread( () -> { window.destroy(); } ).start(); } - - @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MovieSimple.1 AttributesChanges: "+eventMask+", when "+when); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java index 4293f0d6d..7e15a7991 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java @@ -762,10 +762,6 @@ public class UISceneDemo03 { static class MyGLMediaEventListener implements GLMediaEventListener { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { System.err.println("MediaPlayer.1 AttributesChanges: "+eventMask+", when "+when); System.err.println("MediaPlayer.1 State: "+mp); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java index ec557c411..b5a70bda5 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java @@ -97,7 +97,6 @@ import com.jogamp.opengl.util.av.GLMediaPlayerFactory; import com.jogamp.opengl.util.caps.NonFSAAGLCapsChooser; import com.jogamp.opengl.util.texture.ImageSequence; import com.jogamp.opengl.util.texture.TextureIO; -import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame; /** * Complex interactive GraphUI Scene demo with different Button and Label Shapes layout on the screen. @@ -709,10 +708,6 @@ public class UISceneDemo20 implements GLEventListener { }); mPlayer.addEventListener( new GLMediaEventListener() { @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - } - - @Override public void attributesChanged(final GLMediaPlayer mp, final EventMask eventMask, final long when) { System.err.println("MediaButton AttributesChanges: "+eventMask+", when "+when); System.err.println("MediaButton State: "+mp); |