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