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