Commit c0f2d9c4 authored by Thomas Guillem's avatar Thomas Guillem

libvlcjni: remove eventVideoPlayerActivityCreated

parent 55bfe1ae
......@@ -30,7 +30,6 @@ pthread_mutex_t vout_android_lock;
static void *vout_android_gui = NULL;
static jobject vout_android_java_surf = NULL;
static jobject vout_android_subtitles_surf = NULL;
static bool vout_video_player_activity_created = false;
void *jni_LockAndGetSubtitlesSurface() {
pthread_mutex_lock(&vout_android_lock);
......@@ -162,19 +161,6 @@ int jni_ConfigureSurface(jobject jsurf, int width, int height, int hal, bool *co
return ret == -1 ? -1 : 0;
}
bool jni_IsVideoPlayerActivityCreated() {
pthread_mutex_lock(&vout_android_lock);
bool result = vout_video_player_activity_created;
pthread_mutex_unlock(&vout_android_lock);
return result;
}
void Java_org_videolan_libvlc_LibVLC_eventVideoPlayerActivityCreated(JNIEnv *env, jobject thiz, jboolean created) {
pthread_mutex_lock(&vout_android_lock);
vout_video_player_activity_created = created;
pthread_mutex_unlock(&vout_android_lock);
}
void Java_org_videolan_libvlc_LibVLC_attachSurface(JNIEnv *env, jobject thiz, jobject surf, jobject gui) {
pthread_mutex_lock(&vout_android_lock);
......
......@@ -103,8 +103,6 @@ public class LibVLC {
public native void attachSubtitlesSurface(Surface surface);
public native void detachSubtitlesSurface();
public native void eventVideoPlayerActivityCreated(boolean created);
/* Load library before object instantiation */
static {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD_MR1) {
......
......@@ -671,10 +671,6 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
final EventHandler em = EventHandler.getInstance();
em.addHandler(mEventHandler);
// Signal to LibVLC that the videoPlayerActivity was created, thus the
// SurfaceView is now available for MediaCodec direct rendering.
mLibVLC.eventVideoPlayerActivityCreated(true);
loadMedia();
// Add any selected subtitle file from the file picker
......@@ -766,8 +762,6 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
Util.commitPreferences(editor);
// MediaCodec opaque direct rendering should not be used anymore since there is no surface to attach.
mLibVLC.eventVideoPlayerActivityCreated(false);
// HW acceleration was temporarily disabled because of an error, restore the previous value.
if (mDisabledHardwareAcceleration)
mLibVLC.setHardwareAcceleration(mPreviousHardwareAccelerationMode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment