[Android] libvlcjni: remove eventVideoPlayerActivityCreated

Thomas Guillem git at videolan.org
Thu Apr 9 17:43:36 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Apr  8 17:26:10 2015 +0200| [c0f2d9c4ad65aa251004106f2b118f3bd4112310] | committer: Thomas Guillem

libvlcjni: remove eventVideoPlayerActivityCreated

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c0f2d9c4ad65aa251004106f2b118f3bd4112310
---

 libvlc/jni/vout.c                                        |   14 --------------
 libvlc/src/org/videolan/libvlc/LibVLC.java               |    2 --
 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java  |    6 ------
 3 files changed, 22 deletions(-)

diff --git a/libvlc/jni/vout.c b/libvlc/jni/vout.c
index fa6912f..ee50463 100644
--- a/libvlc/jni/vout.c
+++ b/libvlc/jni/vout.c
@@ -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);
 
diff --git a/libvlc/src/org/videolan/libvlc/LibVLC.java b/libvlc/src/org/videolan/libvlc/LibVLC.java
index 2712414..2f4d6f6 100644
--- a/libvlc/src/org/videolan/libvlc/LibVLC.java
+++ b/libvlc/src/org/videolan/libvlc/LibVLC.java
@@ -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) {
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 8e5ce83..b6869a8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -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);



More information about the Android mailing list