aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native/libav/ffmpeg_static.c
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-28 22:05:18 +0100
committerSven Göthel <[email protected]>2024-01-28 22:05:18 +0100
commita19f810c9618e2fa6829f1c157d2e1a88ca178de (patch)
tree50730d855a37f287330b8aecbdeefbde849cf128 /src/jogl/native/libav/ffmpeg_static.c
parent3e95c1994d363bc137ffcf548fd3751ac500ac7b (diff)
FFMPEGPlayer: Prep for bitmap'ed subtitles: Use glEnable()/glBindTexture() func-ptr in native; readNextPacket0() passes video+subtitle texTarget and texID
For bitmap subtitles we need to push the bitmap into its own texture. Hence readNextPacket0() must switch to used texture using glEnable() on !core and glBindTexture().
Diffstat (limited to 'src/jogl/native/libav/ffmpeg_static.c')
-rw-r--r--src/jogl/native/libav/ffmpeg_static.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jogl/native/libav/ffmpeg_static.c b/src/jogl/native/libav/ffmpeg_static.c
index 184972306..a0145cee8 100644
--- a/src/jogl/native/libav/ffmpeg_static.c
+++ b/src/jogl/native/libav/ffmpeg_static.c
@@ -38,6 +38,7 @@ static jclass ffmpegMediaPlayerClazz = NULL;
jmethodID ffmpeg_jni_mid_pushSound = NULL;
jmethodID ffmpeg_jni_mid_pushSubtitleText = NULL;
jmethodID ffmpeg_jni_mid_pushSubtitleASS = NULL;
+jmethodID ffmpeg_jni_mid_pushSubtitleTex = NULL;
jmethodID ffmpeg_jni_mid_updateAttributes = NULL;
jmethodID ffmpeg_jni_mid_setIsGLOriented = NULL;
jmethodID ffmpeg_jni_mid_setupFFAttributes = NULL;
@@ -69,6 +70,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGStaticNatives_i
ffmpeg_jni_mid_pushSound = (*env)->GetMethodID(env, ffmpegMediaPlayerClazz, "pushSound", "(Ljava/nio/ByteBuffer;II)V");
ffmpeg_jni_mid_pushSubtitleText = (*env)->GetMethodID(env, ffmpegMediaPlayerClazz, "pushSubtitleText", "(Ljava/lang/String;III)V");
ffmpeg_jni_mid_pushSubtitleASS = (*env)->GetMethodID(env, ffmpegMediaPlayerClazz, "pushSubtitleASS", "(Ljava/lang/String;III)V");
+ ffmpeg_jni_mid_pushSubtitleTex = (*env)->GetMethodID(env, ffmpegMediaPlayerClazz, "pushSubtitleTex", "(IIIIIIII)V");
ffmpeg_jni_mid_updateAttributes = (*env)->GetMethodID(env, ffmpegMediaPlayerClazz, "updateAttributes",
"(Ljava/lang/String;[I[Ljava/lang/String;I[I[Ljava/lang/String;I[I[Ljava/lang/String;IIIIIIFIIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
ffmpeg_jni_mid_setIsGLOriented = (*env)->GetMethodID(env, ffmpegMediaPlayerClazz, "setIsGLOriented", "(Z)V");
@@ -78,6 +80,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGStaticNatives_i
if(ffmpeg_jni_mid_pushSound == NULL ||
ffmpeg_jni_mid_pushSubtitleText == NULL ||
ffmpeg_jni_mid_pushSubtitleASS == NULL ||
+ ffmpeg_jni_mid_pushSubtitleTex == NULL ||
ffmpeg_jni_mid_updateAttributes == NULL ||
ffmpeg_jni_mid_setIsGLOriented == NULL ||
ffmpeg_jni_mid_setupFFAttributes == NULL ||