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