Fix initial focus finding, ignore div nodes, and resolve aria-label name calculation.
[chromium-blink-merge.git] / media / media.gyp
blob530643dffa27b36e66b2c731f800b45221d7c557
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
3 # found in the LICENSE file.
6   'variables': {
7     'chromium_code': 1,
8     # Override to dynamically link the cras (ChromeOS audio) library.
9     'use_cras%': 0,
10     # Option e.g. for Linux distributions to link pulseaudio directly
11     # (DT_NEEDED) instead of using dlopen. This helps with automated
12     # detection of ABI mismatches and prevents silent errors.
13     'linux_link_pulseaudio%': 0,
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.
24       ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chromecast==1 and target_arch!="arm"))', {
25         # ALSA is always needed for Web MIDI even if the cras is enabled.
26         'use_alsa%': 1,
27         'conditions': [
28           ['use_cras==1', {
29             'use_pulseaudio%': 0,
30           }, {
31             'use_pulseaudio%': 1,
32           }],
33         ],
34       }, {
35         'use_alsa%': 0,
36         'use_pulseaudio%': 0,
37       }],
38       # low memory buffer is used in non-Android based chromecast build due to hardware limitation.
39       ['chromecast==1 and OS!="android"', {
40         'use_low_memory_buffer%': 1,
41       }, {
42         'use_low_memory_buffer%': 0,
43       }],
44     ],
45   },
46   'includes': [
47     'media_cdm.gypi',
48   ],
49   'targets': [
50     {
51       # GN version: //media
52       'target_name': 'media',
53       'type': '<(component)',
54       'dependencies': [
55         '../base/base.gyp:base',
56         '../base/base.gyp:base_i18n',
57         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
58         '../crypto/crypto.gyp:crypto',
59         '../gpu/gpu.gyp:command_buffer_common',
60         '../skia/skia.gyp:skia',
61         '../third_party/libyuv/libyuv.gyp:libyuv',
62         '../third_party/opus/opus.gyp:opus',
63         '../ui/events/events.gyp:events_base',
64         '../ui/gfx/gfx.gyp:gfx',
65         '../ui/gfx/gfx.gyp:gfx_geometry',
66         '../url/url.gyp:url_lib',
67         'shared_memory_support',
68       ],
69       'defines': [
70         'MEDIA_IMPLEMENTATION',
71       ],
72       'include_dirs': [
73         '..',
74       ],
75       'sources': [
76         'audio/agc_audio_stream.h',
77         'audio/alsa/alsa_input.cc',
78         'audio/alsa/alsa_input.h',
79         'audio/alsa/alsa_output.cc',
80         'audio/alsa/alsa_output.h',
81         'audio/alsa/alsa_util.cc',
82         'audio/alsa/alsa_util.h',
83         'audio/alsa/alsa_wrapper.cc',
84         'audio/alsa/alsa_wrapper.h',
85         'audio/alsa/audio_manager_alsa.cc',
86         'audio/alsa/audio_manager_alsa.h',
87         'audio/android/audio_manager_android.cc',
88         'audio/android/audio_manager_android.h',
89         'audio/android/audio_record_input.cc',
90         'audio/android/audio_record_input.h',
91         'audio/android/opensles_input.cc',
92         'audio/android/opensles_input.h',
93         'audio/android/opensles_output.cc',
94         'audio/android/opensles_output.h',
95         'audio/android/opensles_wrapper.cc',
96         'audio/audio_device_name.cc',
97         'audio/audio_device_name.h',
98         'audio/audio_device_thread.cc',
99         'audio/audio_device_thread.h',
100         'audio/audio_input_controller.cc',
101         'audio/audio_input_controller.h',
102         'audio/audio_input_device.cc',
103         'audio/audio_input_device.h',
104         'audio/audio_input_ipc.cc',
105         'audio/audio_input_ipc.h',
106         'audio/audio_io.h',
107         'audio/audio_manager.cc',
108         'audio/audio_manager.h',
109         'audio/audio_manager_base.cc',
110         'audio/audio_manager_base.h',
111         'audio/audio_output_controller.cc',
112         'audio/audio_output_controller.h',
113         'audio/audio_output_device.cc',
114         'audio/audio_output_device.h',
115         'audio/audio_output_dispatcher.cc',
116         'audio/audio_output_dispatcher.h',
117         'audio/audio_output_dispatcher_impl.cc',
118         'audio/audio_output_dispatcher_impl.h',
119         'audio/audio_output_ipc.cc',
120         'audio/audio_output_ipc.h',
121         'audio/audio_output_proxy.cc',
122         'audio/audio_output_proxy.h',
123         'audio/audio_output_resampler.cc',
124         'audio/audio_output_resampler.h',
125         'audio/audio_output_stream_sink.cc',
126         'audio/audio_output_stream_sink.h',
127         'audio/audio_power_monitor.cc',
128         'audio/audio_power_monitor.h',
129         'audio/audio_source_diverter.h',
130         'audio/clockless_audio_sink.cc',
131         'audio/clockless_audio_sink.h',
132         'audio/cras/audio_manager_cras.cc',
133         'audio/cras/audio_manager_cras.h',
134         'audio/cras/cras_input.cc',
135         'audio/cras/cras_input.h',
136         'audio/cras/cras_unified.cc',
137         'audio/cras/cras_unified.h',
138         'audio/fake_audio_input_stream.cc',
139         'audio/fake_audio_input_stream.h',
140         'audio/fake_audio_log_factory.cc',
141         'audio/fake_audio_log_factory.h',
142         'audio/fake_audio_manager.cc',
143         'audio/fake_audio_manager.h',
144         'audio/fake_audio_output_stream.cc',
145         'audio/fake_audio_output_stream.h',
146         'audio/fake_audio_worker.cc',
147         'audio/fake_audio_worker.h',
148         'audio/linux/audio_manager_linux.cc',
149         'audio/mac/audio_auhal_mac.cc',
150         'audio/mac/audio_auhal_mac.h',
151         'audio/mac/audio_device_listener_mac.cc',
152         'audio/mac/audio_device_listener_mac.h',
153         'audio/mac/audio_input_mac.cc',
154         'audio/mac/audio_input_mac.h',
155         'audio/mac/audio_low_latency_input_mac.cc',
156         'audio/mac/audio_low_latency_input_mac.h',
157         'audio/mac/audio_manager_mac.cc',
158         'audio/mac/audio_manager_mac.h',
159         'audio/null_audio_sink.cc',
160         'audio/null_audio_sink.h',
161         'audio/openbsd/audio_manager_openbsd.cc',
162         'audio/openbsd/audio_manager_openbsd.h',
163         'audio/pulse/audio_manager_pulse.cc',
164         'audio/pulse/audio_manager_pulse.h',
165         'audio/pulse/pulse_input.cc',
166         'audio/pulse/pulse_input.h',
167         'audio/pulse/pulse_output.cc',
168         'audio/pulse/pulse_output.h',
169         'audio/pulse/pulse_util.cc',
170         'audio/pulse/pulse_util.h',
171         'audio/sample_rates.cc',
172         'audio/sample_rates.h',
173         'audio/scoped_task_runner_observer.cc',
174         'audio/scoped_task_runner_observer.h',
175         'audio/simple_sources.cc',
176         'audio/simple_sources.h',
177         'audio/sounds/audio_stream_handler.cc',
178         'audio/sounds/audio_stream_handler.h',
179         'audio/sounds/sounds_manager.cc',
180         'audio/sounds/sounds_manager.h',
181         'audio/sounds/wav_audio_handler.cc',
182         'audio/sounds/wav_audio_handler.h',
183         'audio/virtual_audio_input_stream.cc',
184         'audio/virtual_audio_input_stream.h',
185         'audio/virtual_audio_output_stream.cc',
186         'audio/virtual_audio_output_stream.h',
187         'audio/win/audio_device_listener_win.cc',
188         'audio/win/audio_device_listener_win.h',
189         'audio/win/audio_low_latency_input_win.cc',
190         'audio/win/audio_low_latency_input_win.h',
191         'audio/win/audio_low_latency_output_win.cc',
192         'audio/win/audio_low_latency_output_win.h',
193         'audio/win/audio_manager_win.cc',
194         'audio/win/audio_manager_win.h',
195         'audio/win/avrt_wrapper_win.cc',
196         'audio/win/avrt_wrapper_win.h',
197         'audio/win/core_audio_util_win.cc',
198         'audio/win/core_audio_util_win.h',
199         'audio/win/device_enumeration_win.cc',
200         'audio/win/device_enumeration_win.h',
201         'audio/win/wavein_input_win.cc',
202         'audio/win/wavein_input_win.h',
203         'audio/win/waveout_output_win.cc',
204         'audio/win/waveout_output_win.h',
205         'base/audio_block_fifo.cc',
206         'base/audio_block_fifo.h',
207         'base/audio_buffer.cc',
208         'base/audio_buffer.h',
209         'base/audio_buffer_converter.cc',
210         'base/audio_buffer_converter.h',
211         'base/audio_buffer_queue.cc',
212         'base/audio_buffer_queue.h',
213         'base/audio_capturer_source.h',
214         'base/audio_converter.cc',
215         'base/audio_converter.h',
216         'base/audio_decoder.cc',
217         'base/audio_decoder.h',
218         'base/audio_decoder_config.cc',
219         'base/audio_decoder_config.h',
220         'base/audio_discard_helper.cc',
221         'base/audio_discard_helper.h',
222         'base/audio_fifo.cc',
223         'base/audio_fifo.h',
224         'base/audio_hardware_config.cc',
225         'base/audio_hardware_config.h',
226         'base/audio_hash.cc',
227         'base/audio_hash.h',
228         'base/audio_pull_fifo.cc',
229         'base/audio_pull_fifo.h',
230         'base/audio_renderer.cc',
231         'base/audio_renderer.h',
232         'base/audio_renderer_mixer.cc',
233         'base/audio_renderer_mixer.h',
234         'base/audio_renderer_mixer_input.cc',
235         'base/audio_renderer_mixer_input.h',
236         'base/audio_renderer_sink.h',
237         'base/audio_shifter.cc',
238         'base/audio_shifter.h',
239         'base/audio_splicer.cc',
240         'base/audio_splicer.h',
241         'base/audio_timestamp_helper.cc',
242         'base/audio_timestamp_helper.h',
243         'base/audio_video_metadata_extractor.cc',
244         'base/audio_video_metadata_extractor.h',
245         'base/bind_to_current_loop.h',
246         'base/bit_reader.cc',
247         'base/bit_reader.h',
248         'base/bit_reader_core.cc',
249         'base/bit_reader_core.h',
250         'base/bitstream_buffer.h',
251         'base/buffering_state.h',
252         'base/buffers.h',
253         'base/byte_queue.cc',
254         'base/byte_queue.h',
255         'base/cdm_callback_promise.cc',
256         'base/cdm_callback_promise.h',
257         'base/cdm_config.h',
258         'base/cdm_context.cc',
259         'base/cdm_context.h',
260         'base/cdm_factory.cc',
261         'base/cdm_factory.h',
262         'base/cdm_initialized_promise.cc',
263         'base/cdm_initialized_promise.h',        
264         'base/cdm_key_information.cc',
265         'base/cdm_key_information.h',
266         'base/cdm_promise.cc',
267         'base/cdm_promise.h',
268         'base/cdm_promise_adapter.cc',
269         'base/cdm_promise_adapter.h',
270         'base/channel_mixer.cc',
271         'base/channel_mixer.h',
272         'base/channel_mixing_matrix.cc',
273         'base/channel_mixing_matrix.h',
274         'base/container_names.cc',
275         'base/container_names.h',
276         'base/data_buffer.cc',
277         'base/data_buffer.h',
278         'base/data_source.cc',
279         'base/data_source.h',
280         'base/decoder_buffer.cc',
281         'base/decoder_buffer.h',
282         'base/decoder_buffer_queue.cc',
283         'base/decoder_buffer_queue.h',
284         'base/decrypt_config.cc',
285         'base/decrypt_config.h',
286         'base/decryptor.cc',
287         'base/decryptor.h',
288         'base/demuxer.cc',
289         'base/demuxer.h',
290         'base/demuxer_stream.cc',
291         'base/demuxer_stream.h',
292         'base/demuxer_stream_provider.cc',
293         'base/demuxer_stream_provider.h',
294         'base/djb2.cc',
295         'base/djb2.h',
296         'base/eme_constants.h',
297         'base/key_system_info.cc',
298         'base/key_system_info.h',
299         'base/key_systems.cc',
300         'base/key_systems.h',
301         'base/key_systems_support_uma.cc',
302         'base/key_systems_support_uma.h',
303         'base/keyboard_event_counter.cc',
304         'base/keyboard_event_counter.h',
305         'base/mac/avfoundation_glue.h',
306         'base/mac/avfoundation_glue.mm',
307         'base/mac/coremedia_glue.h',
308         'base/mac/coremedia_glue.mm',
309         'base/mac/corevideo_glue.h',
310         'base/mac/video_frame_mac.cc',
311         'base/mac/video_frame_mac.h',
312         'base/mac/videotoolbox_glue.h',
313         'base/mac/videotoolbox_glue.mm',
314         'base/media.cc',
315         'base/media.h',
316         'base/media_client.cc',
317         'base/media_client.h',
318         'base/media_file_checker.cc',
319         'base/media_file_checker.h',
320         'base/media_keys.cc',
321         'base/media_keys.h',
322         'base/media_log.cc',
323         'base/media_log.h',
324         'base/media_log_event.h',
325         'base/media_permission.cc',
326         'base/media_permission.h',
327         'base/media_switches.cc',
328         'base/media_switches.h',
329         'base/mime_util.cc',
330         'base/mime_util.h',
331         'base/moving_average.cc',
332         'base/moving_average.h',
333         'base/multi_channel_resampler.cc',
334         'base/multi_channel_resampler.h',
335         'base/null_video_sink.cc',
336         'base/null_video_sink.h',
337         'base/pipeline.cc',
338         'base/pipeline.h',
339         'base/pipeline_status.h',
340         'base/player_tracker.cc',
341         'base/player_tracker.h',
342         'base/ranges.cc',
343         'base/ranges.h',
344         'base/renderer.cc',
345         'base/renderer.h',
346         'base/renderer_factory.cc',
347         'base/renderer_factory.h',
348         'base/sample_format.cc',
349         'base/sample_format.h',
350         'base/seekable_buffer.cc',
351         'base/seekable_buffer.h',
352         'base/serial_runner.cc',
353         'base/serial_runner.h',
354         'base/simd/convert_rgb_to_yuv.h',
355         'base/simd/convert_rgb_to_yuv_c.cc',
356         'base/simd/convert_yuv_to_rgb.h',
357         'base/simd/convert_yuv_to_rgb_c.cc',
358         'base/simd/filter_yuv.h',
359         'base/simd/filter_yuv_c.cc',
360         'base/sinc_resampler.cc',
361         'base/sinc_resampler.h',
362         'base/stream_parser.cc',
363         'base/stream_parser.h',
364         'base/stream_parser_buffer.cc',
365         'base/stream_parser_buffer.h',
366         'base/text_cue.cc',
367         'base/text_cue.h',
368         'base/text_ranges.cc',
369         'base/text_ranges.h',
370         'base/text_renderer.cc',
371         'base/text_renderer.h',
372         'base/text_track.h',
373         'base/text_track_config.cc',
374         'base/text_track_config.h',
375         'base/time_delta_interpolator.cc',
376         'base/time_delta_interpolator.h',
377         'base/time_source.h',
378         'base/user_input_monitor.cc',
379         'base/user_input_monitor.h',
380         'base/user_input_monitor_linux.cc',
381         'base/user_input_monitor_mac.cc',
382         'base/user_input_monitor_win.cc',
383         'base/video_capture_types.cc',
384         'base/video_capture_types.h',
385         'base/video_capturer_source.cc',
386         'base/video_capturer_source.h',
387         'base/video_decoder.cc',
388         'base/video_decoder.h',
389         'base/video_decoder_config.cc',
390         'base/video_decoder_config.h',
391         'base/video_frame.cc',
392         'base/video_frame.h',
393         'base/video_frame_metadata.cc',
394         'base/video_frame_metadata.h',
395         'base/video_frame_pool.cc',
396         'base/video_frame_pool.h',
397         'base/video_renderer.cc',
398         'base/video_renderer.h',
399         'base/video_rotation.h',
400         'base/video_types.cc',
401         'base/video_types.h',
402         'base/video_util.cc',
403         'base/video_util.h',
404         'base/wall_clock_time_source.cc',
405         'base/wall_clock_time_source.h',
406         'base/win/mf_initializer.cc',
407         'base/win/mf_initializer.h',
408         'base/yuv_convert.cc',
409         'base/yuv_convert.h',
410         'blink/skcanvas_video_renderer.cc',
411         'blink/skcanvas_video_renderer.h',
412         'capture/animated_content_sampler.cc',
413         'capture/animated_content_sampler.h',
414         'capture/capture_resolution_chooser.cc',
415         'capture/capture_resolution_chooser.h',
416         'capture/feedback_signal_accumulator.cc',
417         'capture/feedback_signal_accumulator.h',
418         'capture/screen_capture_device_core.cc',
419         'capture/screen_capture_device_core.h',
420         'capture/thread_safe_capture_oracle.cc',
421         'capture/thread_safe_capture_oracle.h',
422         'capture/smooth_event_sampler.cc',
423         'capture/smooth_event_sampler.h',
424         'capture/video_capture_oracle.cc',
425         'capture/video_capture_oracle.h',
426         'cdm/aes_decryptor.cc',
427         'cdm/aes_decryptor.h',
428         'cdm/default_cdm_factory.cc',
429         'cdm/default_cdm_factory.h',
430         'cdm/json_web_key.cc',
431         'cdm/json_web_key.h',
432         'cdm/key_system_names.cc',
433         'cdm/key_system_names.h',
434         'cdm/player_tracker_impl.cc',
435         'cdm/player_tracker_impl.h',
436         'cdm/proxy_decryptor.cc',
437         'cdm/proxy_decryptor.h',
438         'ffmpeg/ffmpeg_common.cc',
439         'ffmpeg/ffmpeg_common.h',
440         'ffmpeg/ffmpeg_deleters.h',
441         'filters/audio_clock.cc',
442         'filters/audio_clock.h',
443         'filters/audio_file_reader.cc',
444         'filters/audio_file_reader.h',
445         'filters/audio_renderer_algorithm.cc',
446         'filters/audio_renderer_algorithm.h',
447         'filters/blocking_url_protocol.cc',
448         'filters/blocking_url_protocol.h',
449         'filters/chunk_demuxer.cc',
450         'filters/chunk_demuxer.h',
451         'filters/context_3d.h',
452         'filters/decoder_selector.cc',
453         'filters/decoder_selector.h',
454         'filters/decoder_stream.cc',
455         'filters/decoder_stream.h',
456         'filters/decoder_stream_traits.cc',
457         'filters/decoder_stream_traits.h',
458         'filters/decrypting_audio_decoder.cc',
459         'filters/decrypting_audio_decoder.h',
460         'filters/decrypting_demuxer_stream.cc',
461         'filters/decrypting_demuxer_stream.h',
462         'filters/decrypting_video_decoder.cc',
463         'filters/decrypting_video_decoder.h',
464         'filters/default_media_permission.cc',
465         'filters/default_media_permission.h',
466         'filters/ffmpeg_audio_decoder.cc',
467         'filters/ffmpeg_audio_decoder.h',
468         'filters/ffmpeg_bitstream_converter.h',
469         'filters/ffmpeg_demuxer.cc',
470         'filters/ffmpeg_demuxer.h',
471         'filters/ffmpeg_glue.cc',
472         'filters/ffmpeg_glue.h',
473         'filters/ffmpeg_video_decoder.cc',
474         'filters/ffmpeg_video_decoder.h',
475         'filters/file_data_source.cc',
476         'filters/file_data_source.h',
477         'filters/frame_processor.cc',
478         'filters/frame_processor.h',
479         'filters/gpu_video_decoder.cc',
480         'filters/gpu_video_decoder.h',
481         'filters/h264_bit_reader.cc',
482         'filters/h264_bit_reader.h',
483         'filters/h264_parser.cc',
484         'filters/h264_parser.h',
485         'filters/in_memory_url_protocol.cc',
486         'filters/in_memory_url_protocol.h',
487         'filters/jpeg_parser.cc',
488         'filters/jpeg_parser.h',
489         'filters/opus_audio_decoder.cc',
490         'filters/opus_audio_decoder.h',
491         'filters/source_buffer_range.cc',
492         'filters/source_buffer_range.h',
493         'filters/source_buffer_stream.cc',
494         'filters/source_buffer_stream.h',
495         'filters/stream_parser_factory.cc',
496         'filters/stream_parser_factory.h',
497         'filters/video_cadence_estimator.cc',
498         'filters/video_cadence_estimator.h',
499         'filters/video_renderer_algorithm.cc',
500         'filters/video_renderer_algorithm.h',
501         'filters/vp8_bool_decoder.cc',
502         'filters/vp8_bool_decoder.h',
503         'filters/vp8_parser.cc',
504         'filters/vp8_parser.h',
505         'filters/vpx_video_decoder.cc',
506         'filters/vpx_video_decoder.h',
507         'filters/webvtt_util.h',
508         'filters/wsola_internals.cc',
509         'filters/wsola_internals.h',
510         'formats/common/offset_byte_queue.cc',
511         'formats/common/offset_byte_queue.h',
512         'formats/webm/webm_audio_client.cc',
513         'formats/webm/webm_audio_client.h',
514         'formats/webm/webm_cluster_parser.cc',
515         'formats/webm/webm_cluster_parser.h',
516         'formats/webm/webm_constants.cc',
517         'formats/webm/webm_constants.h',
518         'formats/webm/webm_content_encodings.cc',
519         'formats/webm/webm_content_encodings.h',
520         'formats/webm/webm_content_encodings_client.cc',
521         'formats/webm/webm_content_encodings_client.h',
522         'formats/webm/webm_crypto_helpers.cc',
523         'formats/webm/webm_crypto_helpers.h',
524         'formats/webm/webm_info_parser.cc',
525         'formats/webm/webm_info_parser.h',
526         'formats/webm/webm_parser.cc',
527         'formats/webm/webm_parser.h',
528         'formats/webm/webm_stream_parser.cc',
529         'formats/webm/webm_stream_parser.h',
530         'formats/webm/webm_tracks_parser.cc',
531         'formats/webm/webm_tracks_parser.h',
532         'formats/webm/webm_video_client.cc',
533         'formats/webm/webm_video_client.h',
534         'formats/webm/webm_webvtt_parser.cc',
535         'ozone/media_ozone_platform.cc',
536         'ozone/media_ozone_platform.h',
537         'renderers/audio_renderer_impl.cc',
538         'renderers/audio_renderer_impl.h',
539         'renderers/default_renderer_factory.cc',
540         'renderers/default_renderer_factory.h',
541         'renderers/gpu_video_accelerator_factories.h',
542         'renderers/renderer_impl.cc',
543         'renderers/renderer_impl.h',
544         'renderers/video_renderer_impl.cc',
545         'renderers/video_renderer_impl.h',
546         'video/capture/android/video_capture_device_android.cc',
547         'video/capture/android/video_capture_device_android.h',
548         'video/capture/android/video_capture_device_factory_android.cc',
549         'video/capture/android/video_capture_device_factory_android.h',
550         'video/capture/fake_video_capture_device.cc',
551         'video/capture/fake_video_capture_device.h',
552         'video/capture/fake_video_capture_device_factory.cc',
553         'video/capture/fake_video_capture_device_factory.h',
554         'video/capture/file_video_capture_device.cc',
555         'video/capture/file_video_capture_device.h',
556         'video/capture/file_video_capture_device_factory.cc',
557         'video/capture/file_video_capture_device_factory.h',
558         'video/capture/linux/v4l2_capture_delegate.cc',
559         'video/capture/linux/v4l2_capture_delegate.h',
560         'video/capture/linux/v4l2_capture_delegate_multi_plane.cc',
561         'video/capture/linux/v4l2_capture_delegate_multi_plane.h',
562         'video/capture/linux/v4l2_capture_delegate_single_plane.cc',
563         'video/capture/linux/v4l2_capture_delegate_single_plane.h',
564         'video/capture/linux/video_capture_device_chromeos.cc',
565         'video/capture/linux/video_capture_device_chromeos.h',
566         'video/capture/linux/video_capture_device_factory_linux.cc',
567         'video/capture/linux/video_capture_device_factory_linux.h',
568         'video/capture/linux/video_capture_device_linux.cc',
569         'video/capture/linux/video_capture_device_linux.h',
570         'video/capture/mac/platform_video_capturing_mac.h',
571         'video/capture/mac/video_capture_device_avfoundation_mac.h',
572         'video/capture/mac/video_capture_device_avfoundation_mac.mm',
573         'video/capture/mac/video_capture_device_decklink_mac.h',
574         'video/capture/mac/video_capture_device_decklink_mac.mm',
575         'video/capture/mac/video_capture_device_factory_mac.h',
576         'video/capture/mac/video_capture_device_factory_mac.mm',
577         'video/capture/mac/video_capture_device_mac.h',
578         'video/capture/mac/video_capture_device_mac.mm',
579         'video/capture/mac/video_capture_device_qtkit_mac.h',
580         'video/capture/mac/video_capture_device_qtkit_mac.mm',
581         'video/capture/video_capture_device.cc',
582         'video/capture/video_capture_device.h',
583         'video/capture/video_capture_device_factory.cc',
584         'video/capture/video_capture_device_factory.h',
585         'video/capture/video_capture_device_info.cc',
586         'video/capture/video_capture_device_info.h',
587         'video/capture/win/capability_list_win.cc',
588         'video/capture/win/capability_list_win.h',
589         'video/capture/win/filter_base_win.cc',
590         'video/capture/win/filter_base_win.h',
591         'video/capture/win/pin_base_win.cc',
592         'video/capture/win/pin_base_win.h',
593         'video/capture/win/sink_filter_observer_win.h',
594         'video/capture/win/sink_filter_win.cc',
595         'video/capture/win/sink_filter_win.h',
596         'video/capture/win/sink_input_pin_win.cc',
597         'video/capture/win/sink_input_pin_win.h',
598         'video/capture/win/video_capture_device_factory_win.cc',
599         'video/capture/win/video_capture_device_factory_win.h',
600         'video/capture/win/video_capture_device_mf_win.cc',
601         'video/capture/win/video_capture_device_mf_win.h',
602         'video/capture/win/video_capture_device_win.cc',
603         'video/capture/win/video_capture_device_win.h',
604         'video/fake_video_encode_accelerator.cc',
605         'video/fake_video_encode_accelerator.h',
606         'video/gpu_memory_buffer_video_frame_pool.cc',
607         'video/gpu_memory_buffer_video_frame_pool.h',
608         'video/h264_poc.cc',
609         'video/h264_poc.h',
610         'video/jpeg_decode_accelerator.cc',
611         'video/jpeg_decode_accelerator.h',
612         'video/picture.cc',
613         'video/picture.h',
614         'video/video_decode_accelerator.cc',
615         'video/video_decode_accelerator.h',
616         'video/video_encode_accelerator.cc',
617         'video/video_encode_accelerator.h',
618         'formats/webm/webm_webvtt_parser.h'
619       ],
620       'direct_dependent_settings': {
621         'include_dirs': [
622           '..',
623         ],
624       },
625       'conditions': [
626         ['arm_neon==1', {
627           'defines': [
628             'USE_NEON'
629           ],
630         }],
631         ['media_use_ffmpeg==1', {
632           'dependencies': [
633             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
634           ],
635         }, {  # media_use_ffmpeg==0
636           # Exclude the sources that depend on ffmpeg.
637           'sources!': [
638             'base/audio_video_metadata_extractor.cc',
639             'base/audio_video_metadata_extractor.h',
640             'base/container_names.cc',
641             'base/container_names.h',
642             'base/media_file_checker.cc',
643             'base/media_file_checker.h',
644             'ffmpeg/ffmpeg_common.cc',
645             'ffmpeg/ffmpeg_common.h',
646             'filters/audio_file_reader.cc',
647             'filters/audio_file_reader.h',
648             'filters/blocking_url_protocol.cc',
649             'filters/blocking_url_protocol.h',
650             'filters/ffmpeg_aac_bitstream_converter.cc',
651             'filters/ffmpeg_aac_bitstream_converter.h',
652             'filters/ffmpeg_audio_decoder.cc',
653             'filters/ffmpeg_audio_decoder.h',
654             'filters/ffmpeg_bitstream_converter.h',
655             'filters/ffmpeg_demuxer.cc',
656             'filters/ffmpeg_demuxer.h',
657             'filters/ffmpeg_glue.cc',
658             'filters/ffmpeg_glue.h',
659             'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
660             'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
661             'filters/ffmpeg_video_decoder.cc',
662             'filters/ffmpeg_video_decoder.h',
663             'filters/in_memory_url_protocol.cc',
664             'filters/in_memory_url_protocol.h',
665           ],
666           'defines': [
667             'MEDIA_DISABLE_FFMPEG',
668           ],
669           'direct_dependent_settings': {
670             'defines': [
671               'MEDIA_DISABLE_FFMPEG',
672             ],
673           },
674         }],
675         ['media_use_libvpx==1', {
676           'dependencies': [
677             '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
678           ],
679         }, {  # media_use_libvpx==0
680           'defines': [
681             'MEDIA_DISABLE_LIBVPX',
682           ],
683           'direct_dependent_settings': {
684             'defines': [
685               'MEDIA_DISABLE_LIBVPX',
686             ],
687           },
688           # Exclude the sources that depend on libvpx.
689           'sources!': [
690             'filters/vpx_video_decoder.cc',
691             'filters/vpx_video_decoder.h',
692           ],
693         }],
694         ['enable_browser_cdms==1', {
695           'sources': [
696             'base/browser_cdm.cc',
697             'base/browser_cdm.h',
698             'base/browser_cdm_factory.cc',
699             'base/browser_cdm_factory.h',
700           ],
701         }],
702         ['OS=="android"', {
703           'dependencies': [
704             'media_android_jni_headers',
705             'media_java',
706             'player_android',
707             'video_capture_android_jni_headers',
708           ],
709           'sources': [
710             'base/media.cc',
711             'base/media.h',
712           ],
713           'sources!': [
714             'filters/opus_audio_decoder.cc',
715             'filters/opus_audio_decoder.h',
716           ],
717           'defines': [
718             'DISABLE_USER_INPUT_MONITOR',
719           ],
720         }],
721         # For VaapiVideoEncodeAccelerator.
722         ['target_arch != "arm" and chromeos == 1', {
723           'sources': [
724             'filters/h264_bitstream_buffer.cc',
725             'filters/h264_bitstream_buffer.h',
726           ],
727         }],
728         ['use_alsa==1', {
729           'link_settings': {
730             'libraries': [
731               '-lasound',
732             ],
733           },
734           'defines': [
735             'USE_ALSA',
736           ],
737         }, { # use_alsa==0
738           'sources/': [
739             ['exclude', '(^|/)alsa/'],
740             ['exclude', '_alsa\\.(h|cc)$'],
741           ],
742         }],
743         ['OS!="openbsd"', {
744           'sources!': [
745             'audio/openbsd/audio_manager_openbsd.cc',
746             'audio/openbsd/audio_manager_openbsd.h',
747           ],
748         }, {  # else: openbsd==1
749           'sources!': [
750             'video/capture/linux/v4l2_capture_delegate_multi_plane.cc',
751             'video/capture/linux/v4l2_capture_delegate_multi_plane.h',
752           ],
753         }],
754         ['OS=="linux"', {
755           'conditions': [
756             ['use_x11==1', {
757               'dependencies': [
758                 '../build/linux/system.gyp:x11',
759                 '../build/linux/system.gyp:xdamage',
760                 '../build/linux/system.gyp:xext',
761                 '../build/linux/system.gyp:xfixes',
762                 '../build/linux/system.gyp:xtst',
763                 '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
764               ],
765             }, {  # else: use_x11==0
766               'sources!': [
767                 'base/user_input_monitor_linux.cc',
768               ],
769               'defines': [
770                 'DISABLE_USER_INPUT_MONITOR',
771               ],
772             }],
773             ['use_cras==1', {
774               'cflags': [
775                 '<!@(<(pkg-config) --cflags libcras)',
776               ],
777               'link_settings': {
778                 'libraries': [
779                   '<!@(<(pkg-config) --libs libcras)',
780                 ],
781               },
782               'defines': [
783                 'USE_CRAS',
784               ],
785             }, {  # else: use_cras==0
786               'sources!': [
787                 'audio/cras/audio_manager_cras.cc',
788                 'audio/cras/audio_manager_cras.h',
789                 'audio/cras/cras_input.cc',
790                 'audio/cras/cras_input.h',
791                 'audio/cras/cras_unified.cc',
792                 'audio/cras/cras_unified.h',
793               ],
794             }],
795           ],
796         }],
797         ['use_ozone==1', {
798           'variables': {
799             'platform_list_txt_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.txt',
800             'constructor_list_cc_file': '<(INTERMEDIATE_DIR)/media/ozone/constructor_list.cc',
801           },
802           'include_dirs': [
803               # Used for the generated listing header (ui/ozone/platform_list.h)
804               '<(SHARED_INTERMEDIATE_DIR)',
805           ],
806           'sources': [
807             '<(constructor_list_cc_file)',
808           ],
809           'dependencies': [
810             '../ui/ozone/ozone.gyp:ozone',
811           ],
812           'actions': [
813             {
814               # Ozone platform objects are auto-generated using similar
815               # patterns for naming and classes constructors. Here we build the
816               # object MediaOzonePlatform.
817               'action_name': 'generate_constructor_list',
818               'variables': {
819                 'generator_path': '../ui/ozone/generate_constructor_list.py',
820               },
821               'inputs': [
822                 '<(generator_path)',
823                 '<(platform_list_txt_file)',
824               ],
825               'outputs': [
826                 '<(constructor_list_cc_file)',
827               ],
828               'action': [
829                 'python',
830                 '<(generator_path)',
831                 '--platform_list=<(platform_list_txt_file)',
832                 '--output_cc=<(constructor_list_cc_file)',
833                 '--namespace=media',
834                 '--typename=MediaOzonePlatform',
835                 '--include="media/ozone/media_ozone_platform.h"'
836               ],
837             },
838           ]
839         }, {
840           'sources!': [
841             'ozone/media_ozone_platform.cc',
842             'ozone/media_ozone_platform.h',
843           ]
844         }],
845         ['OS!="linux"', {
846           'sources!': [
847             'audio/cras/audio_manager_cras.cc',
848             'audio/cras/audio_manager_cras.h',
849             'audio/cras/cras_input.cc',
850             'audio/cras/cras_input.h',
851             'audio/cras/cras_unified.cc',
852             'audio/cras/cras_unified.h',
853           ],
854         }],
855         ['use_pulseaudio==1', {
856           'cflags': [
857             '<!@(<(pkg-config) --cflags libpulse)',
858           ],
859           'defines': [
860             'USE_PULSEAUDIO',
861           ],
862           'conditions': [
863             ['linux_link_pulseaudio==0', {
864               'defines': [
865                 'DLOPEN_PULSEAUDIO',
866               ],
867               'variables': {
868                 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
869                 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
870                 'sig_files': ['audio/pulse/pulse.sigs'],
871                 'outfile_type': 'posix_stubs',
872                 'stubs_filename_root': 'pulse_stubs',
873                 'project_path': 'media/audio/pulse',
874                 'intermediate_dir': '<(INTERMEDIATE_DIR)',
875                 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
876               },
877               'include_dirs': [
878                 '<(output_root)',
879               ],
880               'actions': [
881                 {
882                   'action_name': 'generate_stubs',
883                   'inputs': [
884                     '<(generate_stubs_script)',
885                     '<(extra_header)',
886                     '<@(sig_files)',
887                   ],
888                   'outputs': [
889                     '<(intermediate_dir)/<(stubs_filename_root).cc',
890                     '<(output_root)/<(project_path)/<(stubs_filename_root).h',
891                   ],
892                   'action': ['python',
893                              '<(generate_stubs_script)',
894                              '-i', '<(intermediate_dir)',
895                              '-o', '<(output_root)/<(project_path)',
896                              '-t', '<(outfile_type)',
897                              '-e', '<(extra_header)',
898                              '-s', '<(stubs_filename_root)',
899                              '-p', '<(project_path)',
900                              '<@(_inputs)',
901                   ],
902                   'process_outputs_as_sources': 1,
903                   'message': 'Generating Pulse stubs for dynamic loading',
904                 },
905               ],
906               'conditions': [
907                 # Linux/Solaris need libdl for dlopen() and friends.
908                 ['OS=="linux" or OS=="solaris"', {
909                   'link_settings': {
910                     'libraries': [
911                       '-ldl',
912                     ],
913                   },
914                 }],
915               ],
916             }, {  # else: linux_link_pulseaudio==0
917               'link_settings': {
918                 'ldflags': [
919                   '<!@(<(pkg-config) --libs-only-L --libs-only-other libpulse)',
920                 ],
921                 'libraries': [
922                   '<!@(<(pkg-config) --libs-only-l libpulse)',
923                 ],
924               },
925             }],
926           ],
927         }, {  # else: use_pulseaudio==0
928           'sources!': [
929             'audio/pulse/audio_manager_pulse.cc',
930             'audio/pulse/audio_manager_pulse.h',
931             'audio/pulse/pulse_input.cc',
932             'audio/pulse/pulse_input.h',
933             'audio/pulse/pulse_output.cc',
934             'audio/pulse/pulse_output.h',
935             'audio/pulse/pulse_util.cc',
936             'audio/pulse/pulse_util.h',
937           ],
938         }],
939         ['OS=="mac"', {
940           'dependencies': [
941             '../third_party/decklink/decklink.gyp:decklink',
942           ],
943           'link_settings': {
944             'libraries': [
945               '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
946               '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
947               '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
948               '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
949               '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
950               '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
951             ],
952           },
953         }],
954         ['OS=="win"', {
955           'link_settings':  {
956             'libraries': [
957               '-lmf.lib',
958               '-lmfplat.lib',
959               '-lmfreadwrite.lib',
960               '-lmfuuid.lib',
961             ],
962           },
963           # Specify delayload for media.dll.
964           'msvs_settings': {
965             'VCLinkerTool': {
966               'DelayLoadDLLs': [
967                 'mf.dll',
968                 'mfplat.dll',
969                 'mfreadwrite.dll',
970               ],
971             },
972           },
973           # Specify delayload for components that link with media.lib.
974           'all_dependent_settings': {
975             'msvs_settings': {
976               'VCLinkerTool': {
977                 'DelayLoadDLLs': [
978                   'mf.dll',
979                   'mfplat.dll',
980                   'mfreadwrite.dll',
981                 ],
982               },
983             },
984           },
985           # TODO(wolenetz): Fix size_t to int truncations in win64. See
986           # http://crbug.com/171009
987           'conditions': [
988             ['target_arch=="x64"', {
989               'msvs_disabled_warnings': [ 4267, ],
990             }],
991           ],
992         }],
993         ['proprietary_codecs==1', {
994           'sources': [
995             'cdm/cenc_utils.cc',
996             'cdm/cenc_utils.h',
997             'filters/ffmpeg_aac_bitstream_converter.cc',
998             'filters/ffmpeg_aac_bitstream_converter.h',
999             'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
1000             'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
1001             'filters/h264_to_annex_b_bitstream_converter.cc',
1002             'filters/h264_to_annex_b_bitstream_converter.h',
1003             'formats/mp2t/es_adapter_video.cc',
1004             'formats/mp2t/es_adapter_video.h',
1005             'formats/mp2t/es_parser.cc',
1006             'formats/mp2t/es_parser.h',
1007             'formats/mp2t/es_parser_adts.cc',
1008             'formats/mp2t/es_parser_adts.h',
1009             'formats/mp2t/es_parser_h264.cc',
1010             'formats/mp2t/es_parser_h264.h',
1011             'formats/mp2t/es_parser_mpeg1audio.cc',
1012             'formats/mp2t/es_parser_mpeg1audio.h',
1013             'formats/mp2t/mp2t_common.h',
1014             'formats/mp2t/mp2t_stream_parser.cc',
1015             'formats/mp2t/mp2t_stream_parser.h',
1016             'formats/mp2t/timestamp_unroller.cc',
1017             'formats/mp2t/timestamp_unroller.h',
1018             'formats/mp2t/ts_packet.cc',
1019             'formats/mp2t/ts_packet.h',
1020             'formats/mp2t/ts_section.h',
1021             'formats/mp2t/ts_section_pat.cc',
1022             'formats/mp2t/ts_section_pat.h',
1023             'formats/mp2t/ts_section_pes.cc',
1024             'formats/mp2t/ts_section_pes.h',
1025             'formats/mp2t/ts_section_pmt.cc',
1026             'formats/mp2t/ts_section_pmt.h',
1027             'formats/mp2t/ts_section_psi.cc',
1028             'formats/mp2t/ts_section_psi.h',
1029             'formats/mp4/aac.cc',
1030             'formats/mp4/aac.h',
1031             'formats/mp4/avc.cc',
1032             'formats/mp4/avc.h',
1033             'formats/mp4/box_definitions.cc',
1034             'formats/mp4/box_definitions.h',
1035             'formats/mp4/box_reader.cc',
1036             'formats/mp4/box_reader.h',
1037             'formats/mp4/cenc.cc',
1038             'formats/mp4/cenc.h',
1039             'formats/mp4/es_descriptor.cc',
1040             'formats/mp4/es_descriptor.h',
1041             'formats/mp4/mp4_stream_parser.cc',
1042             'formats/mp4/mp4_stream_parser.h',
1043             'formats/mp4/sample_to_group_iterator.cc',
1044             'formats/mp4/sample_to_group_iterator.h',
1045             'formats/mp4/track_run_iterator.cc',
1046             'formats/mp4/track_run_iterator.h',
1047             'formats/mpeg/adts_constants.cc',
1048             'formats/mpeg/adts_constants.h',
1049             'formats/mpeg/adts_stream_parser.cc',
1050             'formats/mpeg/adts_stream_parser.h',
1051             'formats/mpeg/mpeg1_audio_stream_parser.cc',
1052             'formats/mpeg/mpeg1_audio_stream_parser.h',
1053             'formats/mpeg/mpeg_audio_stream_parser_base.cc',
1054             'formats/mpeg/mpeg_audio_stream_parser_base.h',
1055           ],
1056         }],
1057         ['target_arch=="ia32" or target_arch=="x64"', {
1058           'dependencies': [
1059             'media_asm',
1060           ],
1061           'sources': [
1062             'base/simd/convert_rgb_to_yuv_sse2.cc',
1063             'base/simd/convert_rgb_to_yuv_ssse3.cc',
1064             'base/simd/convert_yuv_to_rgb_x86.cc',
1065             'base/simd/filter_yuv_sse2.cc',
1066           ],
1067         }],
1068         ['OS!="linux" and OS!="win"', {
1069           'sources!': [
1070             'base/keyboard_event_counter.cc',
1071             'base/keyboard_event_counter.h',
1072           ],
1073         }],
1074         ['use_low_memory_buffer==1', {
1075           'sources': [
1076             'filters/source_buffer_platform.h',
1077             'filters/source_buffer_platform_lowmem.cc',
1078           ]
1079         }, {  # 'use_low_memory_buffer==0'
1080           'sources': [
1081             'filters/source_buffer_platform.cc',
1082             'filters/source_buffer_platform.h',
1083           ]
1084         }],
1085       ],  # conditions
1086       'target_conditions': [
1087         ['OS == "ios" and _toolset != "host"', {
1088           'sources/': [
1089             # Pull in specific Mac files for iOS (which have been filtered out
1090             # by file name rules).
1091             ['include', '^base/mac/coremedia_glue\\.h$'],
1092             ['include', '^base/mac/coremedia_glue\\.mm$'],
1093             ['include', '^base/mac/corevideo_glue\\.h$'],
1094             ['include', '^base/mac/videotoolbox_glue\\.h$'],
1095             ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1096             ['include', '^base/mac/video_frame_mac\\.h$'],
1097             ['include', '^base/mac/video_frame_mac\\.cc$'],
1098           ],
1099         }],
1100       ],  # target_conditions
1101     },
1102     {
1103       # GN version: //media:media_unittests
1104       'target_name': 'media_unittests',
1105       'type': '<(gtest_target_type)',
1106       'dependencies': [
1107         'audio_test_config',
1108         'media',
1109         'media_test_support',
1110         'shared_memory_support',
1111         '../base/base.gyp:base',
1112         '../base/base.gyp:base_i18n',
1113         '../base/base.gyp:test_support_base',
1114         '../gpu/gpu.gyp:command_buffer_common',
1115         '../gpu/gpu.gyp:gpu_unittest_utils',
1116         '../skia/skia.gyp:skia',
1117         '../testing/gmock.gyp:gmock',
1118         '../testing/gtest.gyp:gtest',
1119         '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1120         '../ui/gfx/gfx.gyp:gfx',
1121         '../ui/gfx/gfx.gyp:gfx_geometry',
1122         '../ui/gfx/gfx.gyp:gfx_test_support',
1123         '../url/url.gyp:url_lib',
1124       ],
1125       'sources': [
1126         'base/android/access_unit_queue_unittest.cc',
1127         'base/android/media_codec_bridge_unittest.cc',
1128         'base/android/media_codec_decoder_unittest.cc',
1129         'base/android/media_codec_player_unittest.cc',
1130         'base/android/media_drm_bridge_unittest.cc',
1131         'base/android/media_source_player_unittest.cc',
1132         'base/android/test_data_factory.cc',
1133         'base/android/test_data_factory.h',
1134         'base/android/test_statistics.h',
1135         'base/audio_block_fifo_unittest.cc',
1136         'base/audio_buffer_converter_unittest.cc',
1137         'base/audio_buffer_queue_unittest.cc',
1138         'base/audio_buffer_unittest.cc',
1139         'base/audio_bus_unittest.cc',
1140         'base/audio_converter_unittest.cc',
1141         'base/audio_discard_helper_unittest.cc',
1142         'base/audio_fifo_unittest.cc',
1143         'base/audio_hardware_config_unittest.cc',
1144         'base/audio_hash_unittest.cc',
1145         'base/audio_pull_fifo_unittest.cc',
1146         'base/audio_renderer_mixer_input_unittest.cc',
1147         'base/audio_renderer_mixer_unittest.cc',
1148         'base/audio_shifter_unittest.cc',
1149         'base/audio_splicer_unittest.cc',
1150         'base/audio_timestamp_helper_unittest.cc',
1151         'base/audio_video_metadata_extractor_unittest.cc',
1152         'base/bind_to_current_loop_unittest.cc',
1153         'base/bit_reader_unittest.cc',
1154         'base/callback_holder.h',
1155         'base/callback_holder_unittest.cc',
1156         'base/channel_mixer_unittest.cc',
1157         'base/channel_mixing_matrix_unittest.cc',
1158         'base/container_names_unittest.cc',
1159         'base/data_buffer_unittest.cc',
1160         'base/decoder_buffer_queue_unittest.cc',
1161         'base/decoder_buffer_unittest.cc',
1162         'base/djb2_unittest.cc',
1163         'base/fake_demuxer_stream_unittest.cc',
1164         'base/gmock_callback_support_unittest.cc',
1165         'base/key_systems_unittest.cc',
1166         'base/mac/video_frame_mac_unittests.cc',
1167         'base/media_file_checker_unittest.cc',
1168         'base/mime_util_unittest.cc',
1169         'base/moving_average_unittest.cc',
1170         'base/multi_channel_resampler_unittest.cc',
1171         'base/null_video_sink_unittest.cc',
1172         'base/pipeline_unittest.cc',
1173         'base/ranges_unittest.cc',
1174         'base/run_all_unittests.cc',
1175         'base/seekable_buffer_unittest.cc',
1176         'base/serial_runner_unittest.cc',
1177         'base/sinc_resampler_unittest.cc',
1178         'base/stream_parser_unittest.cc',
1179         'base/text_ranges_unittest.cc',
1180         'base/text_renderer_unittest.cc',
1181         'base/time_delta_interpolator_unittest.cc',
1182         'base/user_input_monitor_unittest.cc',
1183         'base/vector_math_testing.h',
1184         'base/vector_math_unittest.cc',
1185         'base/video_frame_pool_unittest.cc',
1186         'base/video_frame_unittest.cc',
1187         'base/video_util_unittest.cc',
1188         'base/wall_clock_time_source_unittest.cc',
1189         'base/yuv_convert_unittest.cc',
1190         'blink/skcanvas_video_renderer_unittest.cc',
1191         'capture/animated_content_sampler_unittest.cc',
1192         'capture/capture_resolution_chooser_unittest.cc',
1193         'capture/feedback_signal_accumulator_unittest.cc',
1194         'capture/smooth_event_sampler_unittest.cc',
1195         'capture/video_capture_oracle_unittest.cc',
1196         'cdm/aes_decryptor_unittest.cc',
1197         'cdm/json_web_key_unittest.cc',
1198         'ffmpeg/ffmpeg_common_unittest.cc',
1199         'filters/audio_clock_unittest.cc',
1200         'filters/audio_decoder_selector_unittest.cc',
1201         'filters/audio_decoder_unittest.cc',
1202         'filters/audio_file_reader_unittest.cc',
1203         'filters/audio_renderer_algorithm_unittest.cc',
1204         'filters/blocking_url_protocol_unittest.cc',
1205         'filters/chunk_demuxer_unittest.cc',
1206         'filters/decrypting_audio_decoder_unittest.cc',
1207         'filters/decrypting_demuxer_stream_unittest.cc',
1208         'filters/decrypting_video_decoder_unittest.cc',
1209         'filters/fake_video_decoder.cc',
1210         'filters/fake_video_decoder.h',
1211         'filters/fake_video_decoder_unittest.cc',
1212         'filters/ffmpeg_demuxer_unittest.cc',
1213         'filters/ffmpeg_glue_unittest.cc',
1214         'filters/ffmpeg_video_decoder_unittest.cc',
1215         'filters/file_data_source_unittest.cc',
1216         'filters/frame_processor_unittest.cc',
1217         'filters/h264_bit_reader_unittest.cc',
1218         'filters/h264_parser_unittest.cc',
1219         'filters/in_memory_url_protocol_unittest.cc',
1220         'filters/jpeg_parser_unittest.cc',
1221         'filters/source_buffer_stream_unittest.cc',
1222         'filters/video_cadence_estimator_unittest.cc',
1223         'filters/video_decoder_selector_unittest.cc',
1224         'filters/video_frame_stream_unittest.cc',
1225         'filters/video_renderer_algorithm_unittest.cc',
1226         'filters/vp8_bool_decoder_unittest.cc',
1227         'filters/vp8_parser_unittest.cc',
1228         'formats/common/offset_byte_queue_unittest.cc',
1229         'formats/webm/cluster_builder.cc',
1230         'formats/webm/cluster_builder.h',
1231         'formats/webm/opus_packet_builder.cc',
1232         'formats/webm/opus_packet_builder.h',
1233         'formats/webm/tracks_builder.cc',
1234         'formats/webm/tracks_builder.h',
1235         'formats/webm/webm_cluster_parser_unittest.cc',
1236         'formats/webm/webm_content_encodings_client_unittest.cc',
1237         'formats/webm/webm_parser_unittest.cc',
1238         'formats/webm/webm_tracks_parser_unittest.cc',
1239         'formats/webm/webm_webvtt_parser_unittest.cc',
1240         'renderers/audio_renderer_impl_unittest.cc',
1241         'renderers/renderer_impl_unittest.cc',
1242         'renderers/video_renderer_impl_unittest.cc',
1243         'test/pipeline_integration_test.cc',
1244         'test/pipeline_integration_test_base.cc',
1245         'video/capture/fake_video_capture_device_unittest.cc',
1246         'video/capture/video_capture_device_unittest.cc',
1247         'video/h264_poc_unittest.cc',
1248         'video/gpu_memory_buffer_video_frame_pool_unittest.cc',
1249       ],
1250       'include_dirs': [
1251         # Needed by media_drm_bridge.cc.
1252         '<(SHARED_INTERMEDIATE_DIR)',
1253       ],
1254       'conditions': [
1255         ['arm_neon==1', {
1256           'defines': [
1257             'USE_NEON'
1258           ],
1259         }],
1260         ['media_use_ffmpeg==1', {
1261           'dependencies': [
1262             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1263           ],
1264         }, {  # media_use_ffmpeg== 0
1265           'sources!': [
1266             'base/audio_video_metadata_extractor_unittest.cc',
1267             'base/container_names_unittest.cc',
1268             'base/media_file_checker_unittest.cc',
1269             'ffmpeg/ffmpeg_common_unittest.cc',
1270             'filters/audio_decoder_unittest.cc',
1271             'filters/audio_file_reader_unittest.cc',
1272             'filters/blocking_url_protocol_unittest.cc',
1273             'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1274             'filters/ffmpeg_demuxer_unittest.cc',
1275             'filters/ffmpeg_glue_unittest.cc',
1276             'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1277             'filters/ffmpeg_video_decoder_unittest.cc',
1278             'filters/in_memory_url_protocol_unittest.cc',
1279             'test/pipeline_integration_test.cc',
1280             'test/pipeline_integration_test_base.cc',
1281           ],
1282         }],
1283         ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_library" and win_use_allocator_shim==1)', {
1284           'conditions': [
1285             ['use_allocator!="none"', {
1286               'dependencies': [
1287                 '../base/allocator/allocator.gyp:allocator',
1288               ],
1289             }],
1290           ],
1291         }],
1292         ['OS=="android"', {
1293           'dependencies': [
1294             '../testing/android/native_test.gyp:native_test_native_code',
1295             'player_android',
1296           ],
1297         }],
1298         ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
1299           'sources': [
1300             'filters/h264_bitstream_buffer_unittest.cc',
1301           ],
1302         }],
1303         ['target_arch=="ia32" or target_arch=="x64"', {
1304           'sources': [
1305             'base/simd/convert_rgb_to_yuv_unittest.cc',
1306           ],
1307         }],
1308         ['proprietary_codecs==1', {
1309           'sources': [
1310             'cdm/cenc_utils_unittest.cc',
1311             'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1312             'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1313             'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
1314             'formats/common/stream_parser_test_base.cc',
1315             'formats/common/stream_parser_test_base.h',
1316             'formats/mp2t/es_adapter_video_unittest.cc',
1317             'formats/mp2t/es_parser_adts_unittest.cc',
1318             'formats/mp2t/es_parser_h264_unittest.cc',
1319             'formats/mp2t/es_parser_mpeg1audio_unittest.cc',
1320             'formats/mp2t/es_parser_test_base.cc',
1321             'formats/mp2t/es_parser_test_base.h',
1322             'formats/mp2t/mp2t_stream_parser_unittest.cc',
1323             'formats/mp2t/timestamp_unroller_unittest.cc',
1324             'formats/mp4/aac_unittest.cc',
1325             'formats/mp4/avc_unittest.cc',
1326             'formats/mp4/box_reader_unittest.cc',
1327             'formats/mp4/es_descriptor_unittest.cc',
1328             'formats/mp4/mp4_stream_parser_unittest.cc',
1329             'formats/mp4/sample_to_group_iterator_unittest.cc',
1330             'formats/mp4/track_run_iterator_unittest.cc',
1331             'formats/mpeg/adts_stream_parser_unittest.cc',
1332             'formats/mpeg/mpeg1_audio_stream_parser_unittest.cc',
1333           ],
1334         }],
1335         ['OS=="mac"', {
1336           'sources': [
1337             'video/capture/mac/video_capture_device_factory_mac_unittest.mm',
1338           ]
1339         }],
1340         ['use_x11==1', {
1341           'dependencies': [
1342             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1343           ],
1344         }],
1345       ],
1346     },
1347     {
1348       # GN version: //media:media_perftests
1349       'target_name': 'media_perftests',
1350       'type': '<(gtest_target_type)',
1351       'dependencies': [
1352         '../base/base.gyp:test_support_base',
1353         '../testing/gmock.gyp:gmock',
1354         '../testing/gtest.gyp:gtest',
1355         '../testing/perf/perf_test.gyp:perf_test',
1356         '../ui/gfx/gfx.gyp:gfx',
1357         '../ui/gfx/gfx.gyp:gfx_test_support',
1358         '../ui/gfx/gfx.gyp:gfx_geometry',
1359         'media',
1360         'media_test_support',
1361         'shared_memory_support',
1362       ],
1363       'sources': [
1364         'base/audio_bus_perftest.cc',
1365         'base/audio_converter_perftest.cc',
1366         'base/demuxer_perftest.cc',
1367         'base/run_all_perftests.cc',
1368         'base/sinc_resampler_perftest.cc',
1369         'base/vector_math_perftest.cc',
1370         'base/yuv_convert_perftest.cc',
1371         'test/pipeline_integration_perftest.cc',
1372         'test/pipeline_integration_test_base.cc',
1373       ],
1374       'conditions': [
1375         ['arm_neon==1', {
1376           'defines': [
1377             'USE_NEON'
1378           ],
1379         }],
1380         ['OS=="android"', {
1381           'dependencies': [
1382             '../testing/android/native_test.gyp:native_test_native_code',
1383             '../ui/gl/gl.gyp:gl',
1384           ],
1385         }],
1386         ['media_use_ffmpeg==1', {
1387           'dependencies': [
1388             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1389           ],
1390         }, {  # media_use_ffmpeg==0
1391           'sources!': [
1392             'base/demuxer_perftest.cc',
1393             'test/pipeline_integration_perftest.cc',
1394             'test/pipeline_integration_test_base.cc',
1395           ],
1396         }],
1397       ],
1398     },
1399     {
1400       # GN version: //media/audio:unittests
1401       # For including the sources and configs in multiple test targets.
1402       'target_name': 'audio_test_config',
1403       'type': 'none',
1404       'direct_dependent_settings': {
1405         'sources': [
1406           'audio/audio_input_controller_unittest.cc',
1407           'audio/audio_input_unittest.cc',
1408           'audio/audio_manager_factory_unittest.cc',
1409           'audio/audio_manager_unittest.cc',
1410           'audio/audio_output_controller_unittest.cc',
1411           'audio/audio_output_device_unittest.cc',
1412           'audio/audio_output_proxy_unittest.cc',
1413           'audio/audio_parameters_unittest.cc',
1414           'audio/audio_power_monitor_unittest.cc',
1415           'audio/fake_audio_worker_unittest.cc',
1416           'audio/simple_sources_unittest.cc',
1417           'audio/virtual_audio_input_stream_unittest.cc',
1418           'audio/virtual_audio_output_stream_unittest.cc',
1419         ],
1420         'conditions': [
1421           # TODO(wolenetz): Fix size_t to int truncations in win64. See
1422           # http://crbug.com/171009
1423           ['OS=="win" and target_arch=="x64"', {
1424             'msvs_disabled_warnings': [ 4267, ],
1425           }],
1426           ['OS=="android"', {
1427             'sources': [
1428               'audio/android/audio_android_unittest.cc',
1429             ],
1430           }, {
1431             'sources': [
1432               'audio/audio_input_volume_unittest.cc',
1433             ],
1434           }],
1435           ['OS=="mac"', {
1436             'sources': [
1437               'audio/mac/audio_auhal_mac_unittest.cc',
1438               'audio/mac/audio_device_listener_mac_unittest.cc',
1439               'audio/mac/audio_low_latency_input_mac_unittest.cc',
1440             ],
1441           }],
1442           ['chromeos==1', {
1443             'sources': [
1444               'audio/sounds/audio_stream_handler_unittest.cc',
1445               'audio/sounds/sounds_manager_unittest.cc',
1446               'audio/sounds/test_data.cc',
1447               'audio/sounds/test_data.h',
1448               'audio/sounds/wav_audio_handler_unittest.cc',
1449             ],
1450           }],
1451           ['OS=="win"', {
1452             'sources': [
1453               'audio/win/audio_device_listener_win_unittest.cc',
1454               'audio/win/audio_low_latency_input_win_unittest.cc',
1455               'audio/win/audio_low_latency_output_win_unittest.cc',
1456               'audio/win/audio_output_win_unittest.cc',
1457               'audio/win/core_audio_util_win_unittest.cc',
1458             ],
1459           }],
1460           ['use_alsa==1', {
1461             'sources': [
1462               'audio/alsa/alsa_output_unittest.cc',
1463               'audio/audio_low_latency_input_output_unittest.cc',
1464             ],
1465             'defines': [
1466               'USE_ALSA',
1467             ],
1468           }],
1469           ['use_pulseaudio==1', {
1470             'defines': [
1471               'USE_PULSEAUDIO',
1472             ],
1473           }],
1474           ['use_cras==1', {
1475             'sources': [
1476               'audio/cras/cras_input_unittest.cc',
1477               'audio/cras/cras_unified_unittest.cc',
1478             ],
1479             'defines': [
1480               'USE_CRAS',
1481             ],
1482           }],
1483         ],
1484       },
1485     },
1486     {
1487       # GN version: //media:audio_unittests
1488       # For running the subset of media_unittests that might require audio
1489       # hardware separately on GPU bots. media_unittests includes these too.
1490       'target_name': 'audio_unittests',
1491       'type': '<(gtest_target_type)',
1492       'dependencies': [
1493         'audio_test_config',
1494         'media_test_support',
1495         '../base/base.gyp:test_support_base',
1496         '../testing/gmock.gyp:gmock',
1497         '../testing/gtest.gyp:gtest',
1498         '../ui/gfx/gfx.gyp:gfx_test_support',
1499         '../url/url.gyp:url_lib',
1500       ],
1501       'sources': [
1502         'base/run_all_unittests.cc',
1503       ],
1504     },
1505     {
1506       # GN versions (it is split apart): //media:test_support,
1507       # //media/base:test_support, and //media/audio:test_support
1508       'target_name': 'media_test_support',
1509       'type': 'static_library',
1510       'dependencies': [
1511         'media',
1512         'shared_memory_support',
1513         '../base/base.gyp:base',
1514         '../skia/skia.gyp:skia',
1515         '../testing/gmock.gyp:gmock',
1516         '../testing/gtest.gyp:gtest',
1517       ],
1518       'sources': [
1519         'audio/audio_unittest_util.cc',
1520         'audio/audio_unittest_util.h',
1521         'audio/mock_audio_manager.cc',
1522         'audio/mock_audio_manager.h',
1523         'audio/mock_audio_source_callback.cc',
1524         'audio/mock_audio_source_callback.h',
1525         'audio/test_audio_input_controller_factory.cc',
1526         'audio/test_audio_input_controller_factory.h',
1527         'base/fake_audio_render_callback.cc',
1528         'base/fake_audio_render_callback.h',
1529         'base/fake_audio_renderer_sink.cc',
1530         'base/fake_audio_renderer_sink.h',
1531         'base/fake_demuxer_stream.cc',
1532         'base/fake_demuxer_stream.h',
1533         'base/fake_text_track_stream.cc',
1534         'base/fake_text_track_stream.h',
1535         'base/gmock_callback_support.h',
1536         'base/mock_audio_renderer_sink.cc',
1537         'base/mock_audio_renderer_sink.h',
1538         'base/mock_demuxer_host.cc',
1539         'base/mock_demuxer_host.h',
1540         'base/mock_filters.cc',
1541         'base/mock_filters.h',
1542         'base/test_data_util.cc',
1543         'base/test_data_util.h',
1544         'base/test_helpers.cc',
1545         'base/test_helpers.h',
1546         'renderers/mock_gpu_video_accelerator_factories.cc',
1547         'renderers/mock_gpu_video_accelerator_factories.h',
1548         'video/mock_video_decode_accelerator.cc',
1549         'video/mock_video_decode_accelerator.h',
1550       ],
1551     },
1552     {
1553       # Minimal target for NaCl and other renderer side media clients which
1554       # only need to send audio data across the shared memory to the browser
1555       # process.
1556       # GN version: //media:shared_memory_support
1557       'target_name': 'shared_memory_support',
1558       'type': '<(component)',
1559       'dependencies': [
1560         '../base/base.gyp:base',
1561       ],
1562       'defines': [
1563         'MEDIA_IMPLEMENTATION',
1564       ],
1565       'include_dirs': [
1566         '..',
1567       ],
1568       'includes': [
1569         'shared_memory_support.gypi',
1570       ],
1571       'sources': [
1572         '<@(shared_memory_support_sources)',
1573       ],
1574       'conditions': [
1575         ['arm_neon==1', {
1576           'defines': [
1577             'USE_NEON'
1578           ],
1579         }],
1580       ],
1581     },
1582   ],
1583   'conditions': [
1584     ['target_arch=="ia32" or target_arch=="x64"', {
1585       'targets': [
1586        {
1587           'target_name': 'media_asm',
1588           'type': 'static_library',
1589           'sources': [
1590             'base/simd/convert_rgb_to_yuv_ssse3.asm',
1591             'base/simd/convert_yuv_to_rgb_sse.asm',
1592             'base/simd/convert_yuva_to_argb_mmx.asm',
1593             'base/simd/empty_register_state_mmx.asm',
1594             'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1595             'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1596             'base/simd/scale_yuv_to_rgb_mmx.asm',
1597             'base/simd/scale_yuv_to_rgb_sse.asm',
1598           ],
1599           'conditions': [
1600             ['component=="shared_library"', {
1601               'variables': {
1602                 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1603               },
1604             }],
1605             ['target_arch=="x64"', {
1606               # Source files optimized for X64 systems.
1607               'sources': [
1608                 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1609                 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1610               ],
1611               'variables': {
1612                 'yasm_flags': ['-DARCH_X86_64'],
1613               },
1614             }],
1615             ['OS=="mac" or OS=="ios"', {
1616               'variables': {
1617                 'yasm_flags': [
1618                   '-DPREFIX',
1619                   '-DMACHO',
1620                 ],
1621               },
1622               'sources': [
1623                 # XCode doesn't want to link a pure assembly target and will
1624                 # fail to link when it creates an empty file list.  So add a
1625                 # dummy file keep the linker happy.  See http://crbug.com/157073
1626                 'base/simd/xcode_hack.c',
1627               ],
1628             }],
1629             ['os_posix==1 and OS!="mac"', {
1630               'variables': {
1631                 'conditions': [
1632                   ['target_arch=="ia32"', {
1633                     'yasm_flags': [
1634                       '-DARCH_X86_32',
1635                       '-DELF',
1636                     ],
1637                   }, { # target_arch=="x64"
1638                     'yasm_flags': [
1639                       '-DARCH_X86_64',
1640                       '-DELF',
1641                       '-DPIC',
1642                     ],
1643                   }],
1644                 ],
1645               },
1646             }],
1647           ],
1648           'variables': {
1649             'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1650             'yasm_flags': [
1651               '-DCHROMIUM',
1652               # In addition to the same path as source asm, let yasm %include
1653               # search path be relative to src/ per Chromium policy.
1654               '-I..',
1655             ],
1656             'yasm_includes': [
1657               '../third_party/x86inc/x86inc.asm',
1658               'base/simd/convert_rgb_to_yuv_ssse3.inc',
1659               'base/simd/convert_yuv_to_rgb_mmx.inc',
1660               'base/simd/convert_yuva_to_argb_mmx.inc',
1661               'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1662               'base/simd/media_export.asm',
1663               'base/simd/scale_yuv_to_rgb_mmx.inc',
1664             ],
1665           },
1666           'msvs_2010_disable_uldi_when_referenced': 1,
1667           'includes': [
1668             '../third_party/yasm/yasm_compile.gypi',
1669           ],
1670         },
1671       ], # targets
1672     }],
1673     ['OS=="android"', {
1674       'targets': [
1675         {
1676           # TODO(GN)
1677           'target_name': 'media_unittests_apk',
1678           'type': 'none',
1679           'dependencies': [
1680             'media_java',
1681             'media_unittests',
1682           ],
1683           'variables': {
1684             'test_suite_name': 'media_unittests',
1685             'isolate_file': 'media_unittests.isolate',
1686           },
1687           'includes': ['../build/apk_test.gypi'],
1688         },
1689         {
1690           # TODO(GN)
1691           'target_name': 'media_perftests_apk',
1692           'type': 'none',
1693           'dependencies': [
1694             'media_java',
1695             'media_perftests',
1696           ],
1697           'variables': {
1698             'test_suite_name': 'media_perftests',
1699             'isolate_file': 'media_perftests.isolate',
1700           },
1701           'includes': ['../build/apk_test.gypi'],
1702         },
1703         {
1704           # GN: //media/base/android:media_android_jni_headers
1705           'target_name': 'media_android_jni_headers',
1706           'type': 'none',
1707           'sources': [
1708             'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1709             'base/android/java/src/org/chromium/media/AudioRecordInput.java',
1710             'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1711             'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1712             'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1713             'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1714             'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1715           ],
1716           'variables': {
1717             'jni_gen_package': 'media',
1718           },
1719           'includes': ['../build/jni_generator.gypi'],
1720         },
1721         {
1722           # GN: //media/base/android:video_capture_android_jni_headers
1723           'target_name': 'video_capture_android_jni_headers',
1724           'type': 'none',
1725           'sources': [
1726             'base/android/java/src/org/chromium/media/VideoCapture.java',
1727             'base/android/java/src/org/chromium/media/VideoCaptureFactory.java',
1728           ],
1729           'variables': {
1730             'jni_gen_package': 'media',
1731           },
1732           'includes': ['../build/jni_generator.gypi'],
1733         },
1734         {
1735           # GN: //media/base/android:android
1736           'target_name': 'player_android',
1737           'type': 'static_library',
1738           'sources': [
1739             'base/android/access_unit_queue.cc',
1740             'base/android/access_unit_queue.h',
1741             'base/android/audio_decoder_job.cc',
1742             'base/android/audio_decoder_job.h',
1743             'base/android/browser_cdm_factory_android.cc',
1744             'base/android/browser_cdm_factory_android.h',
1745             'base/android/demuxer_android.h',
1746             'base/android/demuxer_stream_player_params.cc',
1747             'base/android/demuxer_stream_player_params.h',
1748             'base/android/media_client_android.cc',
1749             'base/android/media_client_android.h',
1750             'base/android/media_codec_audio_decoder.cc',
1751             'base/android/media_codec_audio_decoder.h',
1752             'base/android/media_codec_bridge.cc',
1753             'base/android/media_codec_bridge.h',
1754             'base/android/media_codec_decoder.cc',
1755             'base/android/media_codec_decoder.h',
1756             'base/android/media_codec_player.cc',
1757             'base/android/media_codec_player.h',
1758             'base/android/media_codec_video_decoder.cc',
1759             'base/android/media_codec_video_decoder.h',
1760             'base/android/media_common_android.h',
1761             'base/android/media_decoder_job.cc',
1762             'base/android/media_decoder_job.h',
1763             'base/android/media_drm_bridge.cc',
1764             'base/android/media_drm_bridge.h',
1765             'base/android/media_drm_bridge_delegate.cc',
1766             'base/android/media_drm_bridge_delegate.h',
1767             'base/android/media_jni_registrar.cc',
1768             'base/android/media_jni_registrar.h',
1769             'base/android/media_player_android.cc',
1770             'base/android/media_player_android.h',
1771             'base/android/media_player_bridge.cc',
1772             'base/android/media_player_bridge.h',
1773             'base/android/media_player_listener.cc',
1774             'base/android/media_player_listener.h',
1775             'base/android/media_player_manager.h',
1776             'base/android/media_resource_getter.cc',
1777             'base/android/media_resource_getter.h',
1778             'base/android/media_source_player.cc',
1779             'base/android/media_source_player.h',
1780             'base/android/media_url_interceptor.h',
1781             'base/android/video_decoder_job.cc',
1782             'base/android/video_decoder_job.h',
1783             'base/android/webaudio_media_codec_bridge.cc',
1784             'base/android/webaudio_media_codec_bridge.h',
1785             'base/android/webaudio_media_codec_info.h',
1786           ],
1787           'dependencies': [
1788             '../base/base.gyp:base',
1789             '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1790             '../ui/gl/gl.gyp:gl',
1791             '../url/url.gyp:url_lib',
1792             'media_android_jni_headers',
1793           ],
1794           'include_dirs': [
1795             # Needed by media_drm_bridge.cc.
1796             '<(SHARED_INTERMEDIATE_DIR)',
1797           ],
1798           'defines': [
1799             'MEDIA_IMPLEMENTATION',
1800           ],
1801         },
1802         {
1803           # GN: //media/base/android:media_java
1804           'target_name': 'media_java',
1805           'type': 'none',
1806           'dependencies': [
1807             '../base/base.gyp:base',
1808             'media_android_captureapitype',
1809             'media_android_imageformat',
1810           ],
1811           'export_dependent_settings': [
1812             '../base/base.gyp:base',
1813           ],
1814           'variables': {
1815             'java_in_dir': 'base/android/java',
1816           },
1817           'includes': ['../build/java.gypi'],
1818         },
1819         {
1820           # GN: //media/base/android:media_android_captureapitype
1821           'target_name': 'media_android_captureapitype',
1822           'type': 'none',
1823           'variables': {
1824             'source_file': 'video/capture/video_capture_device.h',
1825           },
1826           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1827         },
1828         {
1829           # GN: //media/base/android:media_android_imageformat
1830           'target_name': 'media_android_imageformat',
1831           'type': 'none',
1832           'variables': {
1833             'source_file': 'video/capture/android/video_capture_device_android.h',
1834           },
1835           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1836         },
1837       ],
1838     }],
1839     ['media_use_ffmpeg==1', {
1840       'targets': [
1841         {
1842           # GN version: //media:ffmpeg_regression_tests
1843           'target_name': 'ffmpeg_regression_tests',
1844           'type': 'executable',
1845           'dependencies': [
1846             '../base/base.gyp:test_support_base',
1847             '../testing/gmock.gyp:gmock',
1848             '../testing/gtest.gyp:gtest',
1849             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1850             '../ui/gfx/gfx.gyp:gfx_geometry',
1851             'media',
1852             'media_test_support',
1853           ],
1854           'sources': [
1855             'base/run_all_unittests.cc',
1856             'ffmpeg/ffmpeg_regression_tests.cc',
1857             'test/pipeline_integration_test_base.cc',
1858           ],
1859           'conditions': [
1860             ['os_posix==1 and OS!="mac"', {
1861               'conditions': [
1862                 ['use_allocator!="none"', {
1863                   'dependencies': [
1864                     '../base/allocator/allocator.gyp:allocator',
1865                   ],
1866                 }],
1867               ],
1868             }],
1869           ],
1870         },
1871       ],
1872     }],
1873     ['OS=="ios"', {
1874       'targets': [
1875         {
1876           # Minimal media component for media/cast on iOS.
1877           # GN version: //media:media_for_cast_ios
1878           'target_name': 'media_for_cast_ios',
1879           'type': '<(component)',
1880           'dependencies': [
1881             '../base/base.gyp:base',
1882             '../gpu/gpu.gyp:command_buffer_common',
1883             '../ui/gfx/gfx.gyp:gfx_geometry',
1884             'shared_memory_support',
1885           ],
1886           'defines': [
1887             'MEDIA_DISABLE_FFMPEG',
1888             'MEDIA_DISABLE_LIBVPX',
1889             'MEDIA_FOR_CAST_IOS',
1890             'MEDIA_IMPLEMENTATION',
1891           ],
1892           'direct_dependent_settings': {
1893             'defines': [
1894               'MEDIA_DISABLE_FFMPEG',
1895               'MEDIA_DISABLE_LIBVPX',
1896             ],
1897             'include_dirs': [
1898               '..',
1899             ],
1900           },
1901           'include_dirs': [
1902             '..',
1903           ],
1904           'sources': [
1905             'base/mac/coremedia_glue.h',
1906             'base/mac/coremedia_glue.mm',
1907             'base/mac/corevideo_glue.h',
1908             'base/mac/video_frame_mac.cc',
1909             'base/mac/video_frame_mac.h',
1910             'base/mac/videotoolbox_glue.h',
1911             'base/mac/videotoolbox_glue.mm',
1912             'base/simd/convert_rgb_to_yuv.h',
1913             'base/simd/convert_rgb_to_yuv_c.cc',
1914             'base/simd/convert_yuv_to_rgb.h',
1915             'base/simd/convert_yuv_to_rgb_c.cc',
1916             'base/simd/filter_yuv.h',
1917             'base/simd/filter_yuv_c.cc',
1918             'base/video_frame.cc',
1919             'base/video_frame.h',
1920             'base/video_frame_metadata.cc',
1921             'base/video_frame_metadata.h',
1922             'base/video_types.cc',
1923             'base/video_types.h',
1924             'base/video_util.cc',
1925             'base/video_util.h',
1926             'base/yuv_convert.cc',
1927             'base/yuv_convert.h',
1928           ],
1929           'link_settings': {
1930             'libraries': [
1931               '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
1932             ],
1933           },
1934           'conditions': [
1935             ['arm_neon==1', {
1936               'defines': [
1937                 'USE_NEON'
1938               ],
1939             }],
1940           ],  # conditions
1941           'target_conditions': [
1942             ['OS == "ios" and _toolset != "host"', {
1943               'sources/': [
1944                 # Pull in specific Mac files for iOS (which have been filtered
1945                 # out by file name rules).
1946                 ['include', '^base/mac/coremedia_glue\\.h$'],
1947                 ['include', '^base/mac/coremedia_glue\\.mm$'],
1948                 ['include', '^base/mac/corevideo_glue\\.h$'],
1949                 ['include', '^base/mac/videotoolbox_glue\\.h$'],
1950                 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1951                 ['include', '^base/mac/video_frame_mac\\.h$'],
1952                 ['include', '^base/mac/video_frame_mac\\.cc$'],
1953               ],
1954             }],
1955           ],  # target_conditions
1956         },
1957       ],
1958     }],
1959     ['test_isolation_mode != "noop"', {
1960       'targets': [
1961         {
1962           'target_name': 'media_unittests_run',
1963           'type': 'none',
1964           'dependencies': [
1965             'media_unittests',
1966           ],
1967           'includes': [
1968             '../build/isolate.gypi',
1969           ],
1970           'sources': [
1971             'media_unittests.isolate',
1972           ],
1973         },
1974         {
1975           'target_name': 'audio_unittests_run',
1976           'type': 'none',
1977           'dependencies': [
1978             'audio_unittests',
1979           ],
1980           'includes': [
1981             '../build/isolate.gypi',
1982           ],
1983           'sources': [
1984             'audio_unittests.isolate',
1985           ],
1986           'conditions': [
1987             ['use_x11==1', {
1988               'dependencies': [
1989                 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1990               ],
1991             }],
1992           ],
1993         },
1994       ],
1995     }],
1996   ],