Skip to content
Snippets Groups Projects
Commit 69ea0ab9 authored by Fabian Huber's avatar Fabian Huber
Browse files

jni: set teletext page/transparency

parent 6337b790
No related branches found
No related tags found
No related merge requests found
Pipeline #467398 failed with stage
in 11 minutes and 5 seconds
......@@ -1197,3 +1197,45 @@ Java_org_videolan_libvlc_MediaPlayer_00024Equalizer_nativeSetAmp(JNIEnv *env,
return libvlc_audio_equalizer_set_amp_at_index(p_eq, amp, index) == 0 ? true : false;
}
void
Java_org_videolan_libvlc_MediaPlayer_nativeSetTeletext(JNIEnv *env,
jobject thiz, jint page)
{
vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);
if (!p_obj)
return;
libvlc_video_set_teletext(p_obj->u.p_mp, page);
}
jint
Java_org_videolan_libvlc_MediaPlayer_nativeGetTeletext(JNIEnv *env,
jobject thiz)
{
vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);
if (!p_obj)
return -2;
return libvlc_video_get_teletext(p_obj->u.p_mp);
}
void
Java_org_videolan_libvlc_MediaPlayer_nativeSetTeletextTransparency(JNIEnv *env, jobject thiz, jboolean transparent) {
vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);
if (!p_obj)
return;
libvlc_video_set_teletext_transparency (p_obj->u.p_mp, !!transparent);
}
void
Java_org_videolan_libvlc_MediaPlayer_nativeToggleTeletextTransparency(JNIEnv *env, jobject thiz) {
vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);
if (!p_obj)
return;
libvlc_video_toggle_teletext_transparency (p_obj->u.p_mp);
}
......@@ -1436,4 +1436,8 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
private native boolean nativeAddSlave(int type, String location, boolean select);
private native boolean nativeRecord(String directory);
private native boolean nativeSetEqualizer(Equalizer equalizer);
public native void nativeSetTeletext(int page);
public native int nativeGetTeletext();
public native void nativeSetTeletextTransparency(boolean transparent);
public native void nativeToggleTeletextTransparency();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment