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