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