From c3598766a753d801b0cb08dd5dfc0dabd31e9292 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 10 Aug 2012 20:15:12 +1200 Subject: [PATCH] Bug 759945 - Part 1: Build changes for software decoding using libstagefright on Android - r=khuey --HG-- extra : rebase_source : 842a055874967f1e3117e8198821ef14d8ec54aa --- configure.in | 10 +++++----- toolkit/mozapps/installer/packager.mk | 9 ++++++++- toolkit/toolkit-makefiles.sh | 3 +++ toolkit/toolkit-tiers.mk | 3 +++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 576442b869fa..dd5f1203b7e3 100644 --- a/configure.in +++ b/configure.in @@ -5304,7 +5304,7 @@ if test -n "$MOZ_MEDIA_NAVIGATOR"; then fi dnl ======================================================== -dnl = Enable building OMX media plugin (B2G) +dnl = Enable building OMX media plugin (B2G or Android) dnl ======================================================== MOZ_ARG_ENABLE_BOOL(omx-plugin, [ --enable-omx-plugin Enable building OMX plugin (B2G)], @@ -5312,12 +5312,12 @@ MOZ_ARG_ENABLE_BOOL(omx-plugin, MOZ_OMX_PLUGIN=) if test -n "$MOZ_OMX_PLUGIN"; then - if test "$OS_TARGET" = "Android" -a -n "$gonkdir"; then - dnl Only allow building OMX plugin on Gonk (B2G) + if test "$OS_TARGET" = "Android"; then + dnl Only allow building OMX plugin on Gonk (B2G) or Android AC_DEFINE(MOZ_OMX_PLUGIN) else - dnl fail if we're not building on Gonk - AC_MSG_ERROR([OMX media plugin can only be built on B2G]) + dnl fail if we're not building on Gonk or Android + AC_MSG_ERROR([OMX media plugin can only be built on B2G or Android]) fi fi diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index bf06a8d8af76..a03e33982988 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -340,6 +340,12 @@ else INNER_ROBOCOP_PACKAGE=echo 'Testing is disabled - No Robocop for you' endif +ifdef MOZ_OMX_PLUGIN +OMX_PLUGIN_NAME = libomxplugin.so +else +OMX_PLUGIN_NAME = +endif + PKG_SUFFIX = .apk INNER_MAKE_PACKAGE = \ $(foreach lib,$(SZIP_LIBRARIES),host/bin/szip $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib) $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib:.so=.sz) && mv $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib:.so=.sz) $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib) && ) \ @@ -347,7 +353,7 @@ INNER_MAKE_PACKAGE = \ cp $(GECKO_APP_AP_PATH)/gecko.ap_ $(_ABS_DIST) && \ ( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \ mkdir -p lib/$(ABI_DIR) && \ - mv libmozglue.so $(MOZ_CHILD_PROCESS_NAME) lib/$(ABI_DIR) && \ + mv libmozglue.so $(MOZ_CHILD_PROCESS_NAME) $(OMX_PLUGIN_NAME) lib/$(ABI_DIR) && \ rm -f lib.id && \ for SOMELIB in *.so ; \ do \ @@ -370,6 +376,7 @@ INNER_UNMAKE_PACKAGE = \ pushd $(MOZ_PKG_DIR) && \ $(UNZIP) $(UNPACKAGE) && \ mv lib/$(ABI_DIR)/libmozglue.so . && \ + mv lib/$(ABI_DIR)/libomxplugin.so . && \ mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \ rm -rf lib/$(ABI_DIR) && \ popd diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index b47ac0f99e8e..08733882fe80 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -1672,6 +1672,9 @@ fi if [ "$MOZ_OMX_PLUGIN" ]; then add_makefiles " media/omx-plugin/Makefile + media/omx-plugin/lib/ics/libutils/Makefile + media/omx-plugin/lib/ics/libstagefright/Makefile + media/omx-plugin/lib/ics/libstagefright_omx/Makefile " fi diff --git a/toolkit/toolkit-tiers.mk b/toolkit/toolkit-tiers.mk index b4a9ca71f41c..f21b9e571d33 100644 --- a/toolkit/toolkit-tiers.mk +++ b/toolkit/toolkit-tiers.mk @@ -145,6 +145,9 @@ endif ifdef MOZ_OMX_PLUGIN tier_platform_dirs += \ + media/omx-plugin/lib/ics/libutils \ + media/omx-plugin/lib/ics/libstagefright \ + media/omx-plugin/lib/ics/libstagefright_omx \ media/omx-plugin \ $(NULL) endif