From b8b692e9cf3120d788ae912514f54948ddccacf5 Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Wed, 31 Jan 2024 11:28:10 +0100 Subject: 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. --- src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java | 5 ----- src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java | 4 ---- 2 files changed, 9 deletions(-) (limited to 'src/graphui/classes') diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java index f26460240..2f8486068 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/MediaButton.java @@ -173,11 +173,6 @@ public class MediaButton extends TexSeqButton { public final AudioSink getAudioSink() { return getGLMediaPlayer().getAudioSink(); } private final GLMediaEventListener defGLMediaEventListener = new GLMediaEventListener() { - @Override - public void newFrameAvailable(final GLMediaPlayer ts, final TextureFrame newFrame, final long when) { - // texButton.markStateDirty(); - } - @Override public void attributesChanged(final GLMediaPlayer mp, final GLMediaPlayer.EventMask eventMask, final long when) { if( verbose ) { diff --git a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java index 07ed203f8..1c62bde9c 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java +++ b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java @@ -70,7 +70,6 @@ import com.jogamp.opengl.util.av.GLMediaPlayer.EventMask; import com.jogamp.opengl.util.av.GLMediaPlayer.GLMediaEventListener; import com.jogamp.opengl.util.av.GLMediaPlayer.StreamException; import com.jogamp.opengl.util.texture.TextureSequence; -import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame; /** * Media player {@link Widget}, embedding a {@link MediaButton} and its controls. @@ -163,9 +162,6 @@ public class MediaPlayer extends Widget { mButton.setVerbose(false).addDefaultEventListener().setTextureLetterbox(letterBox); mPlayer.setAudioVolume( 0f ); 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) { if( DEBUG ) { -- cgit v1.2.3