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