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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 'base/browser_cdm_factory.h', | 695 'base/browser_cdm_factory.h', |
700 ], | 696 ], |
701 }], | 697 }], |
702 ['OS=="android"', { | 698 ['OS=="android"', { |
703 'dependencies': [ | 699 'dependencies': [ |
704 'media_android_jni_headers', | 700 'media_android_jni_headers', |
705 'media_java', | 701 'media_java', |
706 'player_android', | 702 'player_android', |
707 'video_capture_android_jni_headers', | 703 'video_capture_android_jni_headers', |
708 ], | 704 ], |
709 'sources': [ | |
710 'base/media.cc', | |
711 'base/media.h', | |
712 ], | |
713 'sources!': [ | 705 'sources!': [ |
714 'filters/opus_audio_decoder.cc', | 706 'base/audio_video_metadata_extractor.cc', |
715 'filters/opus_audio_decoder.h', | 707 'base/audio_video_metadata_extractor.h', |
| 708 'base/media_file_checker.cc', |
| 709 'base/media_file_checker.h', |
| 710 'filters/ffmpeg_video_decoder.cc', |
| 711 'filters/ffmpeg_video_decoder.h', |
716 ], | 712 ], |
717 'defines': [ | 713 'defines': [ |
718 'DISABLE_USER_INPUT_MONITOR', | 714 'DISABLE_USER_INPUT_MONITOR', |
719 ], | 715 ], |
| 716 'conditions': [ |
| 717 ['media_use_ffmpeg == 1', { |
| 718 'defines': [ |
| 719 # On Android, FFmpeg is built without video decoders. We only |
| 720 # support hardware video decoding. |
| 721 'ENABLE_MEDIA_PIPELINE_ON_ANDROID', |
| 722 'DISABLE_FFMPEG_VIDEO_DECODERS', |
| 723 ], |
| 724 'direct_dependent_settings': { |
| 725 'defines': [ |
| 726 'ENABLE_MEDIA_PIPELINE_ON_ANDROID', |
| 727 'DISABLE_FFMPEG_VIDEO_DECODERS', |
| 728 ], |
| 729 }, |
| 730 }, { # media_use_ffmpeg == 0 |
| 731 'sources!': [ |
| 732 'filters/opus_audio_decoder.cc', |
| 733 'filters/opus_audio_decoder.h', |
| 734 ], |
| 735 }], |
| 736 ], |
720 }], | 737 }], |
721 # For VaapiVideoEncodeAccelerator. | 738 # For VaapiVideoEncodeAccelerator. |
722 ['target_arch != "arm" and chromeos == 1', { | 739 ['target_arch != "arm" and chromeos == 1', { |
723 'sources': [ | 740 'sources': [ |
724 'filters/h264_bitstream_buffer.cc', | 741 'filters/h264_bitstream_buffer.cc', |
725 'filters/h264_bitstream_buffer.h', | 742 'filters/h264_bitstream_buffer.h', |
726 ], | 743 ], |
727 }], | 744 }], |
728 ['use_alsa==1', { | 745 ['use_alsa==1', { |
729 'link_settings': { | 746 'link_settings': { |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 'conditions': [ | 1274 'conditions': [ |
1258 ['arm_neon==1', { | 1275 ['arm_neon==1', { |
1259 'defines': [ | 1276 'defines': [ |
1260 'USE_NEON' | 1277 'USE_NEON' |
1261 ], | 1278 ], |
1262 }], | 1279 }], |
1263 ['media_use_ffmpeg==1', { | 1280 ['media_use_ffmpeg==1', { |
1264 'dependencies': [ | 1281 'dependencies': [ |
1265 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', | 1282 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', |
1266 ], | 1283 ], |
1267 }, { # media_use_ffmpeg== 0 | 1284 }, { # media_use_ffmpeg==0 |
| 1285 'sources!': [ |
| 1286 'ffmpeg/ffmpeg_common_unittest.cc', |
| 1287 'filters/audio_decoder_unittest.cc', |
| 1288 'filters/ffmpeg_aac_bitstream_converter_unittest.cc', |
| 1289 'filters/ffmpeg_demuxer_unittest.cc', |
| 1290 'filters/ffmpeg_glue_unittest.cc', |
| 1291 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', |
| 1292 ], |
| 1293 }], |
| 1294 # Even if FFmpeg is enabled on Android we don't want these. |
| 1295 # TODO(watk): Refactor tests that could be made to run on Android. |
| 1296 ['media_use_ffmpeg==0 or OS=="android"', { |
1268 'sources!': [ | 1297 'sources!': [ |
1269 'base/audio_video_metadata_extractor_unittest.cc', | 1298 'base/audio_video_metadata_extractor_unittest.cc', |
1270 'base/container_names_unittest.cc', | 1299 'base/container_names_unittest.cc', |
1271 'base/media_file_checker_unittest.cc', | 1300 'base/media_file_checker_unittest.cc', |
1272 'ffmpeg/ffmpeg_common_unittest.cc', | |
1273 'filters/audio_decoder_unittest.cc', | |
1274 'filters/audio_file_reader_unittest.cc', | 1301 'filters/audio_file_reader_unittest.cc', |
1275 'filters/blocking_url_protocol_unittest.cc', | 1302 'filters/blocking_url_protocol_unittest.cc', |
1276 'filters/ffmpeg_aac_bitstream_converter_unittest.cc', | |
1277 'filters/ffmpeg_demuxer_unittest.cc', | |
1278 'filters/ffmpeg_glue_unittest.cc', | |
1279 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', | |
1280 'filters/ffmpeg_video_decoder_unittest.cc', | 1303 'filters/ffmpeg_video_decoder_unittest.cc', |
1281 'filters/in_memory_url_protocol_unittest.cc', | 1304 'filters/in_memory_url_protocol_unittest.cc', |
1282 'test/pipeline_integration_test.cc', | 1305 'test/pipeline_integration_test.cc', |
1283 'test/pipeline_integration_test_base.cc', | 1306 'test/pipeline_integration_test_base.cc', |
1284 ], | 1307 ], |
1285 }], | 1308 }], |
1286 ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_libra
ry" and win_use_allocator_shim==1)', { | 1309 ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_libra
ry" and win_use_allocator_shim==1)', { |
1287 'conditions': [ | 1310 'conditions': [ |
1288 ['use_allocator!="none"', { | 1311 ['use_allocator!="none"', { |
1289 'dependencies': [ | 1312 'dependencies': [ |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 'dependencies': [ | 2014 'dependencies': [ |
1992 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', | 2015 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
1993 ], | 2016 ], |
1994 }], | 2017 }], |
1995 ], | 2018 ], |
1996 }, | 2019 }, |
1997 ], | 2020 ], |
1998 }], | 2021 }], |
1999 ], | 2022 ], |
2000 } | 2023 } |
OLD | NEW |