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