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