Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 714408 Part 1 - Add configure/link features to enable media plugi…
…ns and omx-plugin for libstagefright support - r=mh

--HG--
extra : rebase_source : 51e850e4dec9a53569c0c6991145c5e070781f95
  • Loading branch information
doublec committed Jun 1, 2012
1 parent 11af716 commit 9f9f4cd
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/autoconf.mk.in
Expand Up @@ -141,6 +141,8 @@ MOZ_TREMOR = @MOZ_TREMOR@
MOZ_NO_THEORA_ASM = @MOZ_NO_THEORA_ASM@
MOZ_OPUS = @MOZ_OPUS@
MOZ_WEBM = @MOZ_WEBM@
MOZ_MEDIA_PLUGINS = @MOZ_MEDIA_PLUGINS@
MOZ_OMX_PLUGIN = @MOZ_OMX_PLUGIN@
MOZ_GSTREAMER = @MOZ_GSTREAMER@
MOZ_VP8_ERROR_CONCEALMENT = @MOZ_VP8_ERROR_CONCEALMENT@
MOZ_VP8_ENCODER = @MOZ_VP8_ENCODER@
Expand Down
35 changes: 35 additions & 0 deletions configure.in
Expand Up @@ -420,6 +420,7 @@ fi

AC_SUBST(ANDROID_NDK)
AC_SUBST(ANDROID_TOOLCHAIN)
AC_SUBST(ANDROID_SOURCE)
AC_SUBST(ANDROID_PLATFORM)
AC_SUBST(ANDROID_SDK)
AC_SUBST(ANDROID_PLATFORM_TOOLS)
Expand Down Expand Up @@ -4535,6 +4536,8 @@ MOZ_WAVE=1
MOZ_MEDIA=
MOZ_OPUS=1
MOZ_WEBM=1
MOZ_MEDIA_PLUGINS=
MOZ_OMX_PLUGIN=
MOZ_VP8_ERROR_CONCEALMENT=
MOZ_VP8_ENCODER=
VPX_AS=
Expand Down Expand Up @@ -5612,6 +5615,36 @@ MOZ_ARG_DISABLE_BOOL(webm,
MOZ_WEBM=,
MOZ_WEBM=1)

dnl ========================================================
dnl = Disable media plugin support
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(media-plugins,
[ --enable-media-plugins Enable support for media plugins],
MOZ_MEDIA_PLUGINS=1,
MOZ_MEDIA_PLUGINS=)

if test -n "$MOZ_MEDIA_PLUGINS"; then
AC_DEFINE(MOZ_MEDIA_PLUGINS)
fi

dnl ========================================================
dnl = Enable building OMX media plugin (B2G)
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(omx-plugin,
[ --enable-omx-plugin Enable building OMX plugin (B2G)],
MOZ_OMX_PLUGIN=1,
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)
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])
fi
fi

dnl system libvpx Support
dnl ========================================================
MOZ_ARG_WITH_BOOL(system-libvpx,
Expand Down Expand Up @@ -8739,6 +8772,8 @@ AC_SUBST(MOZ_VORBIS)
AC_SUBST(MOZ_TREMOR)
AC_SUBST(MOZ_OPUS)
AC_SUBST(MOZ_WEBM)
AC_SUBST(MOZ_MEDIA_PLUGINS)
AC_SUBST(MOZ_OMX_PLUGIN)
AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
AC_SUBST(MOZ_VP8_ENCODER)
AC_SUBST(MOZ_OGG)
Expand Down
6 changes: 6 additions & 0 deletions layout/build/Makefile.in
Expand Up @@ -158,6 +158,12 @@ SHARED_LIBRARY_LIBS += \
$(NULL)
endif

ifdef MOZ_MEDIA_PLUGINS
SHARED_LIBRARY_LIBS += \
$(DEPTH)/content/media/plugins/$(LIB_PREFIX)gkconmediaplugins_s.$(LIB_SUFFIX) \
$(NULL)
endif

ifdef NS_PRINTING
SHARED_LIBRARY_LIBS += \
../printing/$(LIB_PREFIX)gkprinting_s.$(LIB_SUFFIX) \
Expand Down
12 changes: 12 additions & 0 deletions toolkit/toolkit-makefiles.sh
Expand Up @@ -1583,6 +1583,18 @@ if [ "$MOZ_WEBM" ]; then
fi
fi

if [ "$MOZ_MEDIA_PLUGINS" ]; then
add_makefiles "
content/media/plugins/Makefile
"
fi

if [ "$MOZ_OMX_PLUGIN" ]; then
add_makefiles "
media/omx-plugin/Makefile
"
fi

if [ "$MOZ_WAVE" ]; then
add_makefiles "
content/media/wave/Makefile
Expand Down
6 changes: 6 additions & 0 deletions toolkit/toolkit-tiers.mk
Expand Up @@ -138,6 +138,12 @@ tier_platform_dirs += \
$(NULL)
endif

ifdef MOZ_OMX_PLUGIN
tier_platform_dirs += \
media/omx-plugin \
$(NULL)
endif

ifndef MOZ_NATIVE_PNG
tier_platform_dirs += media/libpng
endif
Expand Down

0 comments on commit 9f9f4cd

Please sign in to comment.