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