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