[Android] Build a version of the iomx plugin for honeycomb

Martin Storsjö git at videolan.org
Sat May 12 14:53:11 CEST 2012


android | branch: master | Martin Storsjö <martin at martin.st> | Sat May 12 15:47:54 2012 +0300| [1cf2e2e9b575d53a4adbbcbb5086e75ae0ac70ad] | committer: Martin Storsjö

Build a version of the iomx plugin for honeycomb

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=1cf2e2e9b575d53a4adbbcbb5086e75ae0ac70ad
---

 Makefile                                     |    1 +
 compile.sh                                   |    1 +
 vlc-android/jni/Android.mk                   |    9 +++++++++
 vlc-android/src/org/videolan/vlc/LibVLC.java |    4 +++-
 4 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 41d4b08..54a5002 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ VLC_APK=$(SRC)/bin/VLC-debug.apk
 LIBVLCJNI=	\
 	$(SRC)/obj/local/$(ARCH)/libvlcjni.so \
 	$(SRC)/obj/local/$(ARCH)/libiomx-ics.so \
+	$(SRC)/obj/local/$(ARCH)/libiomx-hc.so \
 	$(SRC)/obj/local/$(ARCH)/libiomx-gingerbread.so \
 
 LIBVLCJNI_H=$(SRC)/jni/libvlcjni.h
diff --git a/compile.sh b/compile.sh
index 4851718..1ac3a36 100755
--- a/compile.sh
+++ b/compile.sh
@@ -125,6 +125,7 @@ echo "Building Android"
 cd ../../
 
 export ANDROID_SYS_HEADERS_GINGERBREAD=${PWD}/android-headers-gingerbread
+export ANDROID_SYS_HEADERS_HC=${PWD}/android-headers-hc
 export ANDROID_SYS_HEADERS_ICS=${PWD}/android-headers-ics
 
 export ANDROID_LIBS=${PWD}/android-libs
diff --git a/vlc-android/jni/Android.mk b/vlc-android/jni/Android.mk
index c6642e6..06480cb 100644
--- a/vlc-android/jni/Android.mk
+++ b/vlc-android/jni/Android.mk
@@ -49,6 +49,15 @@ include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
 
+LOCAL_MODULE     := libiomx-hc
+LOCAL_SRC_FILES  := ../$(VLC_SRC_DIR)/modules/codec/omxil/iomx.cpp
+LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/modules/codec/omxil $(ANDROID_SYS_HEADERS_HC)/frameworks/base/include $(ANDROID_SYS_HEADERS_HC)/frameworks/base/native/include $(ANDROID_SYS_HEADERS_HC)/system/core/include $(ANDROID_SYS_HEADERS_HC)/hardware/libhardware/include
+LOCAL_LDLIBS     := -L$(ANDROID_LIBS) -lgcc -lstagefright -lmedia -lutils -lbinder
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
 LOCAL_MODULE     := libiomx-ics
 LOCAL_SRC_FILES  := ../$(VLC_SRC_DIR)/modules/codec/omxil/iomx.cpp
 LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/modules/codec/omxil $(ANDROID_SYS_HEADERS_ICS)/frameworks/base/include $(ANDROID_SYS_HEADERS_ICS)/frameworks/base/native/include $(ANDROID_SYS_HEADERS_ICS)/system/core/include $(ANDROID_SYS_HEADERS_ICS)/hardware/libhardware/include
diff --git a/vlc-android/src/org/videolan/vlc/LibVLC.java b/vlc-android/src/org/videolan/vlc/LibVLC.java
index f062fb1..c044860 100644
--- a/vlc-android/src/org/videolan/vlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/vlc/LibVLC.java
@@ -62,7 +62,9 @@ public class LibVLC {
         try {
             if (Build.VERSION.SDK_INT <= 10)
                 System.loadLibrary("iomx-gingerbread");
-            else /* No honeycomb build for now */
+            else if (Build.VERSION.SDK_INT <= 13)
+                System.loadLibrary("iomx-hc");
+            else
                 System.loadLibrary("iomx-ics");
         } catch (Throwable t) {
             Log.w(TAG, "Unable to load the iomx library: " + t);



More information about the Android mailing list