From 7fe9da9d2b5b7475ea3878b0a8d23f485bb19dff Mon Sep 17 00:00:00 2001
From: Sven Göthel <sgothel@jausoft.com>
Date: Sat, 27 Jan 2024 07:36:07 +0100
Subject: GLMediaPlayer: Add initial subtitle support, track
 audio/video/subtitle streams and languages and add convenient
 switchStream(..) entry.

audio/video/subtitle streams and language metadata is maintained by arrays holding the stream-IDs and language string identifier.

Implementation added in FFMPEGPlayer for these data-sets.
---
 .../classes/jogamp/opengl/util/av/NullGLMediaPlayer.java     | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java')

diff --git a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java
index 9b2b3869c..f88894ce4 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java
@@ -38,10 +38,8 @@ import com.jogamp.opengl.GLProfile;
 import com.jogamp.common.av.PTS;
 import com.jogamp.common.nio.Buffers;
 import com.jogamp.common.os.Clock;
-import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.IOUtil;
 import com.jogamp.opengl.util.av.GLMediaPlayer;
-import com.jogamp.opengl.util.av.GLMediaPlayer.State;
 import com.jogamp.opengl.util.texture.Texture;
 import com.jogamp.opengl.util.texture.TextureData;
 import com.jogamp.opengl.util.texture.TextureIO;
@@ -146,15 +144,15 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl {
     }
 
     @Override
-    protected final void initStreamImpl(final int vid, final int aid) throws IOException {
+    protected final void initStreamImpl(final int vid, final int aid, int sid) throws IOException {
         texData = createTestTextureData();
         final float _fps = 24f;
         final int _duration = 10*60*1000; // msec
         final int _totalFrames = (int) ( (_duration/1000)*_fps );
-        updateAttributes(0 /* fake */, GLMediaPlayer.STREAM_ID_NONE,
-                         texData.getWidth(), texData.getHeight(), 0,
-                         0, 0, _fps,
-                         _totalFrames, 0, _duration, "png-static", null);
+        updateAttributes(new int[] { 0 }, new String[] { "und" }, 0 /* fake */,
+                         new int[0], new String[0], GLMediaPlayer.STREAM_ID_NONE,
+                         new int[0], new String[0], GLMediaPlayer.STREAM_ID_NONE,
+                         texData.getWidth(), texData.getHeight(), 0, 0, 0, _fps, _totalFrames, 0, _duration, "png-static", null);
     }
     @Override
     protected final void initGLImpl(final GL gl) throws IOException, GLException {
-- 
cgit v1.2.3