[Android] Remove unused code in content
[chromium-blink-merge.git] / media / media.gyp
blob121cd80b79f759b95696f534f499657a0b013282
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/box_definitions.cc',
1074             'formats/mp4/box_definitions.h',
1075             'formats/mp4/box_reader.cc',
1076             'formats/mp4/box_reader.h',
1077             'formats/mp4/cenc.cc',
1078             'formats/mp4/cenc.h',
1079             'formats/mp4/es_descriptor.cc',
1080             'formats/mp4/es_descriptor.h',
1081             'formats/mp4/mp4_stream_parser.cc',
1082             'formats/mp4/mp4_stream_parser.h',
1083             'formats/mp4/sample_to_group_iterator.cc',
1084             'formats/mp4/sample_to_group_iterator.h',
1085             'formats/mp4/track_run_iterator.cc',
1086             'formats/mp4/track_run_iterator.h',
1087             'formats/mpeg/adts_constants.cc',
1088             'formats/mpeg/adts_constants.h',
1089             'formats/mpeg/adts_stream_parser.cc',
1090             'formats/mpeg/adts_stream_parser.h',
1091             'formats/mpeg/mpeg1_audio_stream_parser.cc',
1092             'formats/mpeg/mpeg1_audio_stream_parser.h',
1093             'formats/mpeg/mpeg_audio_stream_parser_base.cc',
1094             'formats/mpeg/mpeg_audio_stream_parser_base.h',
1095           ],
1096         }],
1097         ['target_arch=="ia32" or target_arch=="x64"', {
1098           'dependencies': [
1099             'media_asm',
1100           ],
1101           'sources': [
1102             'base/simd/convert_rgb_to_yuv_sse2.cc',
1103             'base/simd/convert_rgb_to_yuv_ssse3.cc',
1104             'base/simd/convert_yuv_to_rgb_x86.cc',
1105             'base/simd/filter_yuv_sse2.cc',
1106           ],
1107         }],
1108         ['OS!="linux" and OS!="win"', {
1109           'sources!': [
1110             'base/keyboard_event_counter.cc',
1111             'base/keyboard_event_counter.h',
1112           ],
1113         }],
1114         ['use_low_memory_buffer==1', {
1115           'sources': [
1116             'filters/source_buffer_platform.h',
1117             'filters/source_buffer_platform_lowmem.cc',
1118           ]
1119         }, {  # 'use_low_memory_buffer==0'
1120           'sources': [
1121             'filters/source_buffer_platform.cc',
1122             'filters/source_buffer_platform.h',
1123           ]
1124         }],
1125       ],  # conditions
1126       'target_conditions': [
1127         ['OS == "ios" and _toolset != "host"', {
1128           'sources/': [
1129             # Pull in specific Mac files for iOS (which have been filtered out
1130             # by file name rules).
1131             ['include', '^base/mac/coremedia_glue\\.h$'],
1132             ['include', '^base/mac/coremedia_glue\\.mm$'],
1133             ['include', '^base/mac/corevideo_glue\\.h$'],
1134             ['include', '^base/mac/videotoolbox_glue\\.h$'],
1135             ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1136             ['include', '^base/mac/video_frame_mac\\.h$'],
1137             ['include', '^base/mac/video_frame_mac\\.cc$'],
1138           ],
1139         }],
1140       ],  # target_conditions
1141     },
1142     {
1143       # GN version: //media:media_unittests
1144       'target_name': 'media_unittests',
1145       'type': '<(gtest_target_type)',
1146       'dependencies': [
1147         'audio_test_config',
1148         'media',
1149         'media_test_support',
1150         'shared_memory_support',
1151         '../base/base.gyp:base',
1152         '../base/base.gyp:base_i18n',
1153         '../base/base.gyp:test_support_base',
1154         '../gpu/gpu.gyp:command_buffer_common',
1155         '../gpu/gpu.gyp:gpu_unittest_utils',
1156         '../skia/skia.gyp:skia',
1157         '../testing/gmock.gyp:gmock',
1158         '../testing/gtest.gyp:gtest',
1159         '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1160         '../ui/gfx/gfx.gyp:gfx',
1161         '../ui/gfx/gfx.gyp:gfx_geometry',
1162         '../ui/gfx/gfx.gyp:gfx_test_support',
1163         '../url/url.gyp:url_lib',
1164       ],
1165       'sources': [
1166         'base/android/access_unit_queue_unittest.cc',
1167         'base/android/media_codec_bridge_unittest.cc',
1168         'base/android/media_codec_decoder_unittest.cc',
1169         'base/android/media_codec_player_unittest.cc',
1170         'base/android/media_drm_bridge_unittest.cc',
1171         'base/android/media_player_bridge_unittest.cc',
1172         'base/android/media_source_player_unittest.cc',
1173         'base/android/test_data_factory.cc',
1174         'base/android/test_data_factory.h',
1175         'base/android/test_statistics.h',
1176         'base/audio_block_fifo_unittest.cc',
1177         'base/audio_buffer_converter_unittest.cc',
1178         'base/audio_buffer_queue_unittest.cc',
1179         'base/audio_buffer_unittest.cc',
1180         'base/audio_bus_unittest.cc',
1181         'base/audio_converter_unittest.cc',
1182         'base/audio_discard_helper_unittest.cc',
1183         'base/audio_fifo_unittest.cc',
1184         'base/audio_hardware_config_unittest.cc',
1185         'base/audio_hash_unittest.cc',
1186         'base/audio_pull_fifo_unittest.cc',
1187         'base/audio_renderer_mixer_input_unittest.cc',
1188         'base/audio_renderer_mixer_unittest.cc',
1189         'base/audio_shifter_unittest.cc',
1190         'base/audio_splicer_unittest.cc',
1191         'base/audio_timestamp_helper_unittest.cc',
1192         'base/audio_video_metadata_extractor_unittest.cc',
1193         'base/bind_to_current_loop_unittest.cc',
1194         'base/bit_reader_unittest.cc',
1195         'base/callback_holder.h',
1196         'base/callback_holder_unittest.cc',
1197         'base/channel_mixer_unittest.cc',
1198         'base/channel_mixing_matrix_unittest.cc',
1199         'base/container_names_unittest.cc',
1200         'base/data_buffer_unittest.cc',
1201         'base/decoder_buffer_queue_unittest.cc',
1202         'base/decoder_buffer_unittest.cc',
1203         'base/djb2_unittest.cc',
1204         'base/fake_demuxer_stream_unittest.cc',
1205         'base/gmock_callback_support_unittest.cc',
1206         'base/key_systems_unittest.cc',
1207         'base/mac/video_frame_mac_unittests.cc',
1208         'base/media_file_checker_unittest.cc',
1209         'base/mime_util_unittest.cc',
1210         'base/moving_average_unittest.cc',
1211         'base/multi_channel_resampler_unittest.cc',
1212         'base/null_video_sink_unittest.cc',
1213         'base/pipeline_unittest.cc',
1214         'base/ranges_unittest.cc',
1215         'base/run_all_unittests.cc',
1216         'base/seekable_buffer_unittest.cc',
1217         'base/serial_runner_unittest.cc',
1218         'base/sinc_resampler_unittest.cc',
1219         'base/stream_parser_unittest.cc',
1220         'base/text_ranges_unittest.cc',
1221         'base/text_renderer_unittest.cc',
1222         'base/time_delta_interpolator_unittest.cc',
1223         'base/user_input_monitor_unittest.cc',
1224         'base/vector_math_testing.h',
1225         'base/vector_math_unittest.cc',
1226         'base/video_frame_pool_unittest.cc',
1227         'base/video_frame_unittest.cc',
1228         'base/video_util_unittest.cc',
1229         'base/wall_clock_time_source_unittest.cc',
1230         'base/yuv_convert_unittest.cc',
1231         'blink/skcanvas_video_renderer_unittest.cc',
1232         'capture/content/animated_content_sampler_unittest.cc',
1233         'capture/content/capture_resolution_chooser_unittest.cc',
1234         'capture/content/feedback_signal_accumulator_unittest.cc',
1235         'capture/content/smooth_event_sampler_unittest.cc',
1236         'capture/content/video_capture_oracle_unittest.cc',
1237         'capture/video/fake_video_capture_device_unittest.cc',
1238         'capture/video/video_capture_device_unittest.cc',
1239         'cdm/aes_decryptor_unittest.cc',
1240         'cdm/json_web_key_unittest.cc',
1241         'ffmpeg/ffmpeg_common_unittest.cc',
1242         'filters/audio_clock_unittest.cc',
1243         'filters/audio_decoder_selector_unittest.cc',
1244         'filters/audio_decoder_unittest.cc',
1245         'filters/audio_file_reader_unittest.cc',
1246         'filters/audio_renderer_algorithm_unittest.cc',
1247         'filters/blocking_url_protocol_unittest.cc',
1248         'filters/chunk_demuxer_unittest.cc',
1249         'filters/decrypting_audio_decoder_unittest.cc',
1250         'filters/decrypting_demuxer_stream_unittest.cc',
1251         'filters/decrypting_video_decoder_unittest.cc',
1252         'filters/fake_video_decoder.cc',
1253         'filters/fake_video_decoder.h',
1254         'filters/fake_video_decoder_unittest.cc',
1255         'filters/ffmpeg_demuxer_unittest.cc',
1256         'filters/ffmpeg_glue_unittest.cc',
1257         'filters/ffmpeg_video_decoder_unittest.cc',
1258         'filters/file_data_source_unittest.cc',
1259         'filters/frame_processor_unittest.cc',
1260         'filters/h264_bit_reader_unittest.cc',
1261         'filters/h264_parser_unittest.cc',
1262         'filters/in_memory_url_protocol_unittest.cc',
1263         'filters/ivf_parser_unittest.cc',
1264         'filters/jpeg_parser_unittest.cc',
1265         'filters/source_buffer_stream_unittest.cc',
1266         'filters/video_cadence_estimator_unittest.cc',
1267         'filters/video_decoder_selector_unittest.cc',
1268         'filters/video_frame_stream_unittest.cc',
1269         'filters/video_renderer_algorithm_unittest.cc',
1270         'filters/vp8_bool_decoder_unittest.cc',
1271         'filters/vp8_parser_unittest.cc',
1272         'filters/vp9_parser_unittest.cc',
1273         'filters/vp9_raw_bits_reader_unittest.cc',
1274         'capture/webm_muxer_unittest.cc',
1275         'formats/common/offset_byte_queue_unittest.cc',
1276         'formats/webm/cluster_builder.cc',
1277         'formats/webm/cluster_builder.h',
1278         'formats/webm/opus_packet_builder.cc',
1279         'formats/webm/opus_packet_builder.h',
1280         'formats/webm/tracks_builder.cc',
1281         'formats/webm/tracks_builder.h',
1282         'formats/webm/webm_cluster_parser_unittest.cc',
1283         'formats/webm/webm_content_encodings_client_unittest.cc',
1284         'formats/webm/webm_parser_unittest.cc',
1285         'formats/webm/webm_tracks_parser_unittest.cc',
1286         'formats/webm/webm_webvtt_parser_unittest.cc',
1287         'renderers/audio_renderer_impl_unittest.cc',
1288         'renderers/renderer_impl_unittest.cc',
1289         'renderers/video_renderer_impl_unittest.cc',
1290         'test/pipeline_integration_test.cc',
1291         'test/pipeline_integration_test_base.cc',
1292         'video/h264_poc_unittest.cc',
1293         'video/gpu_memory_buffer_video_frame_pool_unittest.cc',
1294       ],
1295       'include_dirs': [
1296         # Needed by media_drm_bridge.cc.
1297         '<(SHARED_INTERMEDIATE_DIR)',
1298       ],
1299       'conditions': [
1300         ['arm_neon==1', {
1301           'defines': [
1302             'USE_NEON'
1303           ],
1304         }],
1305         ['media_use_ffmpeg==1', {
1306           'dependencies': [
1307             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1308           ],
1309         }, {  # media_use_ffmpeg==0
1310           'sources!': [
1311             'ffmpeg/ffmpeg_common_unittest.cc',
1312             'filters/audio_decoder_unittest.cc',
1313             'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1314             'filters/ffmpeg_demuxer_unittest.cc',
1315             'filters/ffmpeg_glue_unittest.cc',
1316             'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1317           ],
1318         }],
1319         # Even if FFmpeg is enabled on Android we don't want these.
1320         # TODO(watk): Refactor tests that could be made to run on Android.
1321         ['media_use_ffmpeg==0 or OS=="android"', {
1322           'sources!': [
1323             'base/audio_video_metadata_extractor_unittest.cc',
1324             'base/container_names_unittest.cc',
1325             'base/media_file_checker_unittest.cc',
1326             'filters/audio_file_reader_unittest.cc',
1327             'filters/blocking_url_protocol_unittest.cc',
1328             'filters/ffmpeg_video_decoder_unittest.cc',
1329             'filters/in_memory_url_protocol_unittest.cc',
1330             'test/pipeline_integration_test.cc',
1331             'test/pipeline_integration_test_base.cc',
1332           ],
1333         }],
1334         ['media_use_libwebm==1', {
1335           'dependencies': [
1336             '<(DEPTH)/third_party/libwebm/libwebm.gyp:libwebm',
1337           ],
1338         }, {  # media_use_libwebm==0
1339           # Exclude the sources that depend on libwebm.
1340           'sources!': [
1341             'capture/webm_muxer_unittest.cc',
1342           ],
1343         }],
1345         ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_library" and win_use_allocator_shim==1)', {
1346           'conditions': [
1347             ['use_allocator!="none"', {
1348               'dependencies': [
1349                 '../base/allocator/allocator.gyp:allocator',
1350               ],
1351             }],
1352           ],
1353         }],
1354         ['OS=="android"', {
1355           'dependencies': [
1356             '../testing/android/native_test.gyp:native_test_native_code',
1357             'player_android',
1358           ],
1359         }],
1360         ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
1361           'sources': [
1362             'filters/h264_bitstream_buffer_unittest.cc',
1363           ],
1364         }],
1365         ['target_arch=="ia32" or target_arch=="x64"', {
1366           'sources': [
1367             'base/simd/convert_rgb_to_yuv_unittest.cc',
1368           ],
1369         }],
1370         ['proprietary_codecs==1', {
1371           'sources': [
1372             'cdm/cenc_utils_unittest.cc',
1373             'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1374             'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1375             'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
1376             'formats/common/stream_parser_test_base.cc',
1377             'formats/common/stream_parser_test_base.h',
1378             'formats/mp2t/es_adapter_video_unittest.cc',
1379             'formats/mp2t/es_parser_adts_unittest.cc',
1380             'formats/mp2t/es_parser_h264_unittest.cc',
1381             'formats/mp2t/es_parser_mpeg1audio_unittest.cc',
1382             'formats/mp2t/es_parser_test_base.cc',
1383             'formats/mp2t/es_parser_test_base.h',
1384             'formats/mp2t/mp2t_stream_parser_unittest.cc',
1385             'formats/mp2t/timestamp_unroller_unittest.cc',
1386             'formats/mp4/aac_unittest.cc',
1387             'formats/mp4/avc_unittest.cc',
1388             'formats/mp4/box_reader_unittest.cc',
1389             'formats/mp4/es_descriptor_unittest.cc',
1390             'formats/mp4/mp4_stream_parser_unittest.cc',
1391             'formats/mp4/sample_to_group_iterator_unittest.cc',
1392             'formats/mp4/track_run_iterator_unittest.cc',
1393             'formats/mpeg/adts_stream_parser_unittest.cc',
1394             'formats/mpeg/mpeg1_audio_stream_parser_unittest.cc',
1395           ],
1396         }],
1397         ['OS=="mac"', {
1398           'sources': [
1399             'capture/video/mac/video_capture_device_factory_mac_unittest.mm',
1400           ]
1401         }],
1402         ['use_x11==1', {
1403           'dependencies': [
1404             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1405           ],
1406         }],
1407       ],
1408     },
1409     {
1410       # GN version: //media:media_perftests
1411       'target_name': 'media_perftests',
1412       'type': '<(gtest_target_type)',
1413       'dependencies': [
1414         '../base/base.gyp:test_support_base',
1415         '../testing/gmock.gyp:gmock',
1416         '../testing/gtest.gyp:gtest',
1417         '../testing/perf/perf_test.gyp:perf_test',
1418         '../ui/gfx/gfx.gyp:gfx',
1419         '../ui/gfx/gfx.gyp:gfx_test_support',
1420         '../ui/gfx/gfx.gyp:gfx_geometry',
1421         'media',
1422         'media_test_support',
1423         'shared_memory_support',
1424       ],
1425       'sources': [
1426         'base/audio_bus_perftest.cc',
1427         'base/audio_converter_perftest.cc',
1428         'base/demuxer_perftest.cc',
1429         'base/run_all_perftests.cc',
1430         'base/sinc_resampler_perftest.cc',
1431         'base/vector_math_perftest.cc',
1432         'base/yuv_convert_perftest.cc',
1433         'test/pipeline_integration_perftest.cc',
1434         'test/pipeline_integration_test_base.cc',
1435       ],
1436       'conditions': [
1437         ['arm_neon==1', {
1438           'defines': [
1439             'USE_NEON'
1440           ],
1441         }],
1442         ['OS=="android"', {
1443           'dependencies': [
1444             '../testing/android/native_test.gyp:native_test_native_code',
1445             '../ui/gl/gl.gyp:gl',
1446           ],
1447         }],
1448         ['media_use_ffmpeg==1', {
1449           'dependencies': [
1450             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1451           ],
1452         }, {  # media_use_ffmpeg==0
1453           'sources!': [
1454             'base/demuxer_perftest.cc',
1455             'test/pipeline_integration_perftest.cc',
1456             'test/pipeline_integration_test_base.cc',
1457           ],
1458         }],
1459       ],
1460     },
1461     {
1462       # GN version: //media/audio:unittests
1463       # For including the sources and configs in multiple test targets.
1464       'target_name': 'audio_test_config',
1465       'type': 'none',
1466       'direct_dependent_settings': {
1467         'sources': [
1468           'audio/audio_input_controller_unittest.cc',
1469           'audio/audio_input_unittest.cc',
1470           'audio/audio_manager_factory_unittest.cc',
1471           'audio/audio_manager_unittest.cc',
1472           'audio/audio_output_controller_unittest.cc',
1473           'audio/audio_output_device_unittest.cc',
1474           'audio/audio_output_proxy_unittest.cc',
1475           'audio/audio_parameters_unittest.cc',
1476           'audio/audio_power_monitor_unittest.cc',
1477           'audio/fake_audio_worker_unittest.cc',
1478           'audio/simple_sources_unittest.cc',
1479           'audio/virtual_audio_input_stream_unittest.cc',
1480           'audio/virtual_audio_output_stream_unittest.cc',
1481         ],
1482         'conditions': [
1483           # TODO(wolenetz): Fix size_t to int truncations in win64. See
1484           # http://crbug.com/171009
1485           ['OS=="win" and target_arch=="x64"', {
1486             'msvs_disabled_warnings': [ 4267, ],
1487           }],
1488           ['OS=="android"', {
1489             'sources': [
1490               'audio/android/audio_android_unittest.cc',
1491             ],
1492           }, {
1493             'sources': [
1494               'audio/audio_input_volume_unittest.cc',
1495             ],
1496           }],
1497           ['OS=="mac"', {
1498             'sources': [
1499               'audio/mac/audio_auhal_mac_unittest.cc',
1500               'audio/mac/audio_device_listener_mac_unittest.cc',
1501               'audio/mac/audio_low_latency_input_mac_unittest.cc',
1502             ],
1503           }],
1504           ['chromeos==1', {
1505             'sources': [
1506               'audio/sounds/audio_stream_handler_unittest.cc',
1507               'audio/sounds/sounds_manager_unittest.cc',
1508               'audio/sounds/test_data.cc',
1509               'audio/sounds/test_data.h',
1510               'audio/sounds/wav_audio_handler_unittest.cc',
1511             ],
1512           }],
1513           ['OS=="win"', {
1514             'sources': [
1515               'audio/win/audio_device_listener_win_unittest.cc',
1516               'audio/win/audio_low_latency_input_win_unittest.cc',
1517               'audio/win/audio_low_latency_output_win_unittest.cc',
1518               'audio/win/audio_output_win_unittest.cc',
1519               'audio/win/core_audio_util_win_unittest.cc',
1520             ],
1521           }],
1522           ['use_alsa==1', {
1523             'sources': [
1524               'audio/alsa/alsa_output_unittest.cc',
1525               'audio/audio_low_latency_input_output_unittest.cc',
1526             ],
1527             'defines': [
1528               'USE_ALSA',
1529             ],
1530           }],
1531           ['use_pulseaudio==1', {
1532             'defines': [
1533               'USE_PULSEAUDIO',
1534             ],
1535           }],
1536           ['use_cras==1', {
1537             'sources': [
1538               'audio/cras/cras_input_unittest.cc',
1539               'audio/cras/cras_unified_unittest.cc',
1540             ],
1541             'defines': [
1542               'USE_CRAS',
1543             ],
1544           }],
1545         ],
1546       },
1547     },
1548     {
1549       # GN version: //media:audio_unittests
1550       # For running the subset of media_unittests that might require audio
1551       # hardware separately on GPU bots. media_unittests includes these too.
1552       'target_name': 'audio_unittests',
1553       'type': '<(gtest_target_type)',
1554       'dependencies': [
1555         'audio_test_config',
1556         'media_test_support',
1557         '../base/base.gyp:test_support_base',
1558         '../testing/gmock.gyp:gmock',
1559         '../testing/gtest.gyp:gtest',
1560         '../ui/gfx/gfx.gyp:gfx_test_support',
1561         '../url/url.gyp:url_lib',
1562       ],
1563       'sources': [
1564         'base/run_all_unittests.cc',
1565       ],
1566     },
1567     {
1568       # GN versions (it is split apart): //media:test_support,
1569       # //media/base:test_support, and //media/audio:test_support
1570       'target_name': 'media_test_support',
1571       'type': 'static_library',
1572       'dependencies': [
1573         'media',
1574         'shared_memory_support',
1575         '../base/base.gyp:base',
1576         '../skia/skia.gyp:skia',
1577         '../testing/gmock.gyp:gmock',
1578         '../testing/gtest.gyp:gtest',
1579       ],
1580       'sources': [
1581         'audio/audio_unittest_util.cc',
1582         'audio/audio_unittest_util.h',
1583         'audio/mock_audio_manager.cc',
1584         'audio/mock_audio_manager.h',
1585         'audio/mock_audio_source_callback.cc',
1586         'audio/mock_audio_source_callback.h',
1587         'audio/test_audio_input_controller_factory.cc',
1588         'audio/test_audio_input_controller_factory.h',
1589         'base/fake_audio_render_callback.cc',
1590         'base/fake_audio_render_callback.h',
1591         'base/fake_audio_renderer_sink.cc',
1592         'base/fake_audio_renderer_sink.h',
1593         'base/fake_demuxer_stream.cc',
1594         'base/fake_demuxer_stream.h',
1595         'base/fake_output_device.cc',
1596         'base/fake_output_device.h',
1597         'base/fake_text_track_stream.cc',
1598         'base/fake_text_track_stream.h',
1599         'base/gmock_callback_support.h',
1600         'base/mock_audio_renderer_sink.cc',
1601         'base/mock_audio_renderer_sink.h',
1602         'base/mock_demuxer_host.cc',
1603         'base/mock_demuxer_host.h',
1604         'base/mock_filters.cc',
1605         'base/mock_filters.h',
1606         'base/mock_media_log.cc',
1607         'base/mock_media_log.h',
1608         'base/test_data_util.cc',
1609         'base/test_data_util.h',
1610         'base/test_helpers.cc',
1611         'base/test_helpers.h',
1612         'renderers/mock_gpu_video_accelerator_factories.cc',
1613         'renderers/mock_gpu_video_accelerator_factories.h',
1614         'video/mock_video_decode_accelerator.cc',
1615         'video/mock_video_decode_accelerator.h',
1616       ],
1617     },
1618     {
1619       # Minimal target for NaCl and other renderer side media clients which
1620       # only need to send audio data across the shared memory to the browser
1621       # process.
1622       # GN version: //media:shared_memory_support
1623       'target_name': 'shared_memory_support',
1624       'type': '<(component)',
1625       'dependencies': [
1626         '../base/base.gyp:base',
1627       ],
1628       'defines': [
1629         'MEDIA_IMPLEMENTATION',
1630       ],
1631       'include_dirs': [
1632         '..',
1633       ],
1634       'includes': [
1635         'shared_memory_support.gypi',
1636       ],
1637       'sources': [
1638         '<@(shared_memory_support_sources)',
1639       ],
1640       'conditions': [
1641         ['arm_neon==1', {
1642           'defines': [
1643             'USE_NEON'
1644           ],
1645         }],
1646       ],
1647     },
1648   ],
1649   'conditions': [
1650     ['target_arch=="ia32" or target_arch=="x64"', {
1651       'targets': [
1652        {
1653           'target_name': 'media_asm',
1654           'type': 'static_library',
1655           'sources': [
1656             'base/simd/convert_rgb_to_yuv_ssse3.asm',
1657             'base/simd/convert_yuv_to_rgb_sse.asm',
1658             'base/simd/convert_yuva_to_argb_mmx.asm',
1659             'base/simd/empty_register_state_mmx.asm',
1660             'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1661             'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1662             'base/simd/scale_yuv_to_rgb_mmx.asm',
1663             'base/simd/scale_yuv_to_rgb_sse.asm',
1664           ],
1665           'conditions': [
1666             ['component=="shared_library"', {
1667               'variables': {
1668                 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1669               },
1670             }],
1671             ['target_arch=="x64"', {
1672               # Source files optimized for X64 systems.
1673               'sources': [
1674                 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1675                 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1676               ],
1677               'variables': {
1678                 'yasm_flags': ['-DARCH_X86_64'],
1679               },
1680             }],
1681             ['OS=="mac" or OS=="ios"', {
1682               'variables': {
1683                 'yasm_flags': [
1684                   '-DPREFIX',
1685                   '-DMACHO',
1686                 ],
1687               },
1688               'sources': [
1689                 # XCode doesn't want to link a pure assembly target and will
1690                 # fail to link when it creates an empty file list.  So add a
1691                 # dummy file keep the linker happy.  See http://crbug.com/157073
1692                 'base/simd/xcode_hack.c',
1693               ],
1694             }],
1695             ['os_posix==1 and OS!="mac"', {
1696               'variables': {
1697                 'conditions': [
1698                   ['target_arch=="ia32"', {
1699                     'yasm_flags': [
1700                       '-DARCH_X86_32',
1701                       '-DELF',
1702                     ],
1703                   }, { # target_arch=="x64"
1704                     'yasm_flags': [
1705                       '-DARCH_X86_64',
1706                       '-DELF',
1707                       '-DPIC',
1708                     ],
1709                   }],
1710                 ],
1711               },
1712             }],
1713           ],
1714           'variables': {
1715             'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1716             'yasm_flags': [
1717               '-DCHROMIUM',
1718               # In addition to the same path as source asm, let yasm %include
1719               # search path be relative to src/ per Chromium policy.
1720               '-I..',
1721             ],
1722             'yasm_includes': [
1723               '../third_party/x86inc/x86inc.asm',
1724               'base/simd/convert_rgb_to_yuv_ssse3.inc',
1725               'base/simd/convert_yuv_to_rgb_mmx.inc',
1726               'base/simd/convert_yuva_to_argb_mmx.inc',
1727               'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1728               'base/simd/media_export.asm',
1729               'base/simd/scale_yuv_to_rgb_mmx.inc',
1730             ],
1731           },
1732           'msvs_2010_disable_uldi_when_referenced': 1,
1733           'includes': [
1734             '../third_party/yasm/yasm_compile.gypi',
1735           ],
1736         },
1737       ], # targets
1738     }],
1739     ['OS=="android"', {
1740       'targets': [
1741         {
1742           # TODO(GN)
1743           'target_name': 'media_unittests_apk',
1744           'type': 'none',
1745           'dependencies': [
1746             'media_java',
1747             'media_unittests',
1748           ],
1749           'variables': {
1750             'test_suite_name': 'media_unittests',
1751             'isolate_file': 'media_unittests.isolate',
1752           },
1753           'includes': ['../build/apk_test.gypi'],
1754         },
1755         {
1756           # TODO(GN)
1757           'target_name': 'media_perftests_apk',
1758           'type': 'none',
1759           'dependencies': [
1760             'media_java',
1761             'media_perftests',
1762           ],
1763           'variables': {
1764             'test_suite_name': 'media_perftests',
1765             'isolate_file': 'media_perftests.isolate',
1766           },
1767           'includes': ['../build/apk_test.gypi'],
1768         },
1769         {
1770           # GN: //media/base/android:media_android_jni_headers
1771           'target_name': 'media_android_jni_headers',
1772           'type': 'none',
1773           'sources': [
1774             'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1775             'base/android/java/src/org/chromium/media/AudioRecordInput.java',
1776             'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1777             'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1778             'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1779             'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1780             'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1781           ],
1782           'variables': {
1783             'jni_gen_package': 'media',
1784           },
1785           'includes': ['../build/jni_generator.gypi'],
1786         },
1787         {
1788           # GN: //media/base/android:video_capture_android_jni_headers
1789           'target_name': 'video_capture_android_jni_headers',
1790           'type': 'none',
1791           'sources': [
1792             'base/android/java/src/org/chromium/media/VideoCapture.java',
1793             'base/android/java/src/org/chromium/media/VideoCaptureFactory.java',
1794           ],
1795           'variables': {
1796             'jni_gen_package': 'media',
1797           },
1798           'includes': ['../build/jni_generator.gypi'],
1799         },
1800         {
1801           # GN: //media/base/android:android
1802           'target_name': 'player_android',
1803           'type': 'static_library',
1804           'sources': [
1805             'base/android/access_unit_queue.cc',
1806             'base/android/access_unit_queue.h',
1807             'base/android/audio_decoder_job.cc',
1808             'base/android/audio_decoder_job.h',
1809             'base/android/browser_cdm_factory_android.cc',
1810             'base/android/browser_cdm_factory_android.h',
1811             'base/android/demuxer_android.h',
1812             'base/android/demuxer_stream_player_params.cc',
1813             'base/android/demuxer_stream_player_params.h',
1814             'base/android/media_client_android.cc',
1815             'base/android/media_client_android.h',
1816             'base/android/media_codec_audio_decoder.cc',
1817             'base/android/media_codec_audio_decoder.h',
1818             'base/android/media_codec_bridge.cc',
1819             'base/android/media_codec_bridge.h',
1820             'base/android/media_codec_decoder.cc',
1821             'base/android/media_codec_decoder.h',
1822             'base/android/media_codec_player.cc',
1823             'base/android/media_codec_player.h',
1824             'base/android/media_codec_video_decoder.cc',
1825             'base/android/media_codec_video_decoder.h',
1826             'base/android/media_common_android.h',
1827             'base/android/media_decoder_job.cc',
1828             'base/android/media_decoder_job.h',
1829             'base/android/media_drm_bridge.cc',
1830             'base/android/media_drm_bridge.h',
1831             'base/android/media_drm_bridge_delegate.cc',
1832             'base/android/media_drm_bridge_delegate.h',
1833             'base/android/media_jni_registrar.cc',
1834             'base/android/media_jni_registrar.h',
1835             'base/android/media_player_android.cc',
1836             'base/android/media_player_android.h',
1837             'base/android/media_player_bridge.cc',
1838             'base/android/media_player_bridge.h',
1839             'base/android/media_player_listener.cc',
1840             'base/android/media_player_listener.h',
1841             'base/android/media_player_manager.h',
1842             'base/android/media_resource_getter.cc',
1843             'base/android/media_resource_getter.h',
1844             'base/android/media_source_player.cc',
1845             'base/android/media_source_player.h',
1846             'base/android/media_url_interceptor.h',
1847             'base/android/video_decoder_job.cc',
1848             'base/android/video_decoder_job.h',
1849             'base/android/webaudio_media_codec_bridge.cc',
1850             'base/android/webaudio_media_codec_bridge.h',
1851             'base/android/webaudio_media_codec_info.h',
1852           ],
1853           'dependencies': [
1854             '../base/base.gyp:base',
1855             '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1856             '../ui/gl/gl.gyp:gl',
1857             '../url/url.gyp:url_lib',
1858             'media_android_jni_headers',
1859           ],
1860           'include_dirs': [
1861             # Needed by media_drm_bridge.cc.
1862             '<(SHARED_INTERMEDIATE_DIR)',
1863           ],
1864           'defines': [
1865             'MEDIA_IMPLEMENTATION',
1866           ],
1867         },
1868         {
1869           # GN: //media/base/android:media_java
1870           'target_name': 'media_java',
1871           'type': 'none',
1872           'dependencies': [
1873             '../base/base.gyp:base',
1874             'media_android_captureapitype',
1875             'media_android_imageformat',
1876           ],
1877           'export_dependent_settings': [
1878             '../base/base.gyp:base',
1879           ],
1880           'variables': {
1881             'java_in_dir': 'base/android/java',
1882           },
1883           'includes': ['../build/java.gypi'],
1884         },
1885         {
1886           # GN: //media/base/android:media_android_captureapitype
1887           'target_name': 'media_android_captureapitype',
1888           'type': 'none',
1889           'variables': {
1890             'source_file': 'capture/video/video_capture_device.h',
1891           },
1892           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1893         },
1894         {
1895           # GN: //media/base/android:media_android_imageformat
1896           'target_name': 'media_android_imageformat',
1897           'type': 'none',
1898           'variables': {
1899             'source_file': 'capture/video/android/video_capture_device_android.h',
1900           },
1901           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1902         },
1903       ],
1904     }],
1905     ['media_use_ffmpeg==1', {
1906       'targets': [
1907         {
1908           # GN version: //media:ffmpeg_regression_tests
1909           'target_name': 'ffmpeg_regression_tests',
1910           'type': 'executable',
1911           'dependencies': [
1912             '../base/base.gyp:test_support_base',
1913             '../testing/gmock.gyp:gmock',
1914             '../testing/gtest.gyp:gtest',
1915             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1916             '../ui/gfx/gfx.gyp:gfx_geometry',
1917             'media',
1918             'media_test_support',
1919           ],
1920           'sources': [
1921             'base/run_all_unittests.cc',
1922             'ffmpeg/ffmpeg_regression_tests.cc',
1923             'test/pipeline_integration_test_base.cc',
1924           ],
1925           'conditions': [
1926             ['os_posix==1 and OS!="mac"', {
1927               'conditions': [
1928                 ['use_allocator!="none"', {
1929                   'dependencies': [
1930                     '../base/allocator/allocator.gyp:allocator',
1931                   ],
1932                 }],
1933               ],
1934             }],
1935           ],
1936         },
1937       ],
1938     }],
1939     ['OS=="ios"', {
1940       'targets': [
1941         {
1942           # Minimal media component for media/cast on iOS.
1943           # GN version: //media:media_for_cast_ios
1944           'target_name': 'media_for_cast_ios',
1945           'type': '<(component)',
1946           'dependencies': [
1947             '../base/base.gyp:base',
1948             '../gpu/gpu.gyp:command_buffer_common',
1949             '../ui/gfx/gfx.gyp:gfx_geometry',
1950             'shared_memory_support',
1951           ],
1952           'defines': [
1953             'MEDIA_DISABLE_FFMPEG',
1954             'MEDIA_DISABLE_LIBVPX',
1955             'MEDIA_FOR_CAST_IOS',
1956             'MEDIA_IMPLEMENTATION',
1957           ],
1958           'direct_dependent_settings': {
1959             'defines': [
1960               'MEDIA_DISABLE_FFMPEG',
1961               'MEDIA_DISABLE_LIBVPX',
1962             ],
1963             'include_dirs': [
1964               '..',
1965             ],
1966           },
1967           'include_dirs': [
1968             '..',
1969           ],
1970           'sources': [
1971             'base/mac/coremedia_glue.h',
1972             'base/mac/coremedia_glue.mm',
1973             'base/mac/corevideo_glue.h',
1974             'base/mac/video_frame_mac.cc',
1975             'base/mac/video_frame_mac.h',
1976             'base/mac/videotoolbox_glue.h',
1977             'base/mac/videotoolbox_glue.mm',
1978             'base/simd/convert_rgb_to_yuv.h',
1979             'base/simd/convert_rgb_to_yuv_c.cc',
1980             'base/simd/convert_yuv_to_rgb.h',
1981             'base/simd/convert_yuv_to_rgb_c.cc',
1982             'base/simd/filter_yuv.h',
1983             'base/simd/filter_yuv_c.cc',
1984             'base/video_frame.cc',
1985             'base/video_frame.h',
1986             'base/video_frame_metadata.cc',
1987             'base/video_frame_metadata.h',
1988             'base/video_types.cc',
1989             'base/video_types.h',
1990             'base/video_util.cc',
1991             'base/video_util.h',
1992             'base/yuv_convert.cc',
1993             'base/yuv_convert.h',
1994           ],
1995           'link_settings': {
1996             'libraries': [
1997               '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
1998             ],
1999           },
2000           'conditions': [
2001             ['arm_neon==1', {
2002               'defines': [
2003                 'USE_NEON'
2004               ],
2005             }],
2006           ],  # conditions
2007           'target_conditions': [
2008             ['OS == "ios" and _toolset != "host"', {
2009               'sources/': [
2010                 # Pull in specific Mac files for iOS (which have been filtered
2011                 # out by file name rules).
2012                 ['include', '^base/mac/coremedia_glue\\.h$'],
2013                 ['include', '^base/mac/coremedia_glue\\.mm$'],
2014                 ['include', '^base/mac/corevideo_glue\\.h$'],
2015                 ['include', '^base/mac/videotoolbox_glue\\.h$'],
2016                 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
2017                 ['include', '^base/mac/video_frame_mac\\.h$'],
2018                 ['include', '^base/mac/video_frame_mac\\.cc$'],
2019               ],
2020             }],
2021           ],  # target_conditions
2022         },
2023       ],
2024     }],
2025     ['test_isolation_mode != "noop"', {
2026       'targets': [
2027         {
2028           'target_name': 'media_unittests_run',
2029           'type': 'none',
2030           'dependencies': [
2031             'media_unittests',
2032           ],
2033           'includes': [
2034             '../build/isolate.gypi',
2035           ],
2036           'sources': [
2037             'media_unittests.isolate',
2038           ],
2039         },
2040         {
2041           'target_name': 'audio_unittests_run',
2042           'type': 'none',
2043           'dependencies': [
2044             'audio_unittests',
2045           ],
2046           'includes': [
2047             '../build/isolate.gypi',
2048           ],
2049           'sources': [
2050             'audio_unittests.isolate',
2051           ],
2052           'conditions': [
2053             ['use_x11==1', {
2054               'dependencies': [
2055                 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
2056               ],
2057             }],
2058           ],
2059         },
2060       ],
2061     }],
2062   ],