diff options
author | watk <watk@chromium.org> | 2015-07-20 13:16:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-20 20:16:50 +0000 |
commit | 45c3063debd193f953d5c4aa55902d185469f4bc (patch) | |
tree | 52ba383323f4e2eb465a6187d71881f3fff5f212 /media/media.gyp | |
parent | 808535c6118fcbecdf8caf6309ab5a7b99d02bd3 (diff) | |
download | chromium_src-45c3063debd193f953d5c4aa55902d185469f4bc.zip chromium_src-45c3063debd193f953d5c4aa55902d185469f4bc.tar.gz chromium_src-45c3063debd193f953d5c4aa55902d185469f4bc.tar.bz2 |
Initial support for the desktop media pipeline on Android.
Add experimental support for the desktop src= media pipeline on Android
behind a compile-time variable. To compile with it
enabled, set the gyp variable media_use_ffmpeg=1.
Currently only H/W accelerated VP8 is supported because that is all that
the existing AndroidVideoDecodeAccelerator supports.
BUG=507834
Review URL: https://codereview.chromium.org/1230793009
Cr-Commit-Position: refs/heads/master@{#339498}
Diffstat (limited to 'media/media.gyp')
-rw-r--r-- | media/media.gyp | 65 |
1 files changed, 44 insertions, 21 deletions
diff --git a/media/media.gyp b/media/media.gyp index e3cadc1..d73d584 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -12,14 +12,6 @@ # detection of ABI mismatches and prevents silent errors. 'linux_link_pulseaudio%': 0, 'conditions': [ - ['OS=="android" or OS=="ios"', { - # Android and iOS don't use ffmpeg or libvpx. - 'media_use_ffmpeg%': 0, - 'media_use_libvpx%': 0, - }, { # 'OS!="android" and OS!="ios"' - 'media_use_ffmpeg%': 1, - 'media_use_libvpx%': 1, - }], # Enable ALSA and Pulse for runtime selection. ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chromecast==1 and target_arch!="arm"))', { # ALSA is always needed for Web MIDI even if the cras is enabled. @@ -45,6 +37,7 @@ }, 'includes': [ 'media_cdm.gypi', + 'media_variables.gypi', ], 'targets': [ { @@ -66,6 +59,9 @@ '../url/url.gyp:url_lib', 'shared_memory_support', ], + 'export_dependent_settings': [ + '../third_party/opus/opus.gyp:opus', + ], 'defines': [ 'MEDIA_IMPLEMENTATION', ], @@ -260,7 +256,7 @@ 'base/cdm_factory.cc', 'base/cdm_factory.h', 'base/cdm_initialized_promise.cc', - 'base/cdm_initialized_promise.h', + 'base/cdm_initialized_promise.h', 'base/cdm_key_information.cc', 'base/cdm_key_information.h', 'base/cdm_promise.cc', @@ -706,17 +702,38 @@ 'player_android', 'video_capture_android_jni_headers', ], - 'sources': [ - 'base/media.cc', - 'base/media.h', - ], 'sources!': [ - 'filters/opus_audio_decoder.cc', - 'filters/opus_audio_decoder.h', + 'base/audio_video_metadata_extractor.cc', + 'base/audio_video_metadata_extractor.h', + 'base/media_file_checker.cc', + 'base/media_file_checker.h', + 'filters/ffmpeg_video_decoder.cc', + 'filters/ffmpeg_video_decoder.h', ], 'defines': [ 'DISABLE_USER_INPUT_MONITOR', ], + 'conditions': [ + ['media_use_ffmpeg == 1', { + 'defines': [ + # On Android, FFmpeg is built without video decoders. We only + # support hardware video decoding. + 'ENABLE_MEDIA_PIPELINE_ON_ANDROID', + 'DISABLE_FFMPEG_VIDEO_DECODERS', + ], + 'direct_dependent_settings': { + 'defines': [ + 'ENABLE_MEDIA_PIPELINE_ON_ANDROID', + 'DISABLE_FFMPEG_VIDEO_DECODERS', + ], + }, + }, { # media_use_ffmpeg == 0 + 'sources!': [ + 'filters/opus_audio_decoder.cc', + 'filters/opus_audio_decoder.h', + ], + }], + ], }], # For VaapiVideoEncodeAccelerator. ['target_arch != "arm" and chromeos == 1', { @@ -1264,19 +1281,25 @@ 'dependencies': [ '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', ], - }, { # media_use_ffmpeg== 0 + }, { # media_use_ffmpeg==0 'sources!': [ - 'base/audio_video_metadata_extractor_unittest.cc', - 'base/container_names_unittest.cc', - 'base/media_file_checker_unittest.cc', 'ffmpeg/ffmpeg_common_unittest.cc', 'filters/audio_decoder_unittest.cc', - 'filters/audio_file_reader_unittest.cc', - 'filters/blocking_url_protocol_unittest.cc', 'filters/ffmpeg_aac_bitstream_converter_unittest.cc', 'filters/ffmpeg_demuxer_unittest.cc', 'filters/ffmpeg_glue_unittest.cc', 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', + ], + }], + # Even if FFmpeg is enabled on Android we don't want these. + # TODO(watk): Refactor tests that could be made to run on Android. + ['media_use_ffmpeg==0 or OS=="android"', { + 'sources!': [ + 'base/audio_video_metadata_extractor_unittest.cc', + 'base/container_names_unittest.cc', + 'base/media_file_checker_unittest.cc', + 'filters/audio_file_reader_unittest.cc', + 'filters/blocking_url_protocol_unittest.cc', 'filters/ffmpeg_video_decoder_unittest.cc', 'filters/in_memory_url_protocol_unittest.cc', 'test/pipeline_integration_test.cc', |