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