diff options
author | Sven Göthel <[email protected]> | 2024-01-28 06:42:50 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-28 06:42:50 +0100 |
commit | 6c67d73dc6b9e49bdd406902e533be91db1a3b0a (patch) | |
tree | 0ab66480a4ba83dd1620227ed6b2f4aa45930593 /src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java | |
parent | 62a1f18e98df6783d487f7dfbbc83026b04a19b8 (diff) |
GLMediaPlayer/FFMPEGMediaPlayer: Add working subtitle (text + ass/saa) support via FFMpeg
TODO:
- We may want to refine subtitle PTS handling
- We may want to support bitmapped subtitles
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java b/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java index 3585f7ab2..c4d1ee78f 100644 --- a/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java +++ b/src/jogl/classes/jogamp/opengl/android/av/AndroidGLMediaPlayerAPI14.java @@ -281,7 +281,7 @@ public class AndroidGLMediaPlayerAPI14 extends GLMediaPlayerImpl { } @Override - protected final void initStreamImpl(final int vid, final int aid, int sid) throws IOException { + protected final void initStreamImpl(final int vid, final int aid, final int sid) throws IOException { if( null == getUri() ) { return; } @@ -336,10 +336,12 @@ public class AndroidGLMediaPlayerAPI14 extends GLMediaPlayerImpl { r_alangs = new String[] { "n/a" }; } final String icodec = "android"; - updateAttributes(null, new int[] { 0 }, new String[] { "und" }, - 0 /* fake */, r_aids, r_alangs, - r_aid, new int[0], new String[0], - GLMediaPlayer.STREAM_ID_NONE, mp.getVideoWidth(), mp.getVideoHeight(), 0, 0, 0, 0f, 0, 0, mp.getDuration(), icodec, icodec); + updateAttributes(null, + new int[] { 0 }, new String[] { "und" }, 0 /* fake */, + r_aids, r_alangs, r_aid, + new int[0], new String[0], GLMediaPlayer.STREAM_ID_NONE, + mp.getVideoWidth(), mp.getVideoHeight(), 0, 0, 0, 0f, 0, 0, mp.getDuration(), + icodec, icodec, null); /** mp.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override @@ -372,10 +374,12 @@ public class AndroidGLMediaPlayerAPI14 extends GLMediaPlayerImpl { } } } - updateAttributes(null, 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, size.width, size.height, 0, 0, 0, fpsRange[1]/1000f, 0, 0, 0, icodec, icodec); + updateAttributes(null, + 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, + size.width, size.height, 0, 0, 0, fpsRange[1]/1000f, 0, 0, 0, + icodec, icodec, null); } } private static String camSz2Str(final Camera.Size csize) { |