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