Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Aza/libvlcjni
  • Skantes/libvlcjni
  • videolan/libvlcjni
  • mfkl/libvlcjni
  • tguillem/libvlcjni
  • chouquette/libvlcjni
  • asenat/libvlcjni
  • aaa1115910/libvlcjni
  • alexandre-janniaux/libvlcjni
  • robUx4/libvlcjni
  • fcartegnie/libvlcjni
  • Labnann/libvlcjni
  • c0ff330k/libvlcjni
  • haasn/libvlcjni
  • Niram7777/libvlcjni
  • chub/libvlcjni
  • fhuber/libvlcjni
  • MangalK/libvlcjni
  • gabriel_lt/libvlcjni
  • rhstone/libvlcjni
  • sami-sweng/libvlcjni
21 results
Show changes
Commits on Source (4)
......@@ -22,7 +22,7 @@ allprojects {
}
ext {
libvlcVersion = '4.0.0-eap17'
libvlcVersion = '4.0.0-eap18'
minSdkVersion = 17
targetSdkVersion = 30
compileSdkVersion = 31
......
......@@ -22,7 +22,6 @@
#include <pthread.h>
#include <stdlib.h>
#include <dlfcn.h>
#include "libvlcjni-vlcobject.h"
......@@ -1033,7 +1032,7 @@ Java_org_videolan_libvlc_MediaPlayer_nativeSetEqualizer(JNIEnv *env,
jboolean
Java_org_videolan_libvlc_MediaPlayer_nativeRecord(JNIEnv *env, jobject thiz,
jstring jdirectory)
jstring jdirectory, jboolean enable)
{
vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);
const char *psz_directory;
......@@ -1041,12 +1040,6 @@ Java_org_videolan_libvlc_MediaPlayer_nativeRecord(JNIEnv *env, jobject thiz,
if (!p_obj)
return false;
int (*record_func)(libvlc_media_player_t *, const char *) =
dlsym(RTLD_DEFAULT, "libvlc_media_player_record");
if (!record_func)
return false;
if (jdirectory)
{
psz_directory = (*env)->GetStringUTFChars(env, jdirectory, 0);
......@@ -1059,14 +1052,14 @@ Java_org_videolan_libvlc_MediaPlayer_nativeRecord(JNIEnv *env, jobject thiz,
else
psz_directory = NULL;
jboolean ret = record_func(p_obj->u.p_mp, psz_directory) == 0;
libvlc_media_player_record(p_obj->u.p_mp, enable, psz_directory);
if (psz_directory)
{
(*env)->ReleaseStringUTFChars(env, jdirectory, psz_directory);
}
return ret;
return true;
}
jint
......@@ -1197,3 +1190,51 @@ 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 100;
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);
}
jboolean
Java_org_videolan_libvlc_MediaPlayer_nativeGetTeletextTransparency(JNIEnv *env,
jobject thiz)
{
vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);
if (!p_obj)
return false;
libvlc_video_get_teletext_transparency (p_obj->u.p_mp);
}
......@@ -1222,10 +1222,11 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
*
* @param directory path of the recording directory or null to stop
* recording
* @param enable true to start recording, false to stop
* @return true on success.
*/
public boolean record(String directory) {
return nativeRecord(directory);
public boolean record(String directory, boolean enable) {
return nativeRecord(directory, enable);
}
/**
......@@ -1320,6 +1321,39 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
nativeSetPosition(pos, false);
}
/**
* Gets currently selected teletext page.
* @return the currently selected teletext page.
*/
public int getTeletext() {
return nativeGetTeletext();
};
/**
* Select a teletext page.
* If telexext was not active, activate teletext.
* @param page: page to change to
*/
public void setTeletext(int page) {
nativeSetTeletext(page);
};
/**
* Get current teletext background transparency.
* @return true if teletext is currently active and transparent, false if teletext is opaque or not active.
*/
public boolean getTeletextTransparency() {
return nativeGetTeletextTransparency();
};
/**
* Set teletext background transparency.
* @param transparent: true for transparent, false for opaque
*/
public void setTeletextTransparency(boolean transparent) {
nativeSetTeletextTransparency(transparent);
};
/**
* Gets current movie's length in ms.
* @return the movie length (in ms), or -1 if there is no media.
......@@ -1436,6 +1470,10 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
private native long nativeGetSpuDelay();
private native boolean nativeSetSpuDelay(long delay);
private native boolean nativeAddSlave(int type, String location, boolean select);
private native boolean nativeRecord(String directory);
private native boolean nativeRecord(String directory, boolean enable);
private native boolean nativeSetEqualizer(Equalizer equalizer);
private native int nativeGetTeletext();
private native void nativeSetTeletext(int page);
private native boolean nativeGetTeletextTransparency();
private native void nativeSetTeletextTransparency(boolean transparent);
}