OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 # Override to dynamically link the cras (ChromeOS audio) library. | 8 # Override to dynamically link the cras (ChromeOS audio) library. |
9 'use_cras%': 0, | 9 'use_cras%': 0, |
10 # Option e.g. for Linux distributions to link pulseaudio directly | 10 # Option e.g. for Linux distributions to link pulseaudio directly |
11 # (DT_NEEDED) instead of using dlopen. This helps with automated | 11 # (DT_NEEDED) instead of using dlopen. This helps with automated |
12 # detection of ABI mismatches and prevents silent errors. | 12 # detection of ABI mismatches and prevents silent errors. |
13 'linux_link_pulseaudio%': 0, | 13 'linux_link_pulseaudio%': 0, |
14 'conditions': [ | 14 'conditions': [ |
15 ['OS=="android" or OS=="ios"', { | |
16 # Android and iOS don't use ffmpeg or libvpx. | |
17 'media_use_ffmpeg%': 0, | |
18 'media_use_libvpx%': 0, | |
19 }, { # 'OS!="android" and OS!="ios"' | |
20 'media_use_ffmpeg%': 1, | |
21 'media_use_libvpx%': 1, | |
22 }], | |
23 # Enable ALSA and Pulse for runtime selection. | 15 # Enable ALSA and Pulse for runtime selection. |
24 ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chr omecast==1 and target_arch!="arm"))', { | 16 ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chr omecast==1 and target_arch!="arm"))', { |
25 # ALSA is always needed for Web MIDI even if the cras is enabled. | 17 # ALSA is always needed for Web MIDI even if the cras is enabled. |
26 'use_alsa%': 1, | 18 'use_alsa%': 1, |
27 'conditions': [ | 19 'conditions': [ |
28 ['use_cras==1', { | 20 ['use_cras==1', { |
29 'use_pulseaudio%': 0, | 21 'use_pulseaudio%': 0, |
30 }, { | 22 }, { |
31 'use_pulseaudio%': 1, | 23 'use_pulseaudio%': 1, |
32 }], | 24 }], |
33 ], | 25 ], |
34 }, { | 26 }, { |
35 'use_alsa%': 0, | 27 'use_alsa%': 0, |
36 'use_pulseaudio%': 0, | 28 'use_pulseaudio%': 0, |
37 }], | 29 }], |
38 # low memory buffer is used in non-Android based chromecast build due to h ardware limitation. | 30 # low memory buffer is used in non-Android based chromecast build due to h ardware limitation. |
39 ['chromecast==1 and OS!="android"', { | 31 ['chromecast==1 and OS!="android"', { |
40 'use_low_memory_buffer%': 1, | 32 'use_low_memory_buffer%': 1, |
41 }, { | 33 }, { |
42 'use_low_memory_buffer%': 0, | 34 'use_low_memory_buffer%': 0, |
43 }], | 35 }], |
44 ], | 36 ], |
45 }, | 37 }, |
46 'includes': [ | 38 'includes': [ |
47 'media_cdm.gypi', | 39 'media_cdm.gypi', |
40 'media_variables.gypi', | |
48 ], | 41 ], |
49 'targets': [ | 42 'targets': [ |
50 { | 43 { |
51 # GN version: //media | 44 # GN version: //media |
52 'target_name': 'media', | 45 'target_name': 'media', |
53 'type': '<(component)', | 46 'type': '<(component)', |
54 'dependencies': [ | 47 'dependencies': [ |
55 '../base/base.gyp:base', | 48 '../base/base.gyp:base', |
56 '../base/base.gyp:base_i18n', | 49 '../base/base.gyp:base_i18n', |
57 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic _annotations', | 50 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic _annotations', |
58 '../crypto/crypto.gyp:crypto', | 51 '../crypto/crypto.gyp:crypto', |
59 '../gpu/gpu.gyp:command_buffer_common', | 52 '../gpu/gpu.gyp:command_buffer_common', |
60 '../skia/skia.gyp:skia', | 53 '../skia/skia.gyp:skia', |
61 '../third_party/libyuv/libyuv.gyp:libyuv', | 54 '../third_party/libyuv/libyuv.gyp:libyuv', |
62 '../third_party/opus/opus.gyp:opus', | 55 '../third_party/opus/opus.gyp:opus', |
63 '../ui/events/events.gyp:events_base', | 56 '../ui/events/events.gyp:events_base', |
64 '../ui/gfx/gfx.gyp:gfx', | 57 '../ui/gfx/gfx.gyp:gfx', |
65 '../ui/gfx/gfx.gyp:gfx_geometry', | 58 '../ui/gfx/gfx.gyp:gfx_geometry', |
66 '../url/url.gyp:url_lib', | 59 '../url/url.gyp:url_lib', |
67 'shared_memory_support', | 60 'shared_memory_support', |
68 ], | 61 ], |
62 'export_dependent_settings': [ | |
63 '../third_party/opus/opus.gyp:opus', | |
64 ], | |
69 'defines': [ | 65 'defines': [ |
70 'MEDIA_IMPLEMENTATION', | 66 'MEDIA_IMPLEMENTATION', |
71 ], | 67 ], |
72 'include_dirs': [ | 68 'include_dirs': [ |
73 '..', | 69 '..', |
74 ], | 70 ], |
75 'sources': [ | 71 'sources': [ |
76 'audio/agc_audio_stream.h', | 72 'audio/agc_audio_stream.h', |
77 'audio/alsa/alsa_input.cc', | 73 'audio/alsa/alsa_input.cc', |
78 'audio/alsa/alsa_input.h', | 74 'audio/alsa/alsa_input.h', |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 'base/byte_queue.cc', | 249 'base/byte_queue.cc', |
254 'base/byte_queue.h', | 250 'base/byte_queue.h', |
255 'base/cdm_callback_promise.cc', | 251 'base/cdm_callback_promise.cc', |
256 'base/cdm_callback_promise.h', | 252 'base/cdm_callback_promise.h', |
257 'base/cdm_config.h', | 253 'base/cdm_config.h', |
258 'base/cdm_context.cc', | 254 'base/cdm_context.cc', |
259 'base/cdm_context.h', | 255 'base/cdm_context.h', |
260 'base/cdm_factory.cc', | 256 'base/cdm_factory.cc', |
261 'base/cdm_factory.h', | 257 'base/cdm_factory.h', |
262 'base/cdm_initialized_promise.cc', | 258 'base/cdm_initialized_promise.cc', |
263 'base/cdm_initialized_promise.h', | 259 'base/cdm_initialized_promise.h', |
264 'base/cdm_key_information.cc', | 260 'base/cdm_key_information.cc', |
265 'base/cdm_key_information.h', | 261 'base/cdm_key_information.h', |
266 'base/cdm_promise.cc', | 262 'base/cdm_promise.cc', |
267 'base/cdm_promise.h', | 263 'base/cdm_promise.h', |
268 'base/cdm_promise_adapter.cc', | 264 'base/cdm_promise_adapter.cc', |
269 'base/cdm_promise_adapter.h', | 265 'base/cdm_promise_adapter.h', |
270 'base/channel_mixer.cc', | 266 'base/channel_mixer.cc', |
271 'base/channel_mixer.h', | 267 'base/channel_mixer.h', |
272 'base/channel_mixing_matrix.cc', | 268 'base/channel_mixing_matrix.cc', |
273 'base/channel_mixing_matrix.h', | 269 'base/channel_mixing_matrix.h', |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
697 'base/browser_cdm_factory.h', | 693 'base/browser_cdm_factory.h', |
698 ], | 694 ], |
699 }], | 695 }], |
700 ['OS=="android"', { | 696 ['OS=="android"', { |
701 'dependencies': [ | 697 'dependencies': [ |
702 'media_android_jni_headers', | 698 'media_android_jni_headers', |
703 'media_java', | 699 'media_java', |
704 'player_android', | 700 'player_android', |
705 'video_capture_android_jni_headers', | 701 'video_capture_android_jni_headers', |
706 ], | 702 ], |
707 'sources': [ | |
708 'base/media.cc', | |
709 'base/media.h', | |
710 ], | |
711 'sources!': [ | 703 'sources!': [ |
712 'filters/opus_audio_decoder.cc', | 704 'base/audio_video_metadata_extractor.cc', |
713 'filters/opus_audio_decoder.h', | 705 'base/audio_video_metadata_extractor.h', |
714 'renderers/default_renderer_factory.cc', | 706 'base/media_file_checker.cc', |
715 'renderers/default_renderer_factory.h', | 707 'base/media_file_checker.h', |
708 'filters/ffmpeg_video_decoder.cc', | |
709 'filters/ffmpeg_video_decoder.h', | |
716 ], | 710 ], |
717 'defines': [ | 711 'defines': [ |
718 'DISABLE_USER_INPUT_MONITOR', | 712 'DISABLE_USER_INPUT_MONITOR', |
719 ], | 713 ], |
714 'conditions': [ | |
715 ['media_use_ffmpeg == 1', { | |
716 'defines': [ | |
717 'ENABLE_MEDIA_PIPELINE_ON_ANDROID', | |
718 'DISABLE_FFMPEG_VIDEO_DECODERS', | |
xhwang
2015/07/10 17:27:50
Add a comment why disable FFMPEG video decoders.
watk
2015/07/10 18:51:26
Done.
| |
719 ], | |
720 'direct_dependent_settings': { | |
721 'defines': [ | |
722 'ENABLE_MEDIA_PIPELINE_ON_ANDROID', | |
723 'DISABLE_FFMPEG_VIDEO_DECODERS', | |
724 ], | |
725 }, | |
726 }, { # media_use_ffmpeg == 0 | |
727 'sources!': [ | |
728 'filters/opus_audio_decoder.cc', | |
729 'filters/opus_audio_decoder.h', | |
730 'renderers/default_renderer_factory.cc', | |
731 'renderers/default_renderer_factory.h', | |
732 ], | |
733 }], | |
734 ], | |
720 }], | 735 }], |
721 # For VaapiVideoEncodeAccelerator. | 736 # For VaapiVideoEncodeAccelerator. |
722 ['target_arch != "arm" and chromeos == 1', { | 737 ['target_arch != "arm" and chromeos == 1', { |
723 'sources': [ | 738 'sources': [ |
724 'filters/h264_bitstream_buffer.cc', | 739 'filters/h264_bitstream_buffer.cc', |
725 'filters/h264_bitstream_buffer.h', | 740 'filters/h264_bitstream_buffer.h', |
726 ], | 741 ], |
727 }], | 742 }], |
728 ['use_alsa==1', { | 743 ['use_alsa==1', { |
729 'link_settings': { | 744 'link_settings': { |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1253 'conditions': [ | 1268 'conditions': [ |
1254 ['arm_neon==1', { | 1269 ['arm_neon==1', { |
1255 'defines': [ | 1270 'defines': [ |
1256 'USE_NEON' | 1271 'USE_NEON' |
1257 ], | 1272 ], |
1258 }], | 1273 }], |
1259 ['media_use_ffmpeg==1', { | 1274 ['media_use_ffmpeg==1', { |
1260 'dependencies': [ | 1275 'dependencies': [ |
1261 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', | 1276 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', |
1262 ], | 1277 ], |
1263 }, { # media_use_ffmpeg== 0 | 1278 }, { # media_use_ffmpeg==0 |
1279 'sources!': [ | |
1280 'ffmpeg/ffmpeg_common_unittest.cc', | |
1281 'filters/audio_decoder_unittest.cc', | |
1282 'filters/ffmpeg_aac_bitstream_converter_unittest.cc', | |
1283 'filters/ffmpeg_demuxer_unittest.cc', | |
1284 'filters/ffmpeg_glue_unittest.cc', | |
1285 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', | |
1286 ], | |
1287 }], | |
1288 # Even if FFmpeg is enabled on Android we don't want these. | |
1289 # TODO(watk): Refactor tests that could be made to run on Android. | |
1290 ['media_use_ffmpeg==0 or OS=="android"', { | |
1264 'sources!': [ | 1291 'sources!': [ |
1265 'base/audio_video_metadata_extractor_unittest.cc', | 1292 'base/audio_video_metadata_extractor_unittest.cc', |
1266 'base/container_names_unittest.cc', | 1293 'base/container_names_unittest.cc', |
1267 'base/media_file_checker_unittest.cc', | 1294 'base/media_file_checker_unittest.cc', |
1268 'ffmpeg/ffmpeg_common_unittest.cc', | |
1269 'filters/audio_decoder_unittest.cc', | |
1270 'filters/audio_file_reader_unittest.cc', | 1295 'filters/audio_file_reader_unittest.cc', |
1271 'filters/blocking_url_protocol_unittest.cc', | 1296 'filters/blocking_url_protocol_unittest.cc', |
1272 'filters/ffmpeg_aac_bitstream_converter_unittest.cc', | |
1273 'filters/ffmpeg_demuxer_unittest.cc', | |
1274 'filters/ffmpeg_glue_unittest.cc', | |
1275 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', | |
1276 'filters/ffmpeg_video_decoder_unittest.cc', | 1297 'filters/ffmpeg_video_decoder_unittest.cc', |
1277 'filters/in_memory_url_protocol_unittest.cc', | 1298 'filters/in_memory_url_protocol_unittest.cc', |
1278 'test/pipeline_integration_test.cc', | 1299 'test/pipeline_integration_test.cc', |
1279 'test/pipeline_integration_test_base.cc', | 1300 'test/pipeline_integration_test_base.cc', |
1280 ], | 1301 ], |
1281 }], | 1302 }], |
1282 ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_libra ry" and win_use_allocator_shim==1)', { | 1303 ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_libra ry" and win_use_allocator_shim==1)', { |
1283 'conditions': [ | 1304 'conditions': [ |
1284 ['use_allocator!="none"', { | 1305 ['use_allocator!="none"', { |
1285 'dependencies': [ | 1306 'dependencies': [ |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1985 'dependencies': [ | 2006 'dependencies': [ |
1986 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', | 2007 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
1987 ], | 2008 ], |
1988 }], | 2009 }], |
1989 ], | 2010 ], |
1990 }, | 2011 }, |
1991 ], | 2012 ], |
1992 }], | 2013 }], |
1993 ], | 2014 ], |
1994 } | 2015 } |
OLD | NEW |