Bug 759945 - Part 1: Build changes for software decoding using libstagefright on Android - r=khuey

--HG--
extra : rebase_source : 842a055874967f1e3117e8198821ef14d8ec54aa
This commit is contained in:
Chris Double 2012-08-10 20:15:12 +12:00
parent b2f8ecf01c
commit c3598766a7
4 changed files with 19 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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