diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 16:59:00 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 16:59:00 +0000 |
commit | f422d8707d987d992dfdcdab63b595627b6379a8 (patch) | |
tree | f0888ba6c47f4df67ef1654241215cd173a503c2 | |
parent | c88c356ceff3d127afd6a07b8df4b66752e5ca82 (diff) | |
download | chromium_src-f422d8707d987d992dfdcdab63b595627b6379a8.zip chromium_src-f422d8707d987d992dfdcdab63b595627b6379a8.tar.gz chromium_src-f422d8707d987d992dfdcdab63b595627b6379a8.tar.bz2 |
Remove use_system_ffmpeg-related logic from media and other mainline gyp files.
BUG=226860
R=fischman@chromium.org
Review URL: https://codereview.chromium.org/14659007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198746 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 3 | ||||
-rw-r--r-- | build/linux/unbundle/ffmpeg.gyp | 25 | ||||
-rw-r--r-- | media/base/media_posix.cc | 9 | ||||
-rw-r--r-- | media/ffmpeg/ffmpeg_common.cc | 8 | ||||
-rw-r--r-- | media/media.gyp | 22 |
5 files changed, 25 insertions, 42 deletions
diff --git a/build/common.gypi b/build/common.gypi index 9767abb..f9a53b0 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -799,9 +799,6 @@ 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', - # Use system ffmpeg instead of bundled one. - 'use_system_ffmpeg%': 0, - # Use system mesa instead of bundled one. 'use_system_mesa%': 0, diff --git a/build/linux/unbundle/ffmpeg.gyp b/build/linux/unbundle/ffmpeg.gyp index dfaaf0a..e3c3723 100644 --- a/build/linux/unbundle/ffmpeg.gyp +++ b/build/linux/unbundle/ffmpeg.gyp @@ -10,6 +10,31 @@ 'direct_dependent_settings': { 'cflags': [ '<!@(pkg-config --cflags libavcodec libavformat libavutil)', + + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' + '--code "#define __STDC_CONSTANT_MACROS\n' + '#include <libavcodec/avcodec.h>\n' + 'int test() { return AV_CODEC_ID_OPUS; }" ' + '--on-failure -DCHROMIUM_OMIT_AV_CODEC_ID_OPUS=1)', + + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' + '--code "#define __STDC_CONSTANT_MACROS\n' + '#include <libavcodec/avcodec.h>\n' + 'int test() { return AV_CODEC_ID_VP9; }" ' + '--on-failure -DCHROMIUM_OMIT_AV_CODEC_ID_VP9=1)', + + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' + '--code "#define __STDC_CONSTANT_MACROS\n' + '#include <libavcodec/avcodec.h>\n' + 'int test() { return AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL; }" ' + '--on-failure -DCHROMIUM_OMIT_AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL=1)', + + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' + '--code "#define __STDC_CONSTANT_MACROS\n' + '#include <libavcodec/avcodec.h>\n' + 'int test() { struct AVFrame frame;\n' + 'return av_frame_get_channels(&frame); }" ' + '--on-failure -DCHROMIUM_NO_AVFRAME_CHANNELS=1)', ], 'defines': [ '__STDC_CONSTANT_MACROS', diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc index 243495a..4aabae9 100644 --- a/media/base/media_posix.cc +++ b/media/base/media_posix.cc @@ -11,15 +11,12 @@ #include "base/path_service.h" #include "base/strings/stringize_macros.h" #include "media/ffmpeg/ffmpeg_common.h" - -#if !defined(USE_SYSTEM_FFMPEG) #include "third_party/ffmpeg/ffmpeg_stubs.h" using third_party_ffmpeg::kNumStubModules; using third_party_ffmpeg::kModuleFfmpegsumo; using third_party_ffmpeg::InitializeStubs; using third_party_ffmpeg::StubPathMap; -#endif // !defined(USE_SYSTEM_FFMPEG) namespace media { namespace internal { @@ -49,11 +46,6 @@ static const base::FilePath::CharType kSumoLib[] = #endif bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) { -#if defined(USE_SYSTEM_FFMPEG) - // No initialization is necessary when using system ffmpeg, - // we just link directly with system ffmpeg libraries. - return true; -#else StubPathMap paths; // First try to initialize with Chrome's sumo library. @@ -69,7 +61,6 @@ bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) { FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION))).value()); return InitializeStubs(paths); -#endif // !defined(USE_SYSTEM_FFMPEG) } } // namespace internal diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index bd0ed2e..e47b8f3 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -84,10 +84,8 @@ AudioCodec CodecIDToAudioCodec(AVCodecID codec_id) { return kCodecGSM_MS; case AV_CODEC_ID_PCM_MULAW: return kCodecPCM_MULAW; -#ifndef CHROMIUM_OMIT_AV_CODEC_ID_OPUS case AV_CODEC_ID_OPUS: return kCodecOpus; -#endif default: DVLOG(1) << "Unknown audio CodecID: " << codec_id; } @@ -131,10 +129,8 @@ static AVCodecID AudioCodecToCodecID(AudioCodec audio_codec, return AV_CODEC_ID_GSM_MS; case kCodecPCM_MULAW: return AV_CODEC_ID_PCM_MULAW; -#ifndef CHROMIUM_OMIT_AV_CODEC_ID_OPUS case kCodecOpus: return AV_CODEC_ID_OPUS; -#endif default: DVLOG(1) << "Unknown AudioCodec: " << audio_codec; } @@ -151,10 +147,8 @@ VideoCodec CodecIDToVideoCodec(AVCodecID codec_id) { return kCodecMPEG4; case AV_CODEC_ID_VP8: return kCodecVP8; -#ifndef CHROMIUM_OMIT_AV_CODEC_ID_VP9 case AV_CODEC_ID_VP9: return kCodecVP9; -#endif default: DVLOG(1) << "Unknown video CodecID: " << codec_id; } @@ -171,10 +165,8 @@ static AVCodecID VideoCodecToCodecID(VideoCodec video_codec) { return AV_CODEC_ID_MPEG4; case kCodecVP8: return AV_CODEC_ID_VP8; -#ifndef CHROMIUM_OMIT_AV_CODEC_ID_VP9 case kCodecVP9: return AV_CODEC_ID_VP9; -#endif default: DVLOG(1) << "Unknown VideoCodec: " << video_codec; } diff --git a/media/media.gyp b/media/media.gyp index 5f38e3e..557d118 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -510,28 +510,6 @@ 'filters/vpx_video_decoder.h', ], }], - ['use_system_ffmpeg == 1', { - 'cflags': [ - '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' - '--code "#define __STDC_CONSTANT_MACROS\n' - '#include <libavcodec/avcodec.h>\n' - 'int test() { return AV_CODEC_ID_OPUS; }" ' - '--on-failure -DCHROMIUM_OMIT_AV_CODEC_ID_OPUS=1)', - - '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' - '--code "#define __STDC_CONSTANT_MACROS\n' - '#include <libavcodec/avcodec.h>\n' - 'int test() { return AV_CODEC_ID_VP9; }" ' - '--on-failure -DCHROMIUM_OMIT_AV_CODEC_ID_VP9=1)', - - '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' - '--code "#define __STDC_CONSTANT_MACROS\n' - '#include <libavcodec/avcodec.h>\n' - 'int test() { struct AVFrame frame;\n' - 'return av_frame_get_channels(&frame); }" ' - '--on-failure -DCHROMIUM_NO_AVFRAME_CHANNELS=1)', - ], - }], ['OS == "ios"', { 'includes': [ # For shared_memory_support_sources variable. |