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