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