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