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,
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,
25 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', {
30 ['os_posix==1 and OS!="mac" and OS!="android" and chromeos!=1 and embedded!=1', {
42 'target_name': 'media',
43 'type': '<(component)',
45 '../base/base.gyp:base',
46 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
47 '../crypto/crypto.gyp:crypto',
49 '../gpu/gpu.gyp:command_buffer_common',
50 '../skia/skia.gyp:skia',
51 '../third_party/opus/opus.gyp:opus',
52 '../ui/events/events.gyp:events_base',
53 '../ui/gfx/gfx.gyp:gfx',
54 '../url/url.gyp:url_lib',
55 'shared_memory_support',
58 'MEDIA_IMPLEMENTATION',
64 'audio/agc_audio_stream.h',
65 'audio/android/audio_manager_android.cc',
66 'audio/android/audio_manager_android.h',
67 'audio/android/opensles_input.cc',
68 'audio/android/opensles_input.h',
69 'audio/android/opensles_output.cc',
70 'audio/android/opensles_output.h',
71 'audio/android/opensles_wrapper.cc',
72 'audio/audio_buffers_state.cc',
73 'audio/audio_buffers_state.h',
74 'audio/audio_device_name.cc',
75 'audio/audio_device_name.h',
76 'audio/audio_device_thread.cc',
77 'audio/audio_device_thread.h',
78 'audio/audio_input_controller.cc',
79 'audio/audio_input_controller.h',
80 'audio/audio_input_device.cc',
81 'audio/audio_input_device.h',
82 'audio/audio_input_ipc.cc',
83 'audio/audio_input_ipc.h',
85 'audio/audio_manager.cc',
86 'audio/audio_manager.h',
87 'audio/audio_manager_base.cc',
88 'audio/audio_manager_base.h',
89 'audio/audio_output_controller.cc',
90 'audio/audio_output_controller.h',
91 'audio/audio_output_device.cc',
92 'audio/audio_output_device.h',
93 'audio/audio_output_dispatcher.cc',
94 'audio/audio_output_dispatcher.h',
95 'audio/audio_output_dispatcher_impl.cc',
96 'audio/audio_output_dispatcher_impl.h',
97 'audio/audio_output_ipc.cc',
98 'audio/audio_output_ipc.h',
99 'audio/audio_output_proxy.cc',
100 'audio/audio_output_proxy.h',
101 'audio/audio_output_resampler.cc',
102 'audio/audio_output_resampler.h',
103 'audio/audio_power_monitor.cc',
104 'audio/audio_power_monitor.h',
105 'audio/audio_source_diverter.h',
106 'audio/clockless_audio_sink.cc',
107 'audio/clockless_audio_sink.h',
108 'audio/cras/audio_manager_cras.cc',
109 'audio/cras/audio_manager_cras.h',
110 'audio/cras/cras_input.cc',
111 'audio/cras/cras_input.h',
112 'audio/cras/cras_unified.cc',
113 'audio/cras/cras_unified.h',
114 'audio/fake_audio_consumer.cc',
115 'audio/fake_audio_consumer.h',
116 'audio/fake_audio_input_stream.cc',
117 'audio/fake_audio_input_stream.h',
118 'audio/fake_audio_output_stream.cc',
119 'audio/fake_audio_output_stream.h',
120 'audio/linux/alsa_input.cc',
121 'audio/linux/alsa_input.h',
122 'audio/linux/alsa_output.cc',
123 'audio/linux/alsa_output.h',
124 'audio/linux/alsa_util.cc',
125 'audio/linux/alsa_util.h',
126 'audio/linux/alsa_wrapper.cc',
127 'audio/linux/alsa_wrapper.h',
128 'audio/linux/audio_manager_linux.cc',
129 'audio/linux/audio_manager_linux.h',
130 'audio/mac/aggregate_device_manager.cc',
131 'audio/mac/aggregate_device_manager.h',
132 'audio/mac/audio_auhal_mac.cc',
133 'audio/mac/audio_auhal_mac.h',
134 'audio/mac/audio_device_listener_mac.cc',
135 'audio/mac/audio_device_listener_mac.h',
136 'audio/mac/audio_input_mac.cc',
137 'audio/mac/audio_input_mac.h',
138 'audio/mac/audio_low_latency_input_mac.cc',
139 'audio/mac/audio_low_latency_input_mac.h',
140 'audio/mac/audio_low_latency_output_mac.cc',
141 'audio/mac/audio_low_latency_output_mac.h',
142 'audio/mac/audio_manager_mac.cc',
143 'audio/mac/audio_manager_mac.h',
144 'audio/mac/audio_synchronized_mac.cc',
145 'audio/mac/audio_synchronized_mac.h',
146 'audio/mac/audio_unified_mac.cc',
147 'audio/mac/audio_unified_mac.h',
148 'audio/null_audio_sink.cc',
149 'audio/null_audio_sink.h',
150 'audio/openbsd/audio_manager_openbsd.cc',
151 'audio/openbsd/audio_manager_openbsd.h',
152 'audio/pulse/audio_manager_pulse.cc',
153 'audio/pulse/audio_manager_pulse.h',
154 'audio/pulse/pulse_input.cc',
155 'audio/pulse/pulse_input.h',
156 'audio/pulse/pulse_output.cc',
157 'audio/pulse/pulse_output.h',
158 'audio/pulse/pulse_unified.cc',
159 'audio/pulse/pulse_unified.h',
160 'audio/pulse/pulse_util.cc',
161 'audio/pulse/pulse_util.h',
162 'audio/sample_rates.cc',
163 'audio/sample_rates.h',
164 'audio/scoped_loop_observer.cc',
165 'audio/scoped_loop_observer.h',
166 'audio/simple_sources.cc',
167 'audio/simple_sources.h',
168 'audio/sounds/audio_stream_handler.cc',
169 'audio/sounds/audio_stream_handler.h',
170 'audio/sounds/sounds_manager.cc',
171 'audio/sounds/sounds_manager.h',
172 'audio/sounds/wav_audio_handler.cc',
173 'audio/sounds/wav_audio_handler.h',
174 'audio/virtual_audio_input_stream.cc',
175 'audio/virtual_audio_input_stream.h',
176 'audio/virtual_audio_output_stream.cc',
177 'audio/virtual_audio_output_stream.h',
178 'audio/win/audio_device_listener_win.cc',
179 'audio/win/audio_device_listener_win.h',
180 'audio/win/audio_low_latency_input_win.cc',
181 'audio/win/audio_low_latency_input_win.h',
182 'audio/win/audio_low_latency_output_win.cc',
183 'audio/win/audio_low_latency_output_win.h',
184 'audio/win/audio_manager_win.cc',
185 'audio/win/audio_manager_win.h',
186 'audio/win/audio_unified_win.cc',
187 'audio/win/audio_unified_win.h',
188 'audio/win/avrt_wrapper_win.cc',
189 'audio/win/avrt_wrapper_win.h',
190 'audio/win/core_audio_util_win.cc',
191 'audio/win/core_audio_util_win.h',
192 'audio/win/device_enumeration_win.cc',
193 'audio/win/device_enumeration_win.h',
194 'audio/win/wavein_input_win.cc',
195 'audio/win/wavein_input_win.h',
196 'audio/win/waveout_output_win.cc',
197 'audio/win/waveout_output_win.h',
198 'base/android/demuxer_android.h',
199 'base/android/demuxer_stream_player_params.cc',
200 'base/android/demuxer_stream_player_params.h',
201 'base/android/media_player_manager.h',
202 'base/android/media_resource_getter.cc',
203 'base/android/media_resource_getter.h',
204 'base/audio_buffer.cc',
205 'base/audio_buffer.h',
206 'base/audio_buffer_queue.cc',
207 'base/audio_buffer_queue.h',
208 'base/audio_capturer_source.h',
209 'base/audio_converter.cc',
210 'base/audio_converter.h',
211 'base/audio_decoder.cc',
212 'base/audio_decoder.h',
213 'base/audio_decoder_config.cc',
214 'base/audio_decoder_config.h',
215 'base/audio_fifo.cc',
217 'base/audio_hardware_config.cc',
218 'base/audio_hardware_config.h',
219 'base/audio_hash.cc',
221 'base/audio_pull_fifo.cc',
222 'base/audio_pull_fifo.h',
223 'base/audio_renderer.cc',
224 'base/audio_renderer.h',
225 'base/audio_renderer_mixer.cc',
226 'base/audio_renderer_mixer.h',
227 'base/audio_renderer_mixer_input.cc',
228 'base/audio_renderer_mixer_input.h',
229 'base/audio_renderer_sink.h',
230 'base/audio_splicer.cc',
231 'base/audio_splicer.h',
232 'base/audio_timestamp_helper.cc',
233 'base/audio_timestamp_helper.h',
234 'base/bind_to_loop.h',
235 'base/bit_reader.cc',
237 'base/bitstream_buffer.h',
239 'base/byte_queue.cc',
241 'base/channel_mixer.cc',
242 'base/channel_mixer.h',
245 'base/container_names.cc',
246 'base/container_names.h',
247 'base/data_buffer.cc',
248 'base/data_buffer.h',
249 'base/data_source.cc',
250 'base/data_source.h',
251 'base/decoder_buffer.cc',
252 'base/decoder_buffer.h',
253 'base/decoder_buffer_queue.cc',
254 'base/decoder_buffer_queue.h',
255 'base/decrypt_config.cc',
256 'base/decrypt_config.h',
261 'base/demuxer_stream.cc',
262 'base/demuxer_stream.h',
265 'base/filter_collection.cc',
266 'base/filter_collection.h',
267 'base/keyboard_event_counter.cc',
268 'base/keyboard_event_counter.h',
271 'base/media_file_checker.cc',
272 'base/media_file_checker.h',
273 'base/media_keys.cc',
277 'base/media_log_event.h',
278 'base/media_posix.cc',
279 'base/media_switches.cc',
280 'base/media_switches.h',
282 'base/multi_channel_resampler.cc',
283 'base/multi_channel_resampler.h',
286 'base/pipeline_status.h',
289 'base/sample_format.cc',
290 'base/sample_format.h',
291 'base/scoped_histogram_timer.h',
292 'base/seekable_buffer.cc',
293 'base/seekable_buffer.h',
294 'base/serial_runner.cc',
295 'base/serial_runner.h',
296 'base/simd/convert_rgb_to_yuv.h',
297 'base/simd/convert_rgb_to_yuv_c.cc',
298 'base/simd/convert_yuv_to_rgb.h',
299 'base/simd/convert_yuv_to_rgb_c.cc',
300 'base/simd/filter_yuv.h',
301 'base/simd/filter_yuv_c.cc',
302 'base/simd/yuv_to_rgb_table.cc',
303 'base/simd/yuv_to_rgb_table.h',
304 'base/sinc_resampler.cc',
305 'base/sinc_resampler.h',
306 'base/stream_parser.cc',
307 'base/stream_parser.h',
308 'base/stream_parser_buffer.cc',
309 'base/stream_parser_buffer.h',
312 'base/text_renderer.cc',
313 'base/text_renderer.h',
315 'base/text_track_config.cc',
316 'base/text_track_config.h',
317 'base/user_input_monitor.cc',
318 'base/user_input_monitor.h',
319 'base/user_input_monitor_linux.cc',
320 'base/user_input_monitor_mac.cc',
321 'base/user_input_monitor_win.cc',
322 'base/video_decoder.cc',
323 'base/video_decoder.h',
324 'base/video_decoder_config.cc',
325 'base/video_decoder_config.h',
326 'base/video_frame.cc',
327 'base/video_frame.h',
328 'base/video_renderer.cc',
329 'base/video_renderer.h',
330 'base/video_util.cc',
332 'base/yuv_convert.cc',
333 'base/yuv_convert.h',
334 'cdm/aes_decryptor.cc',
335 'cdm/aes_decryptor.h',
336 'cdm/json_web_key.cc',
337 'cdm/json_web_key.h',
338 'cdm/key_system_names.cc',
339 'cdm/key_system_names.h',
340 'ffmpeg/ffmpeg_common.cc',
341 'ffmpeg/ffmpeg_common.h',
342 'filters/audio_decoder_selector.cc',
343 'filters/audio_decoder_selector.h',
344 'filters/audio_file_reader.cc',
345 'filters/audio_file_reader.h',
346 'filters/audio_renderer_algorithm.cc',
347 'filters/audio_renderer_algorithm.h',
348 'filters/audio_renderer_impl.cc',
349 'filters/audio_renderer_impl.h',
350 'filters/blocking_url_protocol.cc',
351 'filters/blocking_url_protocol.h',
352 'filters/chunk_demuxer.cc',
353 'filters/chunk_demuxer.h',
354 'filters/decrypting_audio_decoder.cc',
355 'filters/decrypting_audio_decoder.h',
356 'filters/decrypting_demuxer_stream.cc',
357 'filters/decrypting_demuxer_stream.h',
358 'filters/decrypting_video_decoder.cc',
359 'filters/decrypting_video_decoder.h',
360 'filters/ffmpeg_audio_decoder.cc',
361 'filters/ffmpeg_audio_decoder.h',
362 'filters/ffmpeg_demuxer.cc',
363 'filters/ffmpeg_demuxer.h',
364 'filters/ffmpeg_glue.cc',
365 'filters/ffmpeg_glue.h',
366 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
367 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
368 'filters/ffmpeg_video_decoder.cc',
369 'filters/ffmpeg_video_decoder.h',
370 'filters/file_data_source.cc',
371 'filters/file_data_source.h',
372 'filters/gpu_video_accelerator_factories.cc',
373 'filters/gpu_video_accelerator_factories.h',
374 'filters/gpu_video_decoder.cc',
375 'filters/gpu_video_decoder.h',
376 'filters/h264_to_annex_b_bitstream_converter.cc',
377 'filters/h264_to_annex_b_bitstream_converter.h',
378 'filters/in_memory_url_protocol.cc',
379 'filters/in_memory_url_protocol.h',
380 'filters/opus_audio_decoder.cc',
381 'filters/opus_audio_decoder.h',
382 'filters/skcanvas_video_renderer.cc',
383 'filters/skcanvas_video_renderer.h',
384 'filters/source_buffer_stream.cc',
385 'filters/source_buffer_stream.h',
386 'filters/stream_parser_factory.cc',
387 'filters/stream_parser_factory.h',
388 'filters/video_decoder_selector.cc',
389 'filters/video_decoder_selector.h',
390 'filters/video_frame_stream.cc',
391 'filters/video_frame_stream.h',
392 'filters/video_renderer_base.cc',
393 'filters/video_renderer_base.h',
394 'filters/vpx_video_decoder.cc',
395 'filters/vpx_video_decoder.h',
396 'filters/webvtt_util.h',
397 'filters/wsola_internals.cc',
398 'filters/wsola_internals.h',
399 'midi/midi_manager.cc',
400 'midi/midi_manager.h',
401 'midi/midi_manager_mac.cc',
402 'midi/midi_manager_mac.h',
403 'midi/midi_port_info.cc',
404 'midi/midi_port_info.h',
405 'video/capture/android/video_capture_device_android.cc',
406 'video/capture/android/video_capture_device_android.h',
407 'video/capture/fake_video_capture_device.cc',
408 'video/capture/fake_video_capture_device.h',
409 'video/capture/linux/video_capture_device_linux.cc',
410 'video/capture/linux/video_capture_device_linux.h',
411 'video/capture/mac/avfoundation_glue.h',
412 'video/capture/mac/avfoundation_glue.mm',
413 'video/capture/mac/platform_video_capturing_mac.h',
414 'video/capture/mac/video_capture_device_avfoundation_mac.h',
415 'video/capture/mac/video_capture_device_avfoundation_mac.mm',
416 'video/capture/mac/video_capture_device_mac.h',
417 'video/capture/mac/video_capture_device_mac.mm',
418 'video/capture/mac/video_capture_device_qtkit_mac.h',
419 'video/capture/mac/video_capture_device_qtkit_mac.mm',
420 'video/capture/video_capture.h',
421 'video/capture/video_capture_device.cc',
422 'video/capture/video_capture_device.h',
423 'video/capture/video_capture_proxy.cc',
424 'video/capture/video_capture_proxy.h',
425 'video/capture/video_capture_types.cc',
426 'video/capture/video_capture_types.h',
427 'video/capture/win/capability_list_win.cc',
428 'video/capture/win/capability_list_win.h',
429 'video/capture/win/filter_base_win.cc',
430 'video/capture/win/filter_base_win.h',
431 'video/capture/win/pin_base_win.cc',
432 'video/capture/win/pin_base_win.h',
433 'video/capture/win/sink_filter_observer_win.h',
434 'video/capture/win/sink_filter_win.cc',
435 'video/capture/win/sink_filter_win.h',
436 'video/capture/win/sink_input_pin_win.cc',
437 'video/capture/win/sink_input_pin_win.h',
438 'video/capture/win/video_capture_device_mf_win.cc',
439 'video/capture/win/video_capture_device_mf_win.h',
440 'video/capture/win/video_capture_device_win.cc',
441 'video/capture/win/video_capture_device_win.h',
444 'video/video_decode_accelerator.cc',
445 'video/video_decode_accelerator.h',
446 'video/video_encode_accelerator.cc',
447 'video/video_encode_accelerator.h',
448 'webm/webm_audio_client.cc',
449 'webm/webm_audio_client.h',
450 'webm/webm_cluster_parser.cc',
451 'webm/webm_cluster_parser.h',
452 'webm/webm_constants.cc',
453 'webm/webm_constants.h',
454 'webm/webm_content_encodings.cc',
455 'webm/webm_content_encodings.h',
456 'webm/webm_content_encodings_client.cc',
457 'webm/webm_content_encodings_client.h',
458 'webm/webm_crypto_helpers.cc',
459 'webm/webm_crypto_helpers.h',
460 'webm/webm_info_parser.cc',
461 'webm/webm_info_parser.h',
462 'webm/webm_parser.cc',
463 'webm/webm_parser.h',
464 'webm/webm_stream_parser.cc',
465 'webm/webm_stream_parser.h',
466 'webm/webm_tracks_parser.cc',
467 'webm/webm_tracks_parser.h',
468 'webm/webm_video_client.cc',
469 'webm/webm_video_client.h',
470 'webm/webm_webvtt_parser.cc',
471 'webm/webm_webvtt_parser.h'
473 'direct_dependent_settings': {
484 ['media_use_ffmpeg==1', {
486 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
488 }, { # media_use_ffmpeg==0
489 # Exclude the sources that depend on ffmpeg.
491 'base/container_names.cc',
492 'base/container_names.h',
493 'base/media_file_checker.cc',
494 'base/media_file_checker.h',
495 'base/media_posix.cc',
496 'ffmpeg/ffmpeg_common.cc',
497 'ffmpeg/ffmpeg_common.h',
498 'filters/audio_file_reader.cc',
499 'filters/audio_file_reader.h',
500 'filters/blocking_url_protocol.cc',
501 'filters/blocking_url_protocol.h',
502 'filters/ffmpeg_audio_decoder.cc',
503 'filters/ffmpeg_audio_decoder.h',
504 'filters/ffmpeg_demuxer.cc',
505 'filters/ffmpeg_demuxer.h',
506 'filters/ffmpeg_glue.cc',
507 'filters/ffmpeg_glue.h',
508 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
509 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
510 'filters/ffmpeg_video_decoder.cc',
511 'filters/ffmpeg_video_decoder.h',
514 ['media_use_libvpx==1', {
516 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
518 }, { # media_use_libvpx==0
519 'direct_dependent_settings': {
521 'MEDIA_DISABLE_LIBVPX',
524 # Exclude the sources that depend on libvpx.
526 'filters/vpx_video_decoder.cc',
527 'filters/vpx_video_decoder.h',
532 '<(SHARED_INTERMEDIATE_DIR)/media',
535 'media_android_jni_headers',
537 'video_capture_android_jni_headers',
542 'base/media_stub.cc',
545 ['android_webview_build==0', {
552 'DISABLE_USER_INPUT_MONITOR',
555 # A simple WebM encoder for animated avatars on ChromeOS.
558 '../third_party/libvpx/libvpx.gyp:libvpx',
559 '../third_party/libyuv/libyuv.gyp:libyuv',
562 'webm/chromeos/ebml_writer.cc',
563 'webm/chromeos/ebml_writer.h',
564 'webm/chromeos/webm_encoder.cc',
565 'webm/chromeos/webm_encoder.h',
575 'sources/': [ ['exclude', '/alsa_'],
576 ['exclude', '/audio_manager_linux'] ],
580 'audio/openbsd/audio_manager_openbsd.cc',
581 'audio/openbsd/audio_manager_openbsd.h',
588 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
590 'pkg-config': 'pkg-config'
605 }, { # else: use_x11==0
607 'base/user_input_monitor_linux.cc',
610 'DISABLE_USER_INPUT_MONITOR',
615 '<!@(<(pkg-config) --cflags libcras)',
619 '<!@(<(pkg-config) --libs libcras)',
625 }, { # else: use_cras==0
627 'audio/cras/audio_manager_cras.cc',
628 'audio/cras/audio_manager_cras.h',
629 'audio/cras/cras_input.cc',
630 'audio/cras/cras_input.h',
631 'audio/cras/cras_unified.cc',
632 'audio/cras/cras_unified.h',
639 'audio/cras/audio_manager_cras.cc',
640 'audio/cras/audio_manager_cras.h',
641 'audio/cras/cras_input.cc',
642 'audio/cras/cras_input.h',
643 'audio/cras/cras_unified.cc',
644 'audio/cras/cras_unified.h',
647 ['use_pulseaudio==1', {
649 '<!@(pkg-config --cflags libpulse)',
655 ['linux_link_pulseaudio==0', {
660 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
661 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
662 'sig_files': ['audio/pulse/pulse.sigs'],
663 'outfile_type': 'posix_stubs',
664 'stubs_filename_root': 'pulse_stubs',
665 'project_path': 'media/audio/pulse',
666 'intermediate_dir': '<(INTERMEDIATE_DIR)',
667 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
674 'action_name': 'generate_stubs',
676 '<(generate_stubs_script)',
681 '<(intermediate_dir)/<(stubs_filename_root).cc',
682 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
685 '<(generate_stubs_script)',
686 '-i', '<(intermediate_dir)',
687 '-o', '<(output_root)/<(project_path)',
688 '-t', '<(outfile_type)',
689 '-e', '<(extra_header)',
690 '-s', '<(stubs_filename_root)',
691 '-p', '<(project_path)',
694 'process_outputs_as_sources': 1,
695 'message': 'Generating Pulse stubs for dynamic loading',
699 # Linux/Solaris need libdl for dlopen() and friends.
700 ['OS=="linux" or OS=="solaris"', {
708 }, { # else: linux_link_pulseaudio==0
711 '<!@(pkg-config --libs-only-L --libs-only-other libpulse)',
714 '<!@(pkg-config --libs-only-l libpulse)',
719 }, { # else: use_pulseaudio==0
721 'audio/pulse/audio_manager_pulse.cc',
722 'audio/pulse/audio_manager_pulse.h',
723 'audio/pulse/pulse_input.cc',
724 'audio/pulse/pulse_input.h',
725 'audio/pulse/pulse_output.cc',
726 'audio/pulse/pulse_output.h',
727 'audio/pulse/pulse_unified.cc',
728 'audio/pulse/pulse_unified.h',
729 'audio/pulse/pulse_util.cc',
730 'audio/pulse/pulse_util.h',
736 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
737 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
738 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
739 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
740 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
741 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
742 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
755 # Specify delayload for media.dll.
765 # Specify delayload for components that link with media.lib.
766 'all_dependent_settings': {
777 # TODO(wolenetz): Fix size_t to int truncations in win64. See
778 # http://crbug.com/171009
780 ['target_arch=="x64"', {
781 'msvs_disabled_warnings': [ 4267, ],
785 ['proprietary_codecs==1', {
788 'mp2t/es_parser_adts.cc',
789 'mp2t/es_parser_adts.h',
790 'mp2t/es_parser_h264.cc',
791 'mp2t/es_parser_h264.h',
792 'mp2t/mp2t_common.h',
793 'mp2t/mp2t_stream_parser.cc',
794 'mp2t/mp2t_stream_parser.h',
798 'mp2t/ts_section_pat.cc',
799 'mp2t/ts_section_pat.h',
800 'mp2t/ts_section_pes.cc',
801 'mp2t/ts_section_pes.h',
802 'mp2t/ts_section_pmt.cc',
803 'mp2t/ts_section_pmt.h',
804 'mp2t/ts_section_psi.cc',
805 'mp2t/ts_section_psi.h',
806 'mp3/mp3_stream_parser.cc',
807 'mp3/mp3_stream_parser.h',
812 'mp4/box_definitions.cc',
813 'mp4/box_definitions.h',
818 'mp4/es_descriptor.cc',
819 'mp4/es_descriptor.h',
820 'mp4/mp4_stream_parser.cc',
821 'mp4/mp4_stream_parser.h',
822 'mp4/offset_byte_queue.cc',
823 'mp4/offset_byte_queue.h',
824 'mp4/track_run_iterator.cc',
825 'mp4/track_run_iterator.h',
828 ['toolkit_uses_gtk==1', {
830 '../build/linux/system.gyp:gtk',
833 ['target_arch=="ia32" or target_arch=="x64"', {
841 'base/simd/convert_yuv_to_rgb_x86.cc',
846 'ENABLE_EAC3_PLAYBACK',
849 ['OS!="linux" and OS!="win"', {
851 'base/keyboard_event_counter.cc',
852 'base/keyboard_event_counter.h',
858 'target_name': 'media_unittests',
859 'type': '<(gtest_target_type)',
862 'media_test_support',
863 'shared_memory_support',
864 '../base/base.gyp:base',
865 '../base/base.gyp:base_i18n',
866 '../base/base.gyp:test_support_base',
867 '../gpu/gpu.gyp:command_buffer_common',
868 '../skia/skia.gyp:skia',
869 '../testing/gmock.gyp:gmock',
870 '../testing/gtest.gyp:gtest',
871 '../ui/gfx/gfx.gyp:gfx',
875 'audio/android/audio_android_unittest.cc',
876 'audio/audio_input_controller_unittest.cc',
877 'audio/audio_input_unittest.cc',
878 'audio/audio_input_volume_unittest.cc',
879 'audio/audio_low_latency_input_output_unittest.cc',
880 'audio/audio_manager_unittest.cc',
881 'audio/audio_output_controller_unittest.cc',
882 'audio/audio_output_device_unittest.cc',
883 'audio/audio_output_proxy_unittest.cc',
884 'audio/audio_parameters_unittest.cc',
885 'audio/audio_power_monitor_unittest.cc',
886 'audio/fake_audio_consumer_unittest.cc',
887 'audio/linux/alsa_output_unittest.cc',
888 'audio/mac/audio_auhal_mac_unittest.cc',
889 'audio/mac/audio_device_listener_mac_unittest.cc',
890 'audio/mac/audio_low_latency_input_mac_unittest.cc',
891 'audio/simple_sources_unittest.cc',
892 'audio/sounds/audio_stream_handler_unittest.cc',
893 'audio/sounds/sounds_manager_unittest.cc',
894 'audio/sounds/test_data.cc',
895 'audio/sounds/test_data.h',
896 'audio/sounds/wav_audio_handler_unittest.cc',
897 'audio/virtual_audio_input_stream_unittest.cc',
898 'audio/virtual_audio_output_stream_unittest.cc',
899 'audio/win/audio_device_listener_win_unittest.cc',
900 'audio/win/audio_low_latency_input_win_unittest.cc',
901 'audio/win/audio_low_latency_output_win_unittest.cc',
902 'audio/win/audio_output_win_unittest.cc',
903 'audio/win/audio_unified_win_unittest.cc',
904 'audio/win/core_audio_util_win_unittest.cc',
905 'base/android/media_codec_bridge_unittest.cc',
906 'base/android/media_source_player_unittest.cc',
907 'base/audio_buffer_unittest.cc',
908 'base/audio_buffer_queue_unittest.cc',
909 'base/audio_bus_unittest.cc',
910 'base/audio_converter_unittest.cc',
911 'base/audio_fifo_unittest.cc',
912 'base/audio_hardware_config_unittest.cc',
913 'base/audio_hash_unittest.cc',
914 'base/audio_pull_fifo_unittest.cc',
915 'base/audio_renderer_mixer_input_unittest.cc',
916 'base/audio_renderer_mixer_unittest.cc',
917 'base/audio_splicer_unittest.cc',
918 'base/audio_timestamp_helper_unittest.cc',
919 'base/bind_to_loop_unittest.cc',
920 'base/bit_reader_unittest.cc',
921 'base/callback_holder.h',
922 'base/callback_holder_unittest.cc',
923 'base/channel_mixer_unittest.cc',
924 'base/clock_unittest.cc',
925 'base/container_names_unittest.cc',
926 'base/data_buffer_unittest.cc',
927 'base/decoder_buffer_queue_unittest.cc',
928 'base/decoder_buffer_unittest.cc',
929 'base/djb2_unittest.cc',
930 'base/gmock_callback_support_unittest.cc',
931 'base/media_file_checker_unittest.cc',
932 'base/multi_channel_resampler_unittest.cc',
933 'base/pipeline_unittest.cc',
934 'base/ranges_unittest.cc',
935 'base/run_all_unittests.cc',
936 'base/scoped_histogram_timer_unittest.cc',
937 'base/serial_runner_unittest.cc',
938 'base/seekable_buffer_unittest.cc',
939 'base/sinc_resampler_unittest.cc',
940 'base/test_data_util.cc',
941 'base/test_data_util.h',
942 'base/text_renderer_unittest.cc',
943 'base/user_input_monitor_unittest.cc',
944 'base/vector_math_testing.h',
945 'base/vector_math_unittest.cc',
946 'base/video_frame_unittest.cc',
947 'base/video_util_unittest.cc',
948 'base/yuv_convert_unittest.cc',
949 'cdm/aes_decryptor_unittest.cc',
950 'ffmpeg/ffmpeg_common_unittest.cc',
951 'filters/audio_decoder_selector_unittest.cc',
952 'filters/audio_file_reader_unittest.cc',
953 'filters/audio_renderer_algorithm_unittest.cc',
954 'filters/audio_renderer_impl_unittest.cc',
955 'filters/blocking_url_protocol_unittest.cc',
956 'filters/chunk_demuxer_unittest.cc',
957 'filters/decrypting_audio_decoder_unittest.cc',
958 'filters/decrypting_demuxer_stream_unittest.cc',
959 'filters/decrypting_video_decoder_unittest.cc',
960 'filters/fake_demuxer_stream.cc',
961 'filters/fake_demuxer_stream.h',
962 'filters/fake_demuxer_stream_unittest.cc',
963 'filters/fake_video_decoder.cc',
964 'filters/fake_video_decoder.h',
965 'filters/fake_video_decoder_unittest.cc',
966 'filters/ffmpeg_audio_decoder_unittest.cc',
967 'filters/ffmpeg_demuxer_unittest.cc',
968 'filters/ffmpeg_glue_unittest.cc',
969 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
970 'filters/ffmpeg_video_decoder_unittest.cc',
971 'filters/file_data_source_unittest.cc',
972 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
973 'filters/pipeline_integration_test.cc',
974 'filters/pipeline_integration_test_base.cc',
975 'filters/skcanvas_video_renderer_unittest.cc',
976 'filters/source_buffer_stream_unittest.cc',
977 'filters/video_decoder_selector_unittest.cc',
978 'filters/video_frame_stream_unittest.cc',
979 'filters/video_renderer_base_unittest.cc',
980 'video/capture/video_capture_device_unittest.cc',
981 'webm/cluster_builder.cc',
982 'webm/cluster_builder.h',
983 'webm/tracks_builder.cc',
984 'webm/tracks_builder.h',
985 'webm/webm_cluster_parser_unittest.cc',
986 'webm/webm_content_encodings_client_unittest.cc',
987 'webm/webm_parser_unittest.cc',
988 'webm/webm_tracks_parser_unittest.cc',
989 'webm/webm_webvtt_parser_unittest.cc',
997 ['media_use_ffmpeg==1', {
999 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1001 }, { # media_use_ffmpeg== 0
1003 'base/media_file_checker_unittest.cc',
1011 ['use_pulseaudio==1', {
1016 ['os_posix==1 and OS!="mac"', {
1018 ['linux_use_tcmalloc==1', {
1020 '../base/allocator/allocator.gyp:allocator',
1027 'audio/audio_input_volume_unittest.cc',
1028 'base/container_names_unittest.cc',
1029 'ffmpeg/ffmpeg_common_unittest.cc',
1030 'filters/audio_file_reader_unittest.cc',
1031 'filters/blocking_url_protocol_unittest.cc',
1032 'filters/ffmpeg_audio_decoder_unittest.cc',
1033 'filters/ffmpeg_demuxer_unittest.cc',
1034 'filters/ffmpeg_glue_unittest.cc',
1035 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1036 'filters/ffmpeg_video_decoder_unittest.cc',
1037 'filters/pipeline_integration_test.cc',
1038 'filters/pipeline_integration_test_base.cc',
1041 ['gtest_target_type=="shared_library"', {
1043 '../testing/android/native_test.gyp:native_test_native_code',
1053 'audio/cras/cras_input_unittest.cc',
1054 'audio/cras/cras_unified_unittest.cc',
1064 'audio/linux/alsa_output_unittest.cc',
1065 'audio/audio_low_latency_input_output_unittest.cc',
1068 ['target_arch=="ia32" or target_arch=="x64"', {
1070 'base/simd/convert_rgb_to_yuv_unittest.cc',
1073 ['proprietary_codecs==1', {
1075 'mp2t/mp2t_stream_parser_unittest.cc',
1076 'mp3/mp3_stream_parser_unittest.cc',
1077 'mp4/aac_unittest.cc',
1078 'mp4/avc_unittest.cc',
1079 'mp4/box_reader_unittest.cc',
1080 'mp4/es_descriptor_unittest.cc',
1081 'mp4/mp4_stream_parser_unittest.cc',
1082 'mp4/offset_byte_queue_unittest.cc',
1083 'mp4/track_run_iterator_unittest.cc',
1086 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1087 # http://crbug.com/171009
1088 ['OS=="win" and target_arch=="x64"', {
1089 'msvs_disabled_warnings': [ 4267, ],
1094 'target_name': 'media_perftests',
1095 'type': '<(gtest_target_type)',
1098 'media_test_support',
1099 'shared_memory_support',
1100 '../base/base.gyp:test_support_base',
1101 '../testing/gmock.gyp:gmock',
1102 '../testing/gtest.gyp:gtest',
1103 '../testing/perf/perf_test.gyp:perf_test',
1104 '../ui/gfx/gfx.gyp:gfx',
1106 '../ui/gl/gl.gyp:gl',
1109 'base/audio_bus_perftest.cc',
1110 'base/audio_converter_perftest.cc',
1111 'base/demuxer_perftest.cc',
1112 'base/run_all_unittests.cc',
1113 'base/sinc_resampler_perftest.cc',
1114 'base/test_data_util.cc',
1115 'base/vector_math_perftest.cc',
1116 'filters/pipeline_integration_perftest.cc',
1117 'filters/pipeline_integration_test_base.cc',
1127 ['gtest_target_type=="shared_library"', {
1129 '../testing/android/native_test.gyp:native_test_native_code',
1134 ['media_use_ffmpeg==1', {
1136 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1138 }, { # media_use_ffmpeg==0
1140 'base/demuxer_perftest.cc',
1141 'filters/pipeline_integration_perftest.cc',
1142 'filters/pipeline_integration_test_base.cc',
1148 'target_name': 'media_test_support',
1149 'type': 'static_library',
1152 'shared_memory_support',
1153 '../base/base.gyp:base',
1154 '../skia/skia.gyp:skia',
1155 '../testing/gmock.gyp:gmock',
1156 '../testing/gtest.gyp:gtest',
1159 'audio/mock_audio_manager.cc',
1160 'audio/mock_audio_manager.h',
1161 'audio/test_audio_input_controller_factory.cc',
1162 'audio/test_audio_input_controller_factory.h',
1163 'base/fake_audio_render_callback.cc',
1164 'base/fake_audio_render_callback.h',
1165 'base/fake_audio_renderer_sink.cc',
1166 'base/fake_audio_renderer_sink.h',
1167 'base/fake_text_track_stream.cc',
1168 'base/fake_text_track_stream.h',
1169 'base/gmock_callback_support.h',
1170 'base/mock_audio_renderer_sink.cc',
1171 'base/mock_audio_renderer_sink.h',
1172 'base/mock_data_source_host.cc',
1173 'base/mock_data_source_host.h',
1174 'base/mock_demuxer_host.cc',
1175 'base/mock_demuxer_host.h',
1176 'base/mock_filters.cc',
1177 'base/mock_filters.h',
1178 'base/test_helpers.cc',
1179 'base/test_helpers.h',
1180 'filters/mock_gpu_video_accelerator_factories.cc',
1181 'filters/mock_gpu_video_accelerator_factories.h',
1182 'video/mock_video_decode_accelerator.cc',
1183 'video/mock_video_decode_accelerator.h',
1187 # Minimal target for NaCl and other renderer side media clients which
1188 # only need to send audio data across the shared memory to the browser
1190 'target_name': 'shared_memory_support',
1191 'type': '<(component)',
1193 '../base/base.gyp:base',
1196 'MEDIA_IMPLEMENTATION',
1202 'shared_memory_support.gypi',
1205 '<@(shared_memory_support_sources)',
1213 ['target_arch=="ia32" or target_arch=="x64"', {
1215 'shared_memory_support_sse'
1222 ['target_arch!="arm"', {
1225 'target_name': 'media_asm',
1226 'type': 'static_library',
1228 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1229 'base/simd/convert_yuv_to_rgb_mmx.asm',
1230 'base/simd/convert_yuv_to_rgb_sse.asm',
1231 'base/simd/convert_yuva_to_argb_mmx.asm',
1232 'base/simd/empty_register_state_mmx.asm',
1233 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1234 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1235 'base/simd/scale_yuv_to_rgb_mmx.asm',
1236 'base/simd/scale_yuv_to_rgb_sse.asm',
1239 ['component=="shared_library"', {
1241 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1244 ['target_arch=="x64"', {
1245 # Source files optimized for X64 systems.
1247 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1248 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1251 'yasm_flags': ['-DARCH_X86_64'],
1262 # XCode doesn't want to link a pure assembly target and will
1263 # fail to link when it creates an empty file list. So add a
1264 # dummy file keep the linker happy. See http://crbug.com/157073
1265 'base/simd/xcode_hack.c',
1268 ['os_posix==1 and OS!="mac"', {
1271 ['target_arch=="ia32"', {
1287 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1290 # In addition to the same path as source asm, let yasm %include
1291 # search path be relative to src/ per Chromium policy.
1295 '../third_party/x86inc/x86inc.asm',
1296 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1297 'base/simd/convert_yuv_to_rgb_mmx.inc',
1298 'base/simd/convert_yuva_to_argb_mmx.inc',
1299 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1300 'base/simd/media_export.asm',
1301 'base/simd/scale_yuv_to_rgb_mmx.inc',
1304 'msvs_2010_disable_uldi_when_referenced': 1,
1306 '../third_party/yasm/yasm_compile.gypi',
1310 'target_name': 'media_mmx',
1311 'type': 'static_library',
1316 'MEDIA_IMPLEMENTATION',
1322 'base/simd/filter_yuv_mmx.cc',
1326 'target_name': 'media_sse',
1327 'type': 'static_library',
1332 'MEDIA_IMPLEMENTATION',
1338 'base/simd/sinc_resampler_sse.cc',
1342 'target_name': 'media_sse2',
1343 'type': 'static_library',
1348 'MEDIA_IMPLEMENTATION',
1354 'base/simd/convert_rgb_to_yuv_sse2.cc',
1355 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1356 'base/simd/filter_yuv_sse2.cc',
1360 'target_name': 'shared_memory_support_sse',
1361 'type': 'static_library',
1366 'MEDIA_IMPLEMENTATION',
1372 'base/simd/vector_math_sse.cc',
1380 'target_name': 'player_x11',
1381 'type': 'executable',
1384 '../base/base.gyp:base',
1385 '../ui/gl/gl.gyp:gl',
1386 '../ui/gfx/gfx.gyp:gfx',
1397 # Linux/Solaris need libdl for dlopen() and friends.
1398 ['OS=="linux" or OS=="solaris"', {
1407 'tools/player_x11/data_source_logger.cc',
1408 'tools/player_x11/data_source_logger.h',
1409 'tools/player_x11/gl_video_renderer.cc',
1410 'tools/player_x11/gl_video_renderer.h',
1411 'tools/player_x11/player_x11.cc',
1412 'tools/player_x11/x11_video_renderer.cc',
1413 'tools/player_x11/x11_video_renderer.h',
1418 # Special target to wrap a gtest_target_type==shared_library
1419 # media_unittests into an android apk for execution.
1420 ['OS=="android" and gtest_target_type=="shared_library"', {
1423 'target_name': 'media_unittests_apk',
1430 'test_suite_name': 'media_unittests',
1431 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)media_unittests<(SHARED_LIB_SUFFIX)',
1433 'includes': ['../build/apk_test.gypi'],
1436 'target_name': 'media_perftests_apk',
1443 'test_suite_name': 'media_perftests',
1444 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)media_perftests<(SHARED_LIB_SUFFIX)',
1446 'includes': ['../build/apk_test.gypi'],
1453 'target_name': 'media_android_jni_headers',
1456 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1457 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1458 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1459 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1460 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1461 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1464 'jni_gen_package': 'media',
1465 'jni_generator_ptr_type': 'long',
1467 'includes': ['../build/jni_generator.gypi'],
1470 'target_name': 'video_capture_android_jni_headers',
1473 'base/android/java/src/org/chromium/media/VideoCapture.java',
1476 'jni_gen_package': 'media',
1477 'jni_generator_ptr_type': 'long',
1479 'includes': ['../build/jni_generator.gypi'],
1482 'target_name': 'player_android',
1483 'type': 'static_library',
1485 'base/android/audio_decoder_job.cc',
1486 'base/android/audio_decoder_job.h',
1487 'base/android/media_codec_bridge.cc',
1488 'base/android/media_codec_bridge.h',
1489 'base/android/media_decoder_job.cc',
1490 'base/android/media_decoder_job.h',
1491 'base/android/media_drm_bridge.cc',
1492 'base/android/media_drm_bridge.h',
1493 'base/android/media_jni_registrar.cc',
1494 'base/android/media_jni_registrar.h',
1495 'base/android/media_player_android.cc',
1496 'base/android/media_player_android.h',
1497 'base/android/media_player_bridge.cc',
1498 'base/android/media_player_bridge.h',
1499 'base/android/media_player_listener.cc',
1500 'base/android/media_player_listener.h',
1501 'base/android/media_source_player.cc',
1502 'base/android/media_source_player.h',
1503 'base/android/video_decoder_job.cc',
1504 'base/android/video_decoder_job.h',
1505 'base/android/webaudio_media_codec_bridge.cc',
1506 'base/android/webaudio_media_codec_bridge.h',
1507 'base/android/webaudio_media_codec_info.h',
1510 '../base/base.gyp:base',
1511 '../ui/gl/gl.gyp:gl',
1512 '../url/url.gyp:url_lib',
1513 'media_android_jni_headers',
1516 'MEDIA_IMPLEMENTATION',
1519 '<(SHARED_INTERMEDIATE_DIR)/media',
1523 'target_name': 'media_java',
1526 '../base/base.gyp:base',
1527 'media_android_imageformat_list',
1529 'export_dependent_settings': [
1530 '../base/base.gyp:base',
1533 'java_in_dir': 'base/android/java',
1535 'includes': ['../build/java.gypi'],
1538 'target_name': 'media_android_imageformat_list',
1541 'base/android/java/src/org/chromium/media/ImageFormat.template',
1544 'package_name': 'org/chromium/media',
1545 'template_deps': ['video/capture/android/imageformat_list.h'],
1547 'includes': [ '../build/android/java_cpp_template.gypi' ],
1551 ['media_use_ffmpeg==1', {
1554 'target_name': 'ffmpeg_unittests',
1555 'type': 'executable',
1557 '../base/base.gyp:base',
1558 '../base/base.gyp:base_i18n',
1559 '../base/base.gyp:test_support_base',
1560 '../base/base.gyp:test_support_perf',
1561 '../testing/gtest.gyp:gtest',
1562 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1564 'media_test_support',
1567 'ffmpeg/ffmpeg_unittest.cc',
1570 ['toolkit_uses_gtk==1', {
1572 # Needed for the following #include chain:
1573 # base/run_all_unittests.cc
1574 # ../base/test_suite.h
1576 '../build/linux/system.gyp:gtk',
1579 ['linux_use_tcmalloc==1', {
1581 '../base/allocator/allocator.gyp:allocator',
1589 'target_name': 'ffmpeg_regression_tests',
1590 'type': 'executable',
1592 '../base/base.gyp:test_support_base',
1593 '../testing/gmock.gyp:gmock',
1594 '../testing/gtest.gyp:gtest',
1595 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1597 'media_test_support',
1600 'base/run_all_unittests.cc',
1601 'base/test_data_util.cc',
1602 'ffmpeg/ffmpeg_regression_tests.cc',
1603 'filters/pipeline_integration_test_base.cc',
1606 ['os_posix==1 and OS!="mac"', {
1608 ['linux_use_tcmalloc==1', {
1610 '../base/allocator/allocator.gyp:allocator',