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