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