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