[vlc-devel] [PATCH] android: Enable and use the new android mediacodec decoder

Martin Storsjö martin at martin.st
Mon Sep 24 15:44:56 CEST 2012


While this code isn't all that widely tested yet (since there aren't
all that many official devices running 4.1 yet), it might still be
better to prefer using the IOMX module when enabled. Should this
perhaps use a combo box setting like the audio output until things
have been sorted out properly?
---
 configure.sh                |    1 +
 vlc-android/jni/libvlcjni.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.sh b/configure.sh
index 2383cf7..d4666e8 100755
--- a/configure.sh
+++ b/configure.sh
@@ -62,6 +62,7 @@ sh $VLC_SOURCEDIR/configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux $E
                 --enable-taglib \
                 --enable-dvbpsi \
                 --enable-iomx \
+                --enable-mediacodec \
                 --disable-vlc --disable-shared \
                 --disable-vlm \
                 --disable-dbus \
diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 2fb23db..e60e88a 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -162,7 +162,7 @@ libvlc_media_t *new_media(jlong instance, JNIEnv *env, jobject thiz, jstring fil
              */
             libvlc_media_add_option(p_md, ":file-caching=1500");
             libvlc_media_add_option(p_md, ":network-caching=1500");
-            libvlc_media_add_option(p_md, ":codec=iomx,all");
+            libvlc_media_add_option(p_md, ":codec=mediacodec,iomx,all");
         }
         if (noVideo)
             libvlc_media_add_option(p_md, ":no-video");
-- 
1.7.10




More information about the vlc-devel mailing list