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