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