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