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.
8 # Override to dynamically link the cras (ChromeOS audio) library.
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,
15 ['OS=="android" or OS=="ios"', {
16 # Android and iOS don't use ffmpeg.
17 'media_use_ffmpeg%': 0,
18 # Android and iOS don't use libvpx.
19 'media_use_libvpx%': 0,
20 }, { # 'OS!="android" and OS!="ios"'
21 'media_use_ffmpeg%': 1,
22 'media_use_libvpx%': 1,
25 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', {
30 ['os_posix==1 and OS!="mac" and OS!="ios" and OS!="android" and chromeos!=1', {
39 'target_name': 'media',
40 'type': '<(component)',
42 '../base/base.gyp:base',
43 '../crypto/crypto.gyp:crypto',
44 '../skia/skia.gyp:skia',
45 '../third_party/opus/opus.gyp:opus',
47 '../url/url.gyp:url_lib',
50 'MEDIA_IMPLEMENTATION',
56 'audio/agc_audio_stream.h',
57 'audio/android/audio_manager_android.cc',
58 'audio/android/audio_manager_android.h',
59 'audio/android/opensles_input.cc',
60 'audio/android/opensles_input.h',
61 'audio/android/opensles_output.cc',
62 'audio/android/opensles_output.h',
63 'audio/audio_buffers_state.cc',
64 'audio/audio_buffers_state.h',
65 'audio/audio_device_name.cc',
66 'audio/audio_device_name.h',
67 'audio/audio_device_thread.cc',
68 'audio/audio_device_thread.h',
69 'audio/audio_input_controller.cc',
70 'audio/audio_input_controller.h',
71 'audio/audio_input_device.cc',
72 'audio/audio_input_device.h',
73 'audio/audio_input_ipc.cc',
74 'audio/audio_input_ipc.h',
76 'audio/audio_manager.cc',
77 'audio/audio_manager.h',
78 'audio/audio_manager_base.cc',
79 'audio/audio_manager_base.h',
80 'audio/audio_output_controller.cc',
81 'audio/audio_output_controller.h',
82 'audio/audio_output_device.cc',
83 'audio/audio_output_device.h',
84 'audio/audio_output_dispatcher.cc',
85 'audio/audio_output_dispatcher.h',
86 'audio/audio_output_dispatcher_impl.cc',
87 'audio/audio_output_dispatcher_impl.h',
88 'audio/audio_output_ipc.cc',
89 'audio/audio_output_ipc.h',
90 'audio/audio_output_proxy.cc',
91 'audio/audio_output_proxy.h',
92 'audio/audio_output_resampler.cc',
93 'audio/audio_output_resampler.h',
94 'audio/audio_power_monitor.cc',
95 'audio/audio_power_monitor.h',
96 'audio/audio_source_diverter.h',
97 'audio/audio_util.cc',
99 'audio/clockless_audio_sink.cc',
100 'audio/clockless_audio_sink.h',
101 'audio/cras/audio_manager_cras.cc',
102 'audio/cras/audio_manager_cras.h',
103 'audio/cras/cras_input.cc',
104 'audio/cras/cras_input.h',
105 'audio/cras/cras_unified.cc',
106 'audio/cras/cras_unified.h',
107 'audio/fake_audio_consumer.cc',
108 'audio/fake_audio_consumer.h',
109 'audio/fake_audio_input_stream.cc',
110 'audio/fake_audio_input_stream.h',
111 'audio/fake_audio_output_stream.cc',
112 'audio/fake_audio_output_stream.h',
113 'audio/ios/audio_manager_ios.h',
114 'audio/ios/audio_manager_ios.mm',
115 'audio/ios/audio_session_util_ios.h',
116 'audio/ios/audio_session_util_ios.mm',
117 'audio/linux/alsa_input.cc',
118 'audio/linux/alsa_input.h',
119 'audio/linux/alsa_output.cc',
120 'audio/linux/alsa_output.h',
121 'audio/linux/alsa_util.cc',
122 'audio/linux/alsa_util.h',
123 'audio/linux/alsa_wrapper.cc',
124 'audio/linux/alsa_wrapper.h',
125 'audio/linux/audio_manager_linux.cc',
126 'audio/linux/audio_manager_linux.h',
127 'audio/mac/aggregate_device_manager.cc',
128 'audio/mac/aggregate_device_manager.h',
129 'audio/mac/audio_auhal_mac.cc',
130 'audio/mac/audio_auhal_mac.h',
131 'audio/mac/audio_device_listener_mac.cc',
132 'audio/mac/audio_device_listener_mac.h',
133 'audio/mac/audio_input_mac.cc',
134 'audio/mac/audio_input_mac.h',
135 'audio/mac/audio_low_latency_input_mac.cc',
136 'audio/mac/audio_low_latency_input_mac.h',
137 'audio/mac/audio_low_latency_output_mac.cc',
138 'audio/mac/audio_low_latency_output_mac.h',
139 'audio/mac/audio_manager_mac.cc',
140 'audio/mac/audio_manager_mac.h',
141 'audio/mac/audio_synchronized_mac.cc',
142 'audio/mac/audio_synchronized_mac.h',
143 'audio/mac/audio_unified_mac.cc',
144 'audio/mac/audio_unified_mac.h',
145 'audio/null_audio_sink.cc',
146 'audio/null_audio_sink.h',
147 'audio/openbsd/audio_manager_openbsd.cc',
148 'audio/openbsd/audio_manager_openbsd.h',
149 'audio/pulse/audio_manager_pulse.cc',
150 'audio/pulse/audio_manager_pulse.h',
151 'audio/pulse/pulse_input.cc',
152 'audio/pulse/pulse_input.h',
153 'audio/pulse/pulse_output.cc',
154 'audio/pulse/pulse_output.h',
155 'audio/pulse/pulse_unified.cc',
156 'audio/pulse/pulse_unified.h',
157 'audio/pulse/pulse_util.cc',
158 'audio/pulse/pulse_util.h',
159 'audio/sample_rates.cc',
160 'audio/sample_rates.h',
161 'audio/scoped_loop_observer.cc',
162 'audio/scoped_loop_observer.h',
163 'audio/simple_sources.cc',
164 'audio/simple_sources.h',
165 'audio/virtual_audio_input_stream.cc',
166 'audio/virtual_audio_input_stream.h',
167 'audio/virtual_audio_output_stream.cc',
168 'audio/virtual_audio_output_stream.h',
169 'audio/win/audio_device_listener_win.cc',
170 'audio/win/audio_device_listener_win.h',
171 'audio/win/audio_low_latency_input_win.cc',
172 'audio/win/audio_low_latency_input_win.h',
173 'audio/win/audio_low_latency_output_win.cc',
174 'audio/win/audio_low_latency_output_win.h',
175 'audio/win/audio_manager_win.cc',
176 'audio/win/audio_manager_win.h',
177 'audio/win/audio_unified_win.cc',
178 'audio/win/audio_unified_win.h',
179 'audio/win/avrt_wrapper_win.cc',
180 'audio/win/avrt_wrapper_win.h',
181 'audio/win/core_audio_util_win.cc',
182 'audio/win/core_audio_util_win.h',
183 'audio/win/device_enumeration_win.cc',
184 'audio/win/device_enumeration_win.h',
185 'audio/win/wavein_input_win.cc',
186 'audio/win/wavein_input_win.h',
187 'audio/win/waveout_output_win.cc',
188 'audio/win/waveout_output_win.h',
189 'base/android/demuxer_stream_player_params.cc',
190 'base/android/demuxer_stream_player_params.h',
191 'base/android/media_player_manager.h',
192 'base/android/media_resource_getter.cc',
193 'base/android/media_resource_getter.h',
194 'base/audio_buffer.cc',
195 'base/audio_buffer.h',
196 'base/audio_buffer_queue.cc',
197 'base/audio_buffer_queue.h',
198 'base/audio_capturer_source.h',
199 'base/audio_converter.cc',
200 'base/audio_converter.h',
201 'base/audio_decoder.cc',
202 'base/audio_decoder.h',
203 'base/audio_decoder_config.cc',
204 'base/audio_decoder_config.h',
205 'base/audio_fifo.cc',
207 'base/audio_hardware_config.cc',
208 'base/audio_hardware_config.h',
209 'base/audio_hash.cc',
211 'base/audio_pull_fifo.cc',
212 'base/audio_pull_fifo.h',
213 'base/audio_renderer.cc',
214 'base/audio_renderer.h',
215 'base/audio_renderer_mixer.cc',
216 'base/audio_renderer_mixer.h',
217 'base/audio_renderer_mixer_input.cc',
218 'base/audio_renderer_mixer_input.h',
219 'base/audio_renderer_sink.h',
220 'base/audio_splicer.cc',
221 'base/audio_splicer.h',
222 'base/audio_timestamp_helper.cc',
223 'base/audio_timestamp_helper.h',
224 'base/bind_to_loop.h',
225 'base/bit_reader.cc',
227 'base/bitstream_buffer.h',
229 'base/byte_queue.cc',
231 'base/channel_mixer.cc',
232 'base/channel_mixer.h',
235 'base/container_names.cc',
236 'base/container_names.h',
237 'base/data_buffer.cc',
238 'base/data_buffer.h',
239 'base/data_source.cc',
240 'base/data_source.h',
241 'base/decoder_buffer.cc',
242 'base/decoder_buffer.h',
243 'base/decoder_buffer_queue.cc',
244 'base/decoder_buffer_queue.h',
245 'base/decrypt_config.cc',
246 'base/decrypt_config.h',
251 'base/demuxer_stream.cc',
252 'base/demuxer_stream.h',
255 'base/filter_collection.cc',
256 'base/filter_collection.h',
257 'base/keyboard_event_counter.cc',
258 'base/keyboard_event_counter.h',
261 'base/media_file_checker.cc',
262 'base/media_file_checker.h',
263 'base/media_keys.cc',
267 'base/media_log_event.h',
268 'base/media_posix.cc',
269 'base/media_switches.cc',
270 'base/media_switches.h',
272 'base/multi_channel_resampler.cc',
273 'base/multi_channel_resampler.h',
276 'base/pipeline_status.cc',
277 'base/pipeline_status.h',
280 'base/sample_format.cc',
281 'base/sample_format.h',
282 'base/scoped_histogram_timer.h',
283 'base/seekable_buffer.cc',
284 'base/seekable_buffer.h',
285 'base/serial_runner.cc',
286 'base/serial_runner.h',
287 'base/simd/convert_rgb_to_yuv.h',
288 'base/simd/convert_rgb_to_yuv_c.cc',
289 'base/simd/convert_yuv_to_rgb.h',
290 'base/simd/convert_yuv_to_rgb_c.cc',
291 'base/simd/filter_yuv.h',
292 'base/simd/filter_yuv_c.cc',
293 'base/simd/yuv_to_rgb_table.cc',
294 'base/simd/yuv_to_rgb_table.h',
295 'base/sinc_resampler.cc',
296 'base/sinc_resampler.h',
297 'base/stream_parser.cc',
298 'base/stream_parser.h',
299 'base/stream_parser_buffer.cc',
300 'base/stream_parser_buffer.h',
302 'base/user_input_monitor.cc',
303 'base/user_input_monitor.h',
304 'base/user_input_monitor_linux.cc',
305 'base/user_input_monitor_mac.cc',
306 'base/user_input_monitor_win.cc',
307 'base/video_decoder.cc',
308 'base/video_decoder.h',
309 'base/video_decoder_config.cc',
310 'base/video_decoder_config.h',
311 'base/video_frame.cc',
312 'base/video_frame.h',
313 'base/video_renderer.cc',
314 'base/video_renderer.h',
315 'base/video_util.cc',
317 'base/yuv_convert.cc',
318 'base/yuv_convert.h',
319 'cdm/aes_decryptor.cc',
320 'cdm/aes_decryptor.h',
321 'ffmpeg/ffmpeg_common.cc',
322 'ffmpeg/ffmpeg_common.h',
323 'filters/audio_decoder_selector.cc',
324 'filters/audio_decoder_selector.h',
325 'filters/audio_file_reader.cc',
326 'filters/audio_file_reader.h',
327 'filters/audio_renderer_algorithm.cc',
328 'filters/audio_renderer_algorithm.h',
329 'filters/audio_renderer_impl.cc',
330 'filters/audio_renderer_impl.h',
331 'filters/blocking_url_protocol.cc',
332 'filters/blocking_url_protocol.h',
333 'filters/chunk_demuxer.cc',
334 'filters/chunk_demuxer.h',
335 'filters/decrypting_audio_decoder.cc',
336 'filters/decrypting_audio_decoder.h',
337 'filters/decrypting_demuxer_stream.cc',
338 'filters/decrypting_demuxer_stream.h',
339 'filters/decrypting_video_decoder.cc',
340 'filters/decrypting_video_decoder.h',
341 'filters/ffmpeg_audio_decoder.cc',
342 'filters/ffmpeg_audio_decoder.h',
343 'filters/ffmpeg_demuxer.cc',
344 'filters/ffmpeg_demuxer.h',
345 'filters/ffmpeg_glue.cc',
346 'filters/ffmpeg_glue.h',
347 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
348 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
349 'filters/ffmpeg_video_decoder.cc',
350 'filters/ffmpeg_video_decoder.h',
351 'filters/file_data_source.cc',
352 'filters/file_data_source.h',
353 'filters/gpu_video_accelerator_factories.cc',
354 'filters/gpu_video_accelerator_factories.h',
355 'filters/gpu_video_decoder.cc',
356 'filters/gpu_video_decoder.h',
357 'filters/h264_to_annex_b_bitstream_converter.cc',
358 'filters/h264_to_annex_b_bitstream_converter.h',
359 'filters/in_memory_url_protocol.cc',
360 'filters/in_memory_url_protocol.h',
361 'filters/opus_audio_decoder.cc',
362 'filters/opus_audio_decoder.h',
363 'filters/skcanvas_video_renderer.cc',
364 'filters/skcanvas_video_renderer.h',
365 'filters/source_buffer_stream.cc',
366 'filters/source_buffer_stream.h',
367 'filters/stream_parser_factory.cc',
368 'filters/stream_parser_factory.h',
369 'filters/video_decoder_selector.cc',
370 'filters/video_decoder_selector.h',
371 'filters/video_frame_stream.cc',
372 'filters/video_frame_stream.h',
373 'filters/video_renderer_base.cc',
374 'filters/video_renderer_base.h',
375 'filters/vpx_video_decoder.cc',
376 'filters/vpx_video_decoder.h',
377 'filters/wsola_internals.cc',
378 'filters/wsola_internals.h',
379 'midi/midi_manager.cc',
380 'midi/midi_manager.h',
381 'midi/midi_manager_mac.cc',
382 'midi/midi_manager_mac.h',
383 'midi/midi_port_info.cc',
384 'midi/midi_port_info.h',
385 'video/capture/android/video_capture_device_android.cc',
386 'video/capture/android/video_capture_device_android.h',
387 'video/capture/fake_video_capture_device.cc',
388 'video/capture/fake_video_capture_device.h',
389 'video/capture/linux/video_capture_device_linux.cc',
390 'video/capture/linux/video_capture_device_linux.h',
391 'video/capture/mac/video_capture_device_mac.h',
392 'video/capture/mac/video_capture_device_mac.mm',
393 'video/capture/mac/video_capture_device_qtkit_mac.h',
394 'video/capture/mac/video_capture_device_qtkit_mac.mm',
395 'video/capture/video_capture.h',
396 'video/capture/video_capture_device.cc',
397 'video/capture/video_capture_device.h',
398 'video/capture/video_capture_device_dummy.cc',
399 'video/capture/video_capture_device_dummy.h',
400 'video/capture/video_capture_proxy.cc',
401 'video/capture/video_capture_proxy.h',
402 'video/capture/video_capture_types.h',
403 'video/capture/win/capability_list_win.cc',
404 'video/capture/win/capability_list_win.h',
405 'video/capture/win/filter_base_win.cc',
406 'video/capture/win/filter_base_win.h',
407 'video/capture/win/pin_base_win.cc',
408 'video/capture/win/pin_base_win.h',
409 'video/capture/win/sink_filter_observer_win.h',
410 'video/capture/win/sink_filter_win.cc',
411 'video/capture/win/sink_filter_win.h',
412 'video/capture/win/sink_input_pin_win.cc',
413 'video/capture/win/sink_input_pin_win.h',
414 'video/capture/win/video_capture_device_mf_win.cc',
415 'video/capture/win/video_capture_device_mf_win.h',
416 'video/capture/win/video_capture_device_win.cc',
417 'video/capture/win/video_capture_device_win.h',
420 'video/video_decode_accelerator.cc',
421 'video/video_decode_accelerator.h',
422 'video/video_encode_accelerator.cc',
423 'video/video_encode_accelerator.h',
424 'webm/webm_audio_client.cc',
425 'webm/webm_audio_client.h',
426 'webm/webm_cluster_parser.cc',
427 'webm/webm_cluster_parser.h',
428 'webm/webm_constants.cc',
429 'webm/webm_constants.h',
430 'webm/webm_content_encodings.cc',
431 'webm/webm_content_encodings.h',
432 'webm/webm_content_encodings_client.cc',
433 'webm/webm_content_encodings_client.h',
434 'webm/webm_crypto_helpers.cc',
435 'webm/webm_crypto_helpers.h',
436 'webm/webm_info_parser.cc',
437 'webm/webm_info_parser.h',
438 'webm/webm_parser.cc',
439 'webm/webm_parser.h',
440 'webm/webm_stream_parser.cc',
441 'webm/webm_stream_parser.h',
442 'webm/webm_tracks_parser.cc',
443 'webm/webm_tracks_parser.h',
444 'webm/webm_video_client.cc',
445 'webm/webm_video_client.h',
446 'webm/webm_webvtt_parser.cc',
447 'webm/webm_webvtt_parser.h'
449 'direct_dependent_settings': {
462 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
463 '../gpu/gpu.gyp:command_buffer_common',
464 'shared_memory_support',
467 ['media_use_ffmpeg==1', {
469 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
471 }, { # media_use_ffmpeg==0
472 # Exclude the sources that depend on ffmpeg.
474 'base/container_names.cc',
475 'base/container_names.h',
476 'base/media_file_checker.cc',
477 'base/media_file_checker.h',
478 'base/media_posix.cc',
479 'ffmpeg/ffmpeg_common.cc',
480 'ffmpeg/ffmpeg_common.h',
481 'filters/audio_file_reader.cc',
482 'filters/audio_file_reader.h',
483 'filters/blocking_url_protocol.cc',
484 'filters/blocking_url_protocol.h',
485 'filters/ffmpeg_audio_decoder.cc',
486 'filters/ffmpeg_audio_decoder.h',
487 'filters/ffmpeg_demuxer.cc',
488 'filters/ffmpeg_demuxer.h',
489 'filters/ffmpeg_glue.cc',
490 'filters/ffmpeg_glue.h',
491 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
492 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
493 'filters/ffmpeg_video_decoder.cc',
494 'filters/ffmpeg_video_decoder.h',
497 ['media_use_libvpx==1', {
499 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
501 }, { # media_use_libvpx==0
502 'direct_dependent_settings': {
504 'MEDIA_DISABLE_LIBVPX',
507 # Exclude the sources that depend on libvpx.
509 'filters/vpx_video_decoder.cc',
510 'filters/vpx_video_decoder.h',
515 # For shared_memory_support_sources variable.
516 'shared_memory_support.gypi',
519 'base/media_stub.cc',
520 # These sources are normally built via a dependency on the
521 # shared_memory_support target, but that target is not built on iOS.
522 # Instead, directly build only the files that are needed for iOS.
523 '<@(shared_memory_support_sources)',
526 # Exclude everything but iOS-specific files.
527 ['exclude', '\\.(cc|mm)$'],
528 ['include', '_ios\\.(cc|mm)$'],
529 ['include', '(^|/)ios/'],
530 # Re-include specific pieces.
531 # iOS support is limited to audio input only.
532 ['include', '^audio/audio_buffers_state\\.'],
533 ['include', '^audio/audio_input_controller\\.'],
534 ['include', '^audio/audio_manager\\.'],
535 ['include', '^audio/audio_manager_base\\.'],
536 ['include', '^audio/audio_parameters\\.'],
537 ['include', '^audio/fake_audio_consumer\\.'],
538 ['include', '^audio/fake_audio_input_stream\\.'],
539 ['include', '^audio/fake_audio_output_stream\\.'],
540 ['include', '^base/audio_bus\\.'],
541 ['include', '^base/channel_layout\\.'],
542 ['include', '^base/media\\.cc$'],
543 ['include', '^base/media_stub\\.cc$'],
544 ['include', '^base/media_switches\\.'],
545 ['include', '^base/user_input_monitor\\.'],
546 ['include', '^base/vector_math\\.'],
550 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
551 '$(SDKROOT)/System/Library/Frameworks/AVFoundation.framework',
552 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
553 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
557 'DISABLE_USER_INPUT_MONITOR',
567 '<(SHARED_INTERMEDIATE_DIR)/media',
570 'media_android_jni_headers',
572 'video_capture_android_jni_headers',
577 'base/media_stub.cc',
580 ['android_webview_build==0', {
587 'DISABLE_USER_INPUT_MONITOR',
590 # A simple WebM encoder for animated avatars on ChromeOS.
593 '../third_party/libvpx/libvpx.gyp:libvpx',
594 '../third_party/libyuv/libyuv.gyp:libyuv',
597 'webm/chromeos/ebml_writer.cc',
598 'webm/chromeos/ebml_writer.h',
599 'webm/chromeos/webm_encoder.cc',
600 'webm/chromeos/webm_encoder.h',
603 # TODO(jiayl): figure out why MediaStreamInfoBarTest.
604 # DenyingCameraDoesNotCauseStickyDenyForMics fails on ChromeOS and
606 'DISABLE_USER_INPUT_MONITOR',
609 'base/user_input_monitor_linux.cc',
619 'sources/': [ ['exclude', '/alsa_'],
620 ['exclude', '/audio_manager_linux'] ],
624 'audio/openbsd/audio_manager_openbsd.cc',
625 'audio/openbsd/audio_manager_openbsd.h',
632 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
634 'pkg-config': 'pkg-config'
649 }, { # else: use_x11==0
651 'base/user_input_monitor_linux.cc',
654 'DISABLE_USER_INPUT_MONITOR',
659 '<!@(<(pkg-config) --cflags libcras)',
663 '<!@(<(pkg-config) --libs libcras)',
669 }, { # else: use_cras==0
671 'audio/cras/audio_manager_cras.cc',
672 'audio/cras/audio_manager_cras.h',
673 'audio/cras/cras_input.cc',
674 'audio/cras/cras_input.h',
675 'audio/cras/cras_unified.cc',
676 'audio/cras/cras_unified.h',
683 'audio/cras/audio_manager_cras.cc',
684 'audio/cras/audio_manager_cras.h',
685 'audio/cras/cras_input.cc',
686 'audio/cras/cras_input.h',
687 'audio/cras/cras_unified.cc',
688 'audio/cras/cras_unified.h',
689 'base/keyboard_event_counter.cc',
690 'base/keyboard_event_counter.h',
693 ['use_pulseaudio==1', {
695 '<!@(pkg-config --cflags libpulse)',
701 ['linux_link_pulseaudio==0', {
706 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
707 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
708 'sig_files': ['audio/pulse/pulse.sigs'],
709 'outfile_type': 'posix_stubs',
710 'stubs_filename_root': 'pulse_stubs',
711 'project_path': 'media/audio/pulse',
712 'intermediate_dir': '<(INTERMEDIATE_DIR)',
713 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
720 'action_name': 'generate_stubs',
722 '<(generate_stubs_script)',
727 '<(intermediate_dir)/<(stubs_filename_root).cc',
728 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
731 '<(generate_stubs_script)',
732 '-i', '<(intermediate_dir)',
733 '-o', '<(output_root)/<(project_path)',
734 '-t', '<(outfile_type)',
735 '-e', '<(extra_header)',
736 '-s', '<(stubs_filename_root)',
737 '-p', '<(project_path)',
740 'process_outputs_as_sources': 1,
741 'message': 'Generating Pulse stubs for dynamic loading.',
745 # Linux/Solaris need libdl for dlopen() and friends.
746 ['OS=="linux" or OS=="solaris"', {
754 }, { # else: linux_link_pulseaudio==0
757 '<!@(pkg-config --libs-only-L --libs-only-other libpulse)',
760 '<!@(pkg-config --libs-only-l libpulse)',
765 }, { # else: use_pulseaudio==0
767 'audio/pulse/audio_manager_pulse.cc',
768 'audio/pulse/audio_manager_pulse.h',
769 'audio/pulse/pulse_input.cc',
770 'audio/pulse/pulse_input.h',
771 'audio/pulse/pulse_output.cc',
772 'audio/pulse/pulse_output.h',
773 'audio/pulse/pulse_unified.cc',
774 'audio/pulse/pulse_unified.h',
775 'audio/pulse/pulse_util.cc',
776 'audio/pulse/pulse_util.h',
781 'video/capture/video_capture_device_dummy.cc',
782 'video/capture/video_capture_device_dummy.h',
788 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
789 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
790 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
791 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
792 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
793 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
794 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
800 'video/capture/video_capture_device_dummy.cc',
801 'video/capture/video_capture_device_dummy.h',
811 # Specify delayload for media.dll.
821 # Specify delayload for components that link with media.lib.
822 'all_dependent_settings': {
833 # TODO(wolenetz): Fix size_t to int truncations in win64. See
834 # http://crbug.com/171009
836 ['target_arch=="x64"', {
837 'msvs_disabled_warnings': [ 4267, ],
841 ['proprietary_codecs==1 or branding=="Chrome"', {
847 'mp4/box_definitions.cc',
848 'mp4/box_definitions.h',
853 'mp4/es_descriptor.cc',
854 'mp4/es_descriptor.h',
855 'mp4/mp4_stream_parser.cc',
856 'mp4/mp4_stream_parser.h',
857 'mp4/offset_byte_queue.cc',
858 'mp4/offset_byte_queue.h',
859 'mp4/track_run_iterator.cc',
860 'mp4/track_run_iterator.h',
863 ['toolkit_uses_gtk==1', {
865 '../build/linux/system.gyp:gtk',
868 # ios check is necessary due to http://crbug.com/172682.
869 ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
877 'base/simd/convert_yuv_to_rgb_x86.cc',
882 'ENABLE_EAC3_PLAYBACK',
886 'target_conditions': [
889 # Pull in specific Mac files for iOS (which have been filtered out
890 # by file name rules).
891 ['include', '^audio/mac/audio_input_mac\\.'],
897 'target_name': 'media_unittests',
898 'type': '<(gtest_target_type)',
901 'media_test_support',
902 '../base/base.gyp:base',
903 '../base/base.gyp:base_i18n',
904 '../base/base.gyp:test_support_base',
905 '../skia/skia.gyp:skia',
906 '../testing/gmock.gyp:gmock',
907 '../testing/gtest.gyp:gtest',
911 'audio/audio_input_controller_unittest.cc',
912 'audio/audio_input_device_unittest.cc',
913 'audio/audio_input_unittest.cc',
914 'audio/audio_input_volume_unittest.cc',
915 'audio/audio_low_latency_input_output_unittest.cc',
916 'audio/audio_output_controller_unittest.cc',
917 'audio/audio_output_device_unittest.cc',
918 'audio/audio_output_proxy_unittest.cc',
919 'audio/audio_parameters_unittest.cc',
920 'audio/audio_power_monitor_unittest.cc',
921 'audio/fake_audio_consumer_unittest.cc',
922 'audio/ios/audio_manager_ios_unittest.cc',
923 'audio/linux/alsa_output_unittest.cc',
924 'audio/mac/audio_auhal_mac_unittest.cc',
925 'audio/mac/audio_device_listener_mac_unittest.cc',
926 'audio/mac/audio_low_latency_input_mac_unittest.cc',
927 'audio/simple_sources_unittest.cc',
928 'audio/virtual_audio_input_stream_unittest.cc',
929 'audio/virtual_audio_output_stream_unittest.cc',
930 'audio/win/audio_device_listener_win_unittest.cc',
931 'audio/win/audio_low_latency_input_win_unittest.cc',
932 'audio/win/audio_low_latency_output_win_unittest.cc',
933 'audio/win/audio_output_win_unittest.cc',
934 'audio/win/audio_unified_win_unittest.cc',
935 'audio/win/core_audio_util_win_unittest.cc',
936 'base/android/media_codec_bridge_unittest.cc',
937 'base/android/media_source_player_unittest.cc',
938 'base/audio_buffer_unittest.cc',
939 'base/audio_buffer_queue_unittest.cc',
940 'base/audio_bus_unittest.cc',
941 'base/audio_converter_unittest.cc',
942 'base/audio_fifo_unittest.cc',
943 'base/audio_hardware_config_unittest.cc',
944 'base/audio_hash_unittest.cc',
945 'base/audio_pull_fifo_unittest.cc',
946 'base/audio_renderer_mixer_input_unittest.cc',
947 'base/audio_renderer_mixer_unittest.cc',
948 'base/audio_splicer_unittest.cc',
949 'base/audio_timestamp_helper_unittest.cc',
950 'base/bind_to_loop_unittest.cc',
951 'base/bit_reader_unittest.cc',
952 'base/callback_holder.h',
953 'base/callback_holder_unittest.cc',
954 'base/channel_mixer_unittest.cc',
955 'base/clock_unittest.cc',
956 'base/container_names_unittest.cc',
957 'base/data_buffer_unittest.cc',
958 'base/decoder_buffer_queue_unittest.cc',
959 'base/decoder_buffer_unittest.cc',
960 'base/djb2_unittest.cc',
961 'base/gmock_callback_support_unittest.cc',
962 'base/media_file_checker_unittest.cc',
963 'base/multi_channel_resampler_unittest.cc',
964 'base/pipeline_unittest.cc',
965 'base/ranges_unittest.cc',
966 'base/run_all_unittests.cc',
967 'base/scoped_histogram_timer_unittest.cc',
968 'base/serial_runner_unittest.cc',
969 'base/seekable_buffer_unittest.cc',
970 'base/sinc_resampler_unittest.cc',
971 'base/test_data_util.cc',
972 'base/test_data_util.h',
973 'base/vector_math_testing.h',
974 'base/vector_math_unittest.cc',
975 'base/video_frame_unittest.cc',
976 'base/video_util_unittest.cc',
977 'base/yuv_convert_unittest.cc',
978 'cdm/aes_decryptor_unittest.cc',
979 'ffmpeg/ffmpeg_common_unittest.cc',
980 'filters/audio_decoder_selector_unittest.cc',
981 'filters/audio_file_reader_unittest.cc',
982 'filters/audio_renderer_algorithm_unittest.cc',
983 'filters/audio_renderer_impl_unittest.cc',
984 'filters/blocking_url_protocol_unittest.cc',
985 'filters/chunk_demuxer_unittest.cc',
986 'filters/decrypting_audio_decoder_unittest.cc',
987 'filters/decrypting_demuxer_stream_unittest.cc',
988 'filters/decrypting_video_decoder_unittest.cc',
989 'filters/fake_demuxer_stream.cc',
990 'filters/fake_demuxer_stream.h',
991 'filters/fake_demuxer_stream_unittest.cc',
992 'filters/fake_video_decoder.cc',
993 'filters/fake_video_decoder.h',
994 'filters/fake_video_decoder_unittest.cc',
995 'filters/ffmpeg_audio_decoder_unittest.cc',
996 'filters/ffmpeg_demuxer_unittest.cc',
997 'filters/ffmpeg_glue_unittest.cc',
998 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
999 'filters/ffmpeg_video_decoder_unittest.cc',
1000 'filters/file_data_source_unittest.cc',
1001 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
1002 'filters/pipeline_integration_test.cc',
1003 'filters/pipeline_integration_test_base.cc',
1004 'filters/skcanvas_video_renderer_unittest.cc',
1005 'filters/source_buffer_stream_unittest.cc',
1006 'filters/video_decoder_selector_unittest.cc',
1007 'filters/video_frame_stream_unittest.cc',
1008 'filters/video_renderer_base_unittest.cc',
1009 'video/capture/video_capture_device_unittest.cc',
1010 'webm/cluster_builder.cc',
1011 'webm/cluster_builder.h',
1012 'webm/tracks_builder.cc',
1013 'webm/tracks_builder.h',
1014 'webm/webm_cluster_parser_unittest.cc',
1015 'webm/webm_content_encodings_client_unittest.cc',
1016 'webm/webm_parser_unittest.cc',
1017 'webm/webm_tracks_parser_unittest.cc',
1018 'webm/webm_webvtt_parser_unittest.cc',
1028 '../gpu/gpu.gyp:command_buffer_common',
1029 'shared_memory_support',
1032 ['media_use_ffmpeg==1', {
1034 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1036 }, { # media_use_ffmpeg== 0
1038 'base/media_file_checker_unittest.cc',
1041 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1043 ['linux_use_tcmalloc==1', {
1045 '../base/allocator/allocator.gyp:allocator',
1053 ['include', '^audio/audio_input_controller_unittest\\.cc$'],
1054 ['include', '^audio/audio_input_unittest\\.cc$'],
1055 ['include', '^audio/audio_parameters_unittest\\.cc$'],
1056 ['include', '^audio/ios/audio_manager_ios_unittest\\.cc$'],
1057 ['include', '^base/mock_reader\\.h$'],
1058 ['include', '^base/run_all_unittests\\.cc$'],
1063 'audio/audio_input_volume_unittest.cc',
1064 'base/container_names_unittest.cc',
1065 'ffmpeg/ffmpeg_common_unittest.cc',
1066 'filters/audio_file_reader_unittest.cc',
1067 'filters/blocking_url_protocol_unittest.cc',
1068 'filters/chunk_demuxer_unittest.cc',
1069 'filters/ffmpeg_audio_decoder_unittest.cc',
1070 'filters/ffmpeg_demuxer_unittest.cc',
1071 'filters/ffmpeg_glue_unittest.cc',
1072 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1073 'filters/ffmpeg_video_decoder_unittest.cc',
1074 'filters/pipeline_integration_test.cc',
1075 'filters/pipeline_integration_test_base.cc',
1076 'mp4/mp4_stream_parser_unittest.cc',
1077 'webm/webm_cluster_parser_unittest.cc',
1080 ['gtest_target_type=="shared_library"', {
1082 '../testing/android/native_test.gyp:native_test_native_code',
1092 'audio/cras/cras_input_unittest.cc',
1093 'audio/cras/cras_unified_unittest.cc',
1103 'audio/linux/alsa_output_unittest.cc',
1104 'audio/audio_low_latency_input_output_unittest.cc',
1107 ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
1109 'base/simd/convert_rgb_to_yuv_unittest.cc',
1112 ['proprietary_codecs==1 or branding=="Chrome"', {
1114 'mp4/aac_unittest.cc',
1115 'mp4/avc_unittest.cc',
1116 'mp4/box_reader_unittest.cc',
1117 'mp4/es_descriptor_unittest.cc',
1118 'mp4/mp4_stream_parser_unittest.cc',
1119 'mp4/offset_byte_queue_unittest.cc',
1120 'mp4/track_run_iterator_unittest.cc',
1123 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1124 # http://crbug.com/171009
1125 ['OS=="win" and target_arch=="x64"', {
1126 'msvs_disabled_warnings': [ 4267, ],
1131 'target_name': 'media_test_support',
1132 'type': 'static_library',
1135 '../base/base.gyp:base',
1136 '../skia/skia.gyp:skia',
1137 '../testing/gmock.gyp:gmock',
1138 '../testing/gtest.gyp:gtest',
1141 'audio/mock_audio_manager.cc',
1142 'audio/mock_audio_manager.h',
1143 'audio/test_audio_input_controller_factory.cc',
1144 'audio/test_audio_input_controller_factory.h',
1145 'base/fake_audio_render_callback.cc',
1146 'base/fake_audio_render_callback.h',
1147 'base/gmock_callback_support.h',
1148 'base/mock_audio_renderer_sink.cc',
1149 'base/mock_audio_renderer_sink.h',
1150 'base/mock_data_source_host.cc',
1151 'base/mock_data_source_host.h',
1152 'base/mock_demuxer_host.cc',
1153 'base/mock_demuxer_host.h',
1154 'base/mock_filters.cc',
1155 'base/mock_filters.h',
1156 'base/test_helpers.cc',
1157 'base/test_helpers.h',
1158 'filters/mock_gpu_video_accelerator_factories.cc',
1159 'filters/mock_gpu_video_accelerator_factories.h',
1160 'video/mock_video_decode_accelerator.cc',
1161 'video/mock_video_decode_accelerator.h',
1166 ['OS!="ios" and target_arch!="arm"', {
1169 'target_name': 'media_asm',
1170 'type': 'static_library',
1172 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1173 'base/simd/convert_yuv_to_rgb_mmx.asm',
1174 'base/simd/convert_yuv_to_rgb_sse.asm',
1175 'base/simd/convert_yuva_to_argb_mmx.asm',
1176 'base/simd/empty_register_state_mmx.asm',
1177 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1178 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1179 'base/simd/scale_yuv_to_rgb_mmx.asm',
1180 'base/simd/scale_yuv_to_rgb_sse.asm',
1183 ['component=="shared_library"', {
1185 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1188 ['target_arch=="x64"', {
1189 # Source files optimized for X64 systems.
1191 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1192 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1195 'yasm_flags': ['-DARCH_X86_64'],
1206 # XCode doesn't want to link a pure assembly target and will
1207 # fail to link when it creates an empty file list. So add a
1208 # dummy file keep the linker happy. See http://crbug.com/157073
1209 'base/simd/xcode_hack.c',
1212 ['os_posix==1 and OS!="mac"', {
1215 ['target_arch=="ia32"', {
1231 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1234 # In addition to the same path as source asm, let yasm %include
1235 # search path be relative to src/ per Chromium policy.
1239 '../third_party/x86inc/x86inc.asm',
1240 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1241 'base/simd/convert_yuv_to_rgb_mmx.inc',
1242 'base/simd/convert_yuva_to_argb_mmx.inc',
1243 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1244 'base/simd/media_export.asm',
1245 'base/simd/scale_yuv_to_rgb_mmx.inc',
1248 'msvs_2010_disable_uldi_when_referenced': 1,
1250 '../third_party/yasm/yasm_compile.gypi',
1254 'target_name': 'media_mmx',
1255 'type': 'static_library',
1260 'MEDIA_IMPLEMENTATION',
1266 'base/simd/filter_yuv_mmx.cc',
1270 'target_name': 'media_sse',
1271 'type': 'static_library',
1276 'MEDIA_IMPLEMENTATION',
1282 'base/simd/sinc_resampler_sse.cc',
1286 'target_name': 'media_sse2',
1287 'type': 'static_library',
1292 'MEDIA_IMPLEMENTATION',
1298 'base/simd/convert_rgb_to_yuv_sse2.cc',
1299 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1300 'base/simd/filter_yuv_sse2.cc',
1304 'target_name': 'shared_memory_support_sse',
1305 'type': 'static_library',
1310 'MEDIA_IMPLEMENTATION',
1316 'base/simd/vector_math_sse.cc',
1327 # Minimal target for NaCl and other renderer side media clients which
1328 # only need to send audio data across the shared memory to the browser
1330 'target_name': 'shared_memory_support',
1331 'type': '<(component)',
1333 '../base/base.gyp:base',
1336 'MEDIA_IMPLEMENTATION',
1342 'shared_memory_support.gypi',
1345 '<@(shared_memory_support_sources)',
1353 ['target_arch=="ia32" or target_arch=="x64"', {
1355 'shared_memory_support_sse'
1361 'target_name': 'demuxer_bench',
1362 'type': 'executable',
1365 '../base/base.gyp:base',
1368 'tools/demuxer_bench/demuxer_bench.cc',
1370 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1371 'msvs_disabled_warnings': [ 4267, ],
1378 'target_name': 'player_x11',
1379 'type': 'executable',
1382 '../base/base.gyp:base',
1383 '../ui/gl/gl.gyp:gl',
1394 # Linux/Solaris need libdl for dlopen() and friends.
1395 ['OS=="linux" or OS=="solaris"', {
1404 'tools/player_x11/data_source_logger.cc',
1405 'tools/player_x11/data_source_logger.h',
1406 'tools/player_x11/gl_video_renderer.cc',
1407 'tools/player_x11/gl_video_renderer.h',
1408 'tools/player_x11/player_x11.cc',
1409 'tools/player_x11/x11_video_renderer.cc',
1410 'tools/player_x11/x11_video_renderer.h',
1415 # Special target to wrap a gtest_target_type==shared_library
1416 # media_unittests into an android apk for execution.
1417 ['OS=="android" and gtest_target_type=="shared_library"', {
1420 'target_name': 'media_unittests_apk',
1427 'test_suite_name': 'media_unittests',
1428 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)media_unittests<(SHARED_LIB_SUFFIX)',
1430 'includes': ['../build/apk_test.gypi'],
1437 'target_name': 'media_android_jni_headers',
1440 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1441 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1442 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1443 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1444 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1445 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1448 'jni_gen_package': 'media',
1450 'includes': ['../build/jni_generator.gypi'],
1453 'target_name': 'video_capture_android_jni_headers',
1456 'base/android/java/src/org/chromium/media/VideoCapture.java',
1459 'jni_gen_package': 'media',
1461 'includes': ['../build/jni_generator.gypi'],
1464 'target_name': 'player_android',
1465 'type': 'static_library',
1467 'base/android/audio_decoder_job.cc',
1468 'base/android/audio_decoder_job.h',
1469 'base/android/media_codec_bridge.cc',
1470 'base/android/media_codec_bridge.h',
1471 'base/android/media_decoder_job.cc',
1472 'base/android/media_decoder_job.h',
1473 'base/android/media_drm_bridge.cc',
1474 'base/android/media_drm_bridge.h',
1475 'base/android/media_jni_registrar.cc',
1476 'base/android/media_jni_registrar.h',
1477 'base/android/media_player_android.cc',
1478 'base/android/media_player_android.h',
1479 'base/android/media_player_bridge.cc',
1480 'base/android/media_player_bridge.h',
1481 'base/android/media_player_listener.cc',
1482 'base/android/media_player_listener.h',
1483 'base/android/media_source_player.cc',
1484 'base/android/media_source_player.h',
1485 'base/android/video_decoder_job.cc',
1486 'base/android/video_decoder_job.h',
1487 'base/android/webaudio_media_codec_bridge.cc',
1488 'base/android/webaudio_media_codec_bridge.h',
1489 'base/android/webaudio_media_codec_info.h',
1492 '../base/base.gyp:base',
1493 '../ui/gl/gl.gyp:gl',
1494 '../url/url.gyp:url_lib',
1495 'media_android_jni_headers',
1498 'MEDIA_IMPLEMENTATION',
1501 '<(SHARED_INTERMEDIATE_DIR)/media',
1505 'target_name': 'media_java',
1508 '../base/base.gyp:base',
1510 'export_dependent_settings': [
1511 '../base/base.gyp:base',
1514 'java_in_dir': 'base/android/java',
1516 'includes': ['../build/java.gypi'],
1521 ['media_use_ffmpeg==1', {
1524 'target_name': 'ffmpeg_unittests',
1525 'type': 'executable',
1527 '../base/base.gyp:base',
1528 '../base/base.gyp:base_i18n',
1529 '../base/base.gyp:test_support_base',
1530 '../base/base.gyp:test_support_perf',
1531 '../testing/gtest.gyp:gtest',
1532 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1534 'media_test_support',
1537 'ffmpeg/ffmpeg_unittest.cc',
1540 ['toolkit_uses_gtk==1', {
1542 # Needed for the following #include chain:
1543 # base/run_all_unittests.cc
1544 # ../base/test_suite.h
1546 '../build/linux/system.gyp:gtk',
1549 ['linux_use_tcmalloc==1', {
1551 '../base/allocator/allocator.gyp:allocator',
1559 'target_name': 'ffmpeg_regression_tests',
1560 'type': 'executable',
1562 '../base/base.gyp:test_support_base',
1563 '../testing/gmock.gyp:gmock',
1564 '../testing/gtest.gyp:gtest',
1565 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1567 'media_test_support',
1570 'base/run_all_unittests.cc',
1571 'base/test_data_util.cc',
1572 'ffmpeg/ffmpeg_regression_tests.cc',
1573 'filters/pipeline_integration_test_base.cc',
1576 ['os_posix==1 and OS!="mac"', {
1578 ['linux_use_tcmalloc==1', {
1580 '../base/allocator/allocator.gyp:allocator',