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. --- .../opengl/util/av/impl/FFMPEGMediaPlayer.java | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java') diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java index 2e48b49e6..e6784273e 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -1006,26 +1006,5 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { } return vPTS; } - - final void pushSound(final ByteBuffer sampleData, final int data_size, final int audio_pts) { - if( audioStreamEnabled() ) { - audioSink.enqueueData( audio_pts, sampleData, data_size); - } - } - final void pushSubtitleText(final String text, final int pts, final int start_display_pts, final int end_display_pts) { - if( null != assEventListener ) { - if( start_display_pts > getPTS().get(Clock.currentMillis()) ) { - assEventListener.run( new ASSEventLine(ASSEventLine.Format.TEXT, text, start_display_pts, end_display_pts) ); - } - } - } - final void pushSubtitleASS(final String ass, final int pts, final int start_display_pts, final int end_display_pts) { - if( null != assEventListener ) { - assEventListener.run( new ASSEventLine(ASSEventLine.Format.FFMPEG, ass, start_display_pts, end_display_pts) ); - } - } - final void pushSubtitleTex(final int texID, final int x, final int y, final int width, final int height, final int pts, final int start_display_pts, final int end_display_pts) { - // System.err.println("SubTex["+texID+"]: "+x+"/"+y+" "+width+"x"+height+", pts "+pts+" ["+start_display_pts+".."+end_display_pts+"] "+(end_display_pts-start_display_pts+1)); - } } -- cgit v1.2.3