Bug 941298 - Build changes for FFmpeg PlatformDecoderModule r=gps
authorEdwin Flores <eflores@mozilla.com>
Fri, 21 Mar 2014 19:35:14 +1300
changeset 174701 56244a819a290e6fae4018223022173ec7971ddc
parent 174700 9fe84f49b0ea239847ee085f9689949de50ae107
child 174702 ca38dab56641978e78d3ac3a030faaa8640fc001
push id41333
push usereflores@mozilla.com
push dateFri, 21 Mar 2014 06:35:44 +0000
treeherdermozilla-inbound@4cedbdf21ddd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs941298
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 941298 - Build changes for FFmpeg PlatformDecoderModule r=gps
configure.in
content/media/fmp4/moz.build
--- a/configure.in
+++ b/configure.in
@@ -3943,16 +3943,17 @@ MOZ_WAVE=1
 MOZ_SAMPLE_TYPE_FLOAT32=
 MOZ_SAMPLE_TYPE_S16=
 MOZ_OPUS=1
 MOZ_WEBM=1
 MOZ_GSTREAMER=
 MOZ_DIRECTSHOW=
 MOZ_WMF=
 MOZ_FMP4=
+MOZ_FFMPEG=
 MOZ_WEBRTC=1
 MOZ_PEERCONNECTION=
 MOZ_SRTP=
 MOZ_WEBRTC_SIGNALING=
 MOZ_WEBRTC_ASSERT_ALWAYS=1
 MOZ_SCTP=
 MOZ_MEDIA_PLUGINS=
 MOZ_MEDIA_NAVIGATOR=
@@ -5262,19 +5263,36 @@ MOZ_ARG_DISABLE_BOOL(wmf,
     MOZ_WMF=,
     MOZ_WMF=1)
 
 if test -n "$MOZ_WMF"; then
     AC_DEFINE(MOZ_WMF)
 fi;
 
 dnl ========================================================
+dnl FFmpeg H264/AAC Decoding Support
+dnl ========================================================
+if test "$OS_TARGET" = "Linux"; then
+  MOZ_FFMPEG=1
+fi
+
+MOZ_ARG_DISABLE_BOOL(ffmpeg,
+[  --disable-ffmpeg         Disable FFmpeg for fragmented H264/AAC decoding],
+    MOZ_FFMPEG=,
+    MOZ_FFMPEG=1
+)
+
+if test -n "$MOZ_FFMPEG"; then
+    AC_DEFINE(MOZ_FFMPEG)
+fi;
+
+dnl ========================================================
 dnl = Built-in fragmented MP4 support.
 dnl ========================================================
-if test -n "$MOZ_WMF"; then
+if test -n "$MOZ_WMF" -o -n "$MOZ_FFMPEG"; then
     dnl Enable fragmented MP4 parser on Windows by default.
     dnl We will also need to enable it on other platforms as we implement
     dnl platform decoder support there too.
     MOZ_FMP4=1
 fi
 
 MOZ_ARG_DISABLE_BOOL(fmp4,
 [  --disable-fmp4  Disable support for in built Fragmented MP4 parsing],
@@ -8688,16 +8706,17 @@ AC_SUBST(MOZ_APP_COMPONENT_LIBS)
 AC_SUBST(MOZ_APP_EXTRA_LIBS)
 
 AC_SUBST(MOZ_WAVE)
 AC_SUBST(MOZ_VORBIS)
 AC_SUBST(MOZ_TREMOR)
 AC_SUBST(MOZ_OPUS)
 AC_SUBST(MOZ_WEBM)
 AC_SUBST(MOZ_WMF)
+AC_SUBST(MOZ_FFMPEG)
 AC_SUBST(MOZ_FMP4)
 AC_SUBST(MOZ_DIRECTSHOW)
 AC_SUBST(MOZ_MEDIA_PLUGINS)
 AC_SUBST(MOZ_APPLEMEDIA)
 AC_SUBST(MOZ_OMX_PLUGIN)
 AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
 AC_SUBST(MOZ_VPX)
 AC_SUBST(VPX_AS)
--- a/content/media/fmp4/moz.build
+++ b/content/media/fmp4/moz.build
@@ -62,11 +62,31 @@ if CONFIG['MOZ_WMF']:
   UNIFIED_SOURCES += [
       'wmf/MFTDecoder.cpp',
       'wmf/WMFAudioOutputSource.cpp',
       'wmf/WMFDecoderModule.cpp',
       'wmf/WMFMediaDataDecoder.cpp',
       'wmf/WMFVideoOutputSource.cpp',
   ]
 
+if CONFIG['MOZ_FFMPEG']:
+  EXPORTS += [
+      'ffmpeg/FFmpegAACDecoder.h',
+      'ffmpeg/FFmpegDataDecoder.h',
+      'ffmpeg/FFmpegDecoderModule.h',
+      'ffmpeg/FFmpegFunctionList.h',
+      'ffmpeg/FFmpegH264Decoder.h',
+      'ffmpeg/FFmpegRuntimeLinker.h',
+  ]
+  UNIFIED_SOURCES += [
+      'ffmpeg/FFmpegAACDecoder.cpp',
+      'ffmpeg/FFmpegDataDecoder.cpp',
+      'ffmpeg/FFmpegDecoderModule.cpp',
+      'ffmpeg/FFmpegH264Decoder.cpp',
+      'ffmpeg/FFmpegRuntimeLinker.cpp',
+  ]
+  LOCAL_INCLUDES += [
+      'ffmpeg/include',
+  ]
+
 FINAL_LIBRARY = 'gklayout'
 
 FAIL_ON_WARNINGS = True