[Android] jni: OpenGL ES 2.0 vout and Full Hardware Acceleration mode are mutually exclusive

Felix Abecassis git at videolan.org
Thu Jan 23 14:34:10 CET 2014


vlc-ports/android | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Wed Jan 22 12:03:44 2014 +0100| [e46de4efcdb544aecbf0c8ad3ac80797bef915c7] | committer: Jean-Baptiste Kempf

jni: OpenGL ES 2.0 vout and Full Hardware Acceleration mode are mutually exclusive

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 vlc-android/jni/libvlcjni.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 8e003a5..c3e7374 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -255,6 +255,9 @@ void Java_org_videolan_libvlc_LibVLC_nativeInit(JNIEnv *env, jobject thiz)
 
     methodId = (*env)->GetMethodID(env, cls, "getHardwareAcceleration", "()I");
     int hardwareAcceleration = (*env)->CallIntMethod(env, thiz, methodId);
+    /* With the MediaCodec opaque mode we cannot use the OpenGL ES vout. */
+    if (hardwareAcceleration == HW_ACCELERATION_FULL)
+        use_opengles2 = false;
 
     /* Don't add any invalid options, otherwise it causes LibVLC to crash */
     const char *argv[] = {



More information about the Android mailing list