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