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', {
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',
53 '../ui/gfx/gfx.gyp:gfx',
55 '../url/url.gyp:url_lib',
56 'shared_memory_support',
59 'MEDIA_IMPLEMENTATION',
65 'audio/agc_audio_stream.h',
66 'audio/android/audio_manager_android.cc',
67 'audio/android/audio_manager_android.h',
68 'audio/android/opensles_input.cc',
69 'audio/android/opensles_input.h',
70 'audio/android/opensles_output.cc',
71 'audio/android/opensles_output.h',
72 'audio/android/opensles_wrapper.cc',
73 'audio/audio_buffers_state.cc',
74 'audio/audio_buffers_state.h',
75 'audio/audio_device_name.cc',
76 'audio/audio_device_name.h',
77 'audio/audio_device_thread.cc',
78 'audio/audio_device_thread.h',
79 'audio/audio_input_controller.cc',
80 'audio/audio_input_controller.h',
81 'audio/audio_input_device.cc',
82 'audio/audio_input_device.h',
83 'audio/audio_input_ipc.cc',
84 'audio/audio_input_ipc.h',
86 'audio/audio_manager.cc',
87 'audio/audio_manager.h',
88 'audio/audio_manager_base.cc',
89 'audio/audio_manager_base.h',
90 'audio/audio_output_controller.cc',
91 'audio/audio_output_controller.h',
92 'audio/audio_output_device.cc',
93 'audio/audio_output_device.h',
94 'audio/audio_output_dispatcher.cc',
95 'audio/audio_output_dispatcher.h',
96 'audio/audio_output_dispatcher_impl.cc',
97 'audio/audio_output_dispatcher_impl.h',
98 'audio/audio_output_ipc.cc',
99 'audio/audio_output_ipc.h',
100 'audio/audio_output_proxy.cc',
101 'audio/audio_output_proxy.h',
102 'audio/audio_output_resampler.cc',
103 'audio/audio_output_resampler.h',
104 'audio/audio_power_monitor.cc',
105 'audio/audio_power_monitor.h',
106 'audio/audio_source_diverter.h',
107 'audio/clockless_audio_sink.cc',
108 'audio/clockless_audio_sink.h',
109 'audio/cras/audio_manager_cras.cc',
110 'audio/cras/audio_manager_cras.h',
111 'audio/cras/cras_input.cc',
112 'audio/cras/cras_input.h',
113 'audio/cras/cras_unified.cc',
114 'audio/cras/cras_unified.h',
115 'audio/fake_audio_consumer.cc',
116 'audio/fake_audio_consumer.h',
117 'audio/fake_audio_input_stream.cc',
118 'audio/fake_audio_input_stream.h',
119 'audio/fake_audio_output_stream.cc',
120 'audio/fake_audio_output_stream.h',
121 'audio/linux/alsa_input.cc',
122 'audio/linux/alsa_input.h',
123 'audio/linux/alsa_output.cc',
124 'audio/linux/alsa_output.h',
125 'audio/linux/alsa_util.cc',
126 'audio/linux/alsa_util.h',
127 'audio/linux/alsa_wrapper.cc',
128 'audio/linux/alsa_wrapper.h',
129 'audio/linux/audio_manager_linux.cc',
130 'audio/linux/audio_manager_linux.h',
131 'audio/mac/aggregate_device_manager.cc',
132 'audio/mac/aggregate_device_manager.h',
133 'audio/mac/audio_auhal_mac.cc',
134 'audio/mac/audio_auhal_mac.h',
135 'audio/mac/audio_device_listener_mac.cc',
136 'audio/mac/audio_device_listener_mac.h',
137 'audio/mac/audio_input_mac.cc',
138 'audio/mac/audio_input_mac.h',
139 'audio/mac/audio_low_latency_input_mac.cc',
140 'audio/mac/audio_low_latency_input_mac.h',
141 'audio/mac/audio_low_latency_output_mac.cc',
142 'audio/mac/audio_low_latency_output_mac.h',
143 'audio/mac/audio_manager_mac.cc',
144 'audio/mac/audio_manager_mac.h',
145 'audio/mac/audio_synchronized_mac.cc',
146 'audio/mac/audio_synchronized_mac.h',
147 'audio/mac/audio_unified_mac.cc',
148 'audio/mac/audio_unified_mac.h',
149 'audio/null_audio_sink.cc',
150 'audio/null_audio_sink.h',
151 'audio/openbsd/audio_manager_openbsd.cc',
152 'audio/openbsd/audio_manager_openbsd.h',
153 'audio/pulse/audio_manager_pulse.cc',
154 'audio/pulse/audio_manager_pulse.h',
155 'audio/pulse/pulse_input.cc',
156 'audio/pulse/pulse_input.h',
157 'audio/pulse/pulse_output.cc',
158 'audio/pulse/pulse_output.h',
159 'audio/pulse/pulse_unified.cc',
160 'audio/pulse/pulse_unified.h',
161 'audio/pulse/pulse_util.cc',
162 'audio/pulse/pulse_util.h',
163 'audio/sample_rates.cc',
164 'audio/sample_rates.h',
165 'audio/scoped_loop_observer.cc',
166 'audio/scoped_loop_observer.h',
167 'audio/simple_sources.cc',
168 'audio/simple_sources.h',
169 'audio/virtual_audio_input_stream.cc',
170 'audio/virtual_audio_input_stream.h',
171 'audio/virtual_audio_output_stream.cc',
172 'audio/virtual_audio_output_stream.h',
173 'audio/win/audio_device_listener_win.cc',
174 'audio/win/audio_device_listener_win.h',
175 'audio/win/audio_low_latency_input_win.cc',
176 'audio/win/audio_low_latency_input_win.h',
177 'audio/win/audio_low_latency_output_win.cc',
178 'audio/win/audio_low_latency_output_win.h',
179 'audio/win/audio_manager_win.cc',
180 'audio/win/audio_manager_win.h',
181 'audio/win/audio_unified_win.cc',
182 'audio/win/audio_unified_win.h',
183 'audio/win/avrt_wrapper_win.cc',
184 'audio/win/avrt_wrapper_win.h',
185 'audio/win/core_audio_util_win.cc',
186 'audio/win/core_audio_util_win.h',
187 'audio/win/device_enumeration_win.cc',
188 'audio/win/device_enumeration_win.h',
189 'audio/win/wavein_input_win.cc',
190 'audio/win/wavein_input_win.h',
191 'audio/win/waveout_output_win.cc',
192 'audio/win/waveout_output_win.h',
193 'base/android/demuxer_android.h',
194 'base/android/demuxer_stream_player_params.cc',
195 'base/android/demuxer_stream_player_params.h',
196 'base/android/media_player_manager.h',
197 'base/android/media_resource_getter.cc',
198 'base/android/media_resource_getter.h',
199 'base/audio_buffer.cc',
200 'base/audio_buffer.h',
201 'base/audio_buffer_queue.cc',
202 'base/audio_buffer_queue.h',
203 'base/audio_capturer_source.h',
204 'base/audio_converter.cc',
205 'base/audio_converter.h',
206 'base/audio_decoder.cc',
207 'base/audio_decoder.h',
208 'base/audio_decoder_config.cc',
209 'base/audio_decoder_config.h',
210 'base/audio_fifo.cc',
212 'base/audio_hardware_config.cc',
213 'base/audio_hardware_config.h',
214 'base/audio_hash.cc',
216 'base/audio_pull_fifo.cc',
217 'base/audio_pull_fifo.h',
218 'base/audio_renderer.cc',
219 'base/audio_renderer.h',
220 'base/audio_renderer_mixer.cc',
221 'base/audio_renderer_mixer.h',
222 'base/audio_renderer_mixer_input.cc',
223 'base/audio_renderer_mixer_input.h',
224 'base/audio_renderer_sink.h',
225 'base/audio_splicer.cc',
226 'base/audio_splicer.h',
227 'base/audio_timestamp_helper.cc',
228 'base/audio_timestamp_helper.h',
229 'base/bind_to_loop.h',
230 'base/bit_reader.cc',
232 'base/bitstream_buffer.h',
234 'base/byte_queue.cc',
236 'base/channel_mixer.cc',
237 'base/channel_mixer.h',
240 'base/container_names.cc',
241 'base/container_names.h',
242 'base/data_buffer.cc',
243 'base/data_buffer.h',
244 'base/data_source.cc',
245 'base/data_source.h',
246 'base/decoder_buffer.cc',
247 'base/decoder_buffer.h',
248 'base/decoder_buffer_queue.cc',
249 'base/decoder_buffer_queue.h',
250 'base/decrypt_config.cc',
251 'base/decrypt_config.h',
256 'base/demuxer_stream.cc',
257 'base/demuxer_stream.h',
260 'base/filter_collection.cc',
261 'base/filter_collection.h',
262 'base/keyboard_event_counter.cc',
263 'base/keyboard_event_counter.h',
266 'base/media_file_checker.cc',
267 'base/media_file_checker.h',
268 'base/media_keys.cc',
272 'base/media_log_event.h',
273 'base/media_posix.cc',
274 'base/media_switches.cc',
275 'base/media_switches.h',
277 'base/multi_channel_resampler.cc',
278 'base/multi_channel_resampler.h',
281 'base/pipeline_status.cc',
282 'base/pipeline_status.h',
285 'base/sample_format.cc',
286 'base/sample_format.h',
287 'base/scoped_histogram_timer.h',
288 'base/seekable_buffer.cc',
289 'base/seekable_buffer.h',
290 'base/serial_runner.cc',
291 'base/serial_runner.h',
292 'base/simd/convert_rgb_to_yuv.h',
293 'base/simd/convert_rgb_to_yuv_c.cc',
294 'base/simd/convert_yuv_to_rgb.h',
295 'base/simd/convert_yuv_to_rgb_c.cc',
296 'base/simd/filter_yuv.h',
297 'base/simd/filter_yuv_c.cc',
298 'base/simd/yuv_to_rgb_table.cc',
299 'base/simd/yuv_to_rgb_table.h',
300 'base/sinc_resampler.cc',
301 'base/sinc_resampler.h',
302 'base/stream_parser.cc',
303 'base/stream_parser.h',
304 'base/stream_parser_buffer.cc',
305 'base/stream_parser_buffer.h',
307 'base/user_input_monitor.cc',
308 'base/user_input_monitor.h',
309 'base/user_input_monitor_linux.cc',
310 'base/user_input_monitor_mac.cc',
311 'base/user_input_monitor_win.cc',
312 'base/video_decoder.cc',
313 'base/video_decoder.h',
314 'base/video_decoder_config.cc',
315 'base/video_decoder_config.h',
316 'base/video_frame.cc',
317 'base/video_frame.h',
318 'base/video_renderer.cc',
319 'base/video_renderer.h',
320 'base/video_util.cc',
322 'base/yuv_convert.cc',
323 'base/yuv_convert.h',
324 'cdm/aes_decryptor.cc',
325 'cdm/aes_decryptor.h',
326 'ffmpeg/ffmpeg_common.cc',
327 'ffmpeg/ffmpeg_common.h',
328 'filters/audio_decoder_selector.cc',
329 'filters/audio_decoder_selector.h',
330 'filters/audio_file_reader.cc',
331 'filters/audio_file_reader.h',
332 'filters/audio_renderer_algorithm.cc',
333 'filters/audio_renderer_algorithm.h',
334 'filters/audio_renderer_impl.cc',
335 'filters/audio_renderer_impl.h',
336 'filters/blocking_url_protocol.cc',
337 'filters/blocking_url_protocol.h',
338 'filters/chunk_demuxer.cc',
339 'filters/chunk_demuxer.h',
340 'filters/decrypting_audio_decoder.cc',
341 'filters/decrypting_audio_decoder.h',
342 'filters/decrypting_demuxer_stream.cc',
343 'filters/decrypting_demuxer_stream.h',
344 'filters/decrypting_video_decoder.cc',
345 'filters/decrypting_video_decoder.h',
346 'filters/ffmpeg_audio_decoder.cc',
347 'filters/ffmpeg_audio_decoder.h',
348 'filters/ffmpeg_demuxer.cc',
349 'filters/ffmpeg_demuxer.h',
350 'filters/ffmpeg_glue.cc',
351 'filters/ffmpeg_glue.h',
352 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
353 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
354 'filters/ffmpeg_video_decoder.cc',
355 'filters/ffmpeg_video_decoder.h',
356 'filters/file_data_source.cc',
357 'filters/file_data_source.h',
358 'filters/gpu_video_accelerator_factories.cc',
359 'filters/gpu_video_accelerator_factories.h',
360 'filters/gpu_video_decoder.cc',
361 'filters/gpu_video_decoder.h',
362 'filters/h264_to_annex_b_bitstream_converter.cc',
363 'filters/h264_to_annex_b_bitstream_converter.h',
364 'filters/in_memory_url_protocol.cc',
365 'filters/in_memory_url_protocol.h',
366 'filters/opus_audio_decoder.cc',
367 'filters/opus_audio_decoder.h',
368 'filters/skcanvas_video_renderer.cc',
369 'filters/skcanvas_video_renderer.h',
370 'filters/source_buffer_stream.cc',
371 'filters/source_buffer_stream.h',
372 'filters/stream_parser_factory.cc',
373 'filters/stream_parser_factory.h',
374 'filters/video_decoder_selector.cc',
375 'filters/video_decoder_selector.h',
376 'filters/video_frame_stream.cc',
377 'filters/video_frame_stream.h',
378 'filters/video_renderer_base.cc',
379 'filters/video_renderer_base.h',
380 'filters/vpx_video_decoder.cc',
381 'filters/vpx_video_decoder.h',
382 'filters/wsola_internals.cc',
383 'filters/wsola_internals.h',
384 'midi/midi_manager.cc',
385 'midi/midi_manager.h',
386 'midi/midi_manager_mac.cc',
387 'midi/midi_manager_mac.h',
388 'midi/midi_port_info.cc',
389 'midi/midi_port_info.h',
390 'video/capture/android/video_capture_device_android.cc',
391 'video/capture/android/video_capture_device_android.h',
392 'video/capture/fake_video_capture_device.cc',
393 'video/capture/fake_video_capture_device.h',
394 'video/capture/linux/video_capture_device_linux.cc',
395 'video/capture/linux/video_capture_device_linux.h',
396 'video/capture/mac/avfoundation_glue.h',
397 'video/capture/mac/avfoundation_glue.mm',
398 'video/capture/mac/video_capture_device_mac.h',
399 'video/capture/mac/video_capture_device_mac.mm',
400 'video/capture/mac/video_capture_device_qtkit_mac.h',
401 'video/capture/mac/video_capture_device_qtkit_mac.mm',
402 'video/capture/video_capture.h',
403 'video/capture/video_capture_device.cc',
404 'video/capture/video_capture_device.h',
405 'video/capture/video_capture_proxy.cc',
406 'video/capture/video_capture_proxy.h',
407 'video/capture/video_capture_types.cc',
408 'video/capture/video_capture_types.h',
409 'video/capture/win/capability_list_win.cc',
410 'video/capture/win/capability_list_win.h',
411 'video/capture/win/filter_base_win.cc',
412 'video/capture/win/filter_base_win.h',
413 'video/capture/win/pin_base_win.cc',
414 'video/capture/win/pin_base_win.h',
415 'video/capture/win/sink_filter_observer_win.h',
416 'video/capture/win/sink_filter_win.cc',
417 'video/capture/win/sink_filter_win.h',
418 'video/capture/win/sink_input_pin_win.cc',
419 'video/capture/win/sink_input_pin_win.h',
420 'video/capture/win/video_capture_device_mf_win.cc',
421 'video/capture/win/video_capture_device_mf_win.h',
422 'video/capture/win/video_capture_device_win.cc',
423 'video/capture/win/video_capture_device_win.h',
426 'video/video_decode_accelerator.cc',
427 'video/video_decode_accelerator.h',
428 'video/video_encode_accelerator.cc',
429 'video/video_encode_accelerator.h',
430 'webm/webm_audio_client.cc',
431 'webm/webm_audio_client.h',
432 'webm/webm_cluster_parser.cc',
433 'webm/webm_cluster_parser.h',
434 'webm/webm_constants.cc',
435 'webm/webm_constants.h',
436 'webm/webm_content_encodings.cc',
437 'webm/webm_content_encodings.h',
438 'webm/webm_content_encodings_client.cc',
439 'webm/webm_content_encodings_client.h',
440 'webm/webm_crypto_helpers.cc',
441 'webm/webm_crypto_helpers.h',
442 'webm/webm_info_parser.cc',
443 'webm/webm_info_parser.h',
444 'webm/webm_parser.cc',
445 'webm/webm_parser.h',
446 'webm/webm_stream_parser.cc',
447 'webm/webm_stream_parser.h',
448 'webm/webm_tracks_parser.cc',
449 'webm/webm_tracks_parser.h',
450 'webm/webm_video_client.cc',
451 'webm/webm_video_client.h',
452 'webm/webm_webvtt_parser.cc',
453 'webm/webm_webvtt_parser.h'
455 'direct_dependent_settings': {
466 ['media_use_ffmpeg==1', {
468 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
470 }, { # media_use_ffmpeg==0
471 # Exclude the sources that depend on ffmpeg.
473 'base/container_names.cc',
474 'base/container_names.h',
475 'base/media_file_checker.cc',
476 'base/media_file_checker.h',
477 'base/media_posix.cc',
478 'ffmpeg/ffmpeg_common.cc',
479 'ffmpeg/ffmpeg_common.h',
480 'filters/audio_file_reader.cc',
481 'filters/audio_file_reader.h',
482 'filters/blocking_url_protocol.cc',
483 'filters/blocking_url_protocol.h',
484 'filters/ffmpeg_audio_decoder.cc',
485 'filters/ffmpeg_audio_decoder.h',
486 'filters/ffmpeg_demuxer.cc',
487 'filters/ffmpeg_demuxer.h',
488 'filters/ffmpeg_glue.cc',
489 'filters/ffmpeg_glue.h',
490 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
491 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
492 'filters/ffmpeg_video_decoder.cc',
493 'filters/ffmpeg_video_decoder.h',
496 ['media_use_libvpx==1', {
498 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
500 }, { # media_use_libvpx==0
501 'direct_dependent_settings': {
503 'MEDIA_DISABLE_LIBVPX',
506 # Exclude the sources that depend on libvpx.
508 'filters/vpx_video_decoder.cc',
509 'filters/vpx_video_decoder.h',
514 '<(SHARED_INTERMEDIATE_DIR)/media',
517 'media_android_jni_headers',
519 'video_capture_android_jni_headers',
524 'base/media_stub.cc',
527 ['android_webview_build==0', {
534 'DISABLE_USER_INPUT_MONITOR',
537 # A simple WebM encoder for animated avatars on ChromeOS.
540 '../third_party/libvpx/libvpx.gyp:libvpx',
541 '../third_party/libyuv/libyuv.gyp:libyuv',
544 'webm/chromeos/ebml_writer.cc',
545 'webm/chromeos/ebml_writer.h',
546 'webm/chromeos/webm_encoder.cc',
547 'webm/chromeos/webm_encoder.h',
557 'sources/': [ ['exclude', '/alsa_'],
558 ['exclude', '/audio_manager_linux'] ],
562 'audio/openbsd/audio_manager_openbsd.cc',
563 'audio/openbsd/audio_manager_openbsd.h',
570 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
572 'pkg-config': 'pkg-config'
587 }, { # else: use_x11==0
589 'base/user_input_monitor_linux.cc',
592 'DISABLE_USER_INPUT_MONITOR',
597 '<!@(<(pkg-config) --cflags libcras)',
601 '<!@(<(pkg-config) --libs libcras)',
607 }, { # else: use_cras==0
609 'audio/cras/audio_manager_cras.cc',
610 'audio/cras/audio_manager_cras.h',
611 'audio/cras/cras_input.cc',
612 'audio/cras/cras_input.h',
613 'audio/cras/cras_unified.cc',
614 'audio/cras/cras_unified.h',
621 'audio/cras/audio_manager_cras.cc',
622 'audio/cras/audio_manager_cras.h',
623 'audio/cras/cras_input.cc',
624 'audio/cras/cras_input.h',
625 'audio/cras/cras_unified.cc',
626 'audio/cras/cras_unified.h',
629 ['use_pulseaudio==1', {
631 '<!@(pkg-config --cflags libpulse)',
637 ['linux_link_pulseaudio==0', {
642 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
643 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
644 'sig_files': ['audio/pulse/pulse.sigs'],
645 'outfile_type': 'posix_stubs',
646 'stubs_filename_root': 'pulse_stubs',
647 'project_path': 'media/audio/pulse',
648 'intermediate_dir': '<(INTERMEDIATE_DIR)',
649 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
656 'action_name': 'generate_stubs',
658 '<(generate_stubs_script)',
663 '<(intermediate_dir)/<(stubs_filename_root).cc',
664 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
667 '<(generate_stubs_script)',
668 '-i', '<(intermediate_dir)',
669 '-o', '<(output_root)/<(project_path)',
670 '-t', '<(outfile_type)',
671 '-e', '<(extra_header)',
672 '-s', '<(stubs_filename_root)',
673 '-p', '<(project_path)',
676 'process_outputs_as_sources': 1,
677 'message': 'Generating Pulse stubs for dynamic loading.',
681 # Linux/Solaris need libdl for dlopen() and friends.
682 ['OS=="linux" or OS=="solaris"', {
690 }, { # else: linux_link_pulseaudio==0
693 '<!@(pkg-config --libs-only-L --libs-only-other libpulse)',
696 '<!@(pkg-config --libs-only-l libpulse)',
701 }, { # else: use_pulseaudio==0
703 'audio/pulse/audio_manager_pulse.cc',
704 'audio/pulse/audio_manager_pulse.h',
705 'audio/pulse/pulse_input.cc',
706 'audio/pulse/pulse_input.h',
707 'audio/pulse/pulse_output.cc',
708 'audio/pulse/pulse_output.h',
709 'audio/pulse/pulse_unified.cc',
710 'audio/pulse/pulse_unified.h',
711 'audio/pulse/pulse_util.cc',
712 'audio/pulse/pulse_util.h',
718 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
719 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
720 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
721 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
722 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
723 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
724 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
737 # Specify delayload for media.dll.
747 # Specify delayload for components that link with media.lib.
748 'all_dependent_settings': {
759 # TODO(wolenetz): Fix size_t to int truncations in win64. See
760 # http://crbug.com/171009
762 ['target_arch=="x64"', {
763 'msvs_disabled_warnings': [ 4267, ],
767 ['proprietary_codecs==1', {
770 'mp2t/es_parser_adts.cc',
771 'mp2t/es_parser_adts.h',
772 'mp2t/es_parser_h264.cc',
773 'mp2t/es_parser_h264.h',
774 'mp2t/mp2t_common.h',
775 'mp2t/mp2t_stream_parser.cc',
776 'mp2t/mp2t_stream_parser.h',
780 'mp2t/ts_section_pat.cc',
781 'mp2t/ts_section_pat.h',
782 'mp2t/ts_section_pes.cc',
783 'mp2t/ts_section_pes.h',
784 'mp2t/ts_section_pmt.cc',
785 'mp2t/ts_section_pmt.h',
786 'mp2t/ts_section_psi.cc',
787 'mp2t/ts_section_psi.h',
788 'mp3/mp3_stream_parser.cc',
789 'mp3/mp3_stream_parser.h',
794 'mp4/box_definitions.cc',
795 'mp4/box_definitions.h',
800 'mp4/es_descriptor.cc',
801 'mp4/es_descriptor.h',
802 'mp4/mp4_stream_parser.cc',
803 'mp4/mp4_stream_parser.h',
804 'mp4/offset_byte_queue.cc',
805 'mp4/offset_byte_queue.h',
806 'mp4/track_run_iterator.cc',
807 'mp4/track_run_iterator.h',
810 ['toolkit_uses_gtk==1', {
812 '../build/linux/system.gyp:gtk',
815 ['target_arch=="ia32" or target_arch=="x64"', {
823 'base/simd/convert_yuv_to_rgb_x86.cc',
828 'ENABLE_EAC3_PLAYBACK',
831 ['OS!="linux" and OS!="win"', {
833 'base/keyboard_event_counter.cc',
834 'base/keyboard_event_counter.h',
840 'target_name': 'media_unittests',
841 'type': '<(gtest_target_type)',
844 'media_test_support',
845 'shared_memory_support',
846 '../base/base.gyp:base',
847 '../base/base.gyp:base_i18n',
848 '../base/base.gyp:test_support_base',
849 '../gpu/gpu.gyp:command_buffer_common',
850 '../skia/skia.gyp:skia',
851 '../testing/gmock.gyp:gmock',
852 '../testing/gtest.gyp:gtest',
853 '../ui/gfx/gfx.gyp:gfx',
857 'audio/android/audio_android_unittest.cc',
858 'audio/audio_input_controller_unittest.cc',
859 'audio/audio_input_unittest.cc',
860 'audio/audio_input_volume_unittest.cc',
861 'audio/audio_low_latency_input_output_unittest.cc',
862 'audio/audio_manager_unittest.cc',
863 'audio/audio_output_controller_unittest.cc',
864 'audio/audio_output_device_unittest.cc',
865 'audio/audio_output_proxy_unittest.cc',
866 'audio/audio_parameters_unittest.cc',
867 'audio/audio_power_monitor_unittest.cc',
868 'audio/fake_audio_consumer_unittest.cc',
869 'audio/linux/alsa_output_unittest.cc',
870 'audio/mac/audio_auhal_mac_unittest.cc',
871 'audio/mac/audio_device_listener_mac_unittest.cc',
872 'audio/mac/audio_low_latency_input_mac_unittest.cc',
873 'audio/simple_sources_unittest.cc',
874 'audio/virtual_audio_input_stream_unittest.cc',
875 'audio/virtual_audio_output_stream_unittest.cc',
876 'audio/win/audio_device_listener_win_unittest.cc',
877 'audio/win/audio_low_latency_input_win_unittest.cc',
878 'audio/win/audio_low_latency_output_win_unittest.cc',
879 'audio/win/audio_output_win_unittest.cc',
880 'audio/win/audio_unified_win_unittest.cc',
881 'audio/win/core_audio_util_win_unittest.cc',
882 'base/android/media_codec_bridge_unittest.cc',
883 'base/android/media_source_player_unittest.cc',
884 'base/audio_buffer_unittest.cc',
885 'base/audio_buffer_queue_unittest.cc',
886 'base/audio_bus_unittest.cc',
887 'base/audio_converter_unittest.cc',
888 'base/audio_fifo_unittest.cc',
889 'base/audio_hardware_config_unittest.cc',
890 'base/audio_hash_unittest.cc',
891 'base/audio_pull_fifo_unittest.cc',
892 'base/audio_renderer_mixer_input_unittest.cc',
893 'base/audio_renderer_mixer_unittest.cc',
894 'base/audio_splicer_unittest.cc',
895 'base/audio_timestamp_helper_unittest.cc',
896 'base/bind_to_loop_unittest.cc',
897 'base/bit_reader_unittest.cc',
898 'base/callback_holder.h',
899 'base/callback_holder_unittest.cc',
900 'base/channel_mixer_unittest.cc',
901 'base/clock_unittest.cc',
902 'base/container_names_unittest.cc',
903 'base/data_buffer_unittest.cc',
904 'base/decoder_buffer_queue_unittest.cc',
905 'base/decoder_buffer_unittest.cc',
906 'base/djb2_unittest.cc',
907 'base/gmock_callback_support_unittest.cc',
908 'base/media_file_checker_unittest.cc',
909 'base/multi_channel_resampler_unittest.cc',
910 'base/pipeline_unittest.cc',
911 'base/ranges_unittest.cc',
912 'base/run_all_unittests.cc',
913 'base/scoped_histogram_timer_unittest.cc',
914 'base/serial_runner_unittest.cc',
915 'base/seekable_buffer_unittest.cc',
916 'base/sinc_resampler_unittest.cc',
917 'base/test_data_util.cc',
918 'base/test_data_util.h',
919 'base/user_input_monitor_unittest.cc',
920 'base/vector_math_testing.h',
921 'base/vector_math_unittest.cc',
922 'base/video_frame_unittest.cc',
923 'base/video_util_unittest.cc',
924 'base/yuv_convert_unittest.cc',
925 'cdm/aes_decryptor_unittest.cc',
926 'ffmpeg/ffmpeg_common_unittest.cc',
927 'filters/audio_decoder_selector_unittest.cc',
928 'filters/audio_file_reader_unittest.cc',
929 'filters/audio_renderer_algorithm_unittest.cc',
930 'filters/audio_renderer_impl_unittest.cc',
931 'filters/blocking_url_protocol_unittest.cc',
932 'filters/chunk_demuxer_unittest.cc',
933 'filters/decrypting_audio_decoder_unittest.cc',
934 'filters/decrypting_demuxer_stream_unittest.cc',
935 'filters/decrypting_video_decoder_unittest.cc',
936 'filters/fake_demuxer_stream.cc',
937 'filters/fake_demuxer_stream.h',
938 'filters/fake_demuxer_stream_unittest.cc',
939 'filters/fake_video_decoder.cc',
940 'filters/fake_video_decoder.h',
941 'filters/fake_video_decoder_unittest.cc',
942 'filters/ffmpeg_audio_decoder_unittest.cc',
943 'filters/ffmpeg_demuxer_unittest.cc',
944 'filters/ffmpeg_glue_unittest.cc',
945 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
946 'filters/ffmpeg_video_decoder_unittest.cc',
947 'filters/file_data_source_unittest.cc',
948 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
949 'filters/pipeline_integration_test.cc',
950 'filters/pipeline_integration_test_base.cc',
951 'filters/skcanvas_video_renderer_unittest.cc',
952 'filters/source_buffer_stream_unittest.cc',
953 'filters/video_decoder_selector_unittest.cc',
954 'filters/video_frame_stream_unittest.cc',
955 'filters/video_renderer_base_unittest.cc',
956 'video/capture/video_capture_device_unittest.cc',
957 'webm/cluster_builder.cc',
958 'webm/cluster_builder.h',
959 'webm/tracks_builder.cc',
960 'webm/tracks_builder.h',
961 'webm/webm_cluster_parser_unittest.cc',
962 'webm/webm_content_encodings_client_unittest.cc',
963 'webm/webm_parser_unittest.cc',
964 'webm/webm_tracks_parser_unittest.cc',
965 'webm/webm_webvtt_parser_unittest.cc',
973 ['media_use_ffmpeg==1', {
975 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
977 }, { # media_use_ffmpeg== 0
979 'base/media_file_checker_unittest.cc',
987 ['use_pulseaudio==1', {
992 ['os_posix==1 and OS!="mac"', {
994 ['linux_use_tcmalloc==1', {
996 '../base/allocator/allocator.gyp:allocator',
1003 'audio/audio_input_volume_unittest.cc',
1004 'base/container_names_unittest.cc',
1005 'ffmpeg/ffmpeg_common_unittest.cc',
1006 'filters/audio_file_reader_unittest.cc',
1007 'filters/blocking_url_protocol_unittest.cc',
1008 'filters/ffmpeg_audio_decoder_unittest.cc',
1009 'filters/ffmpeg_demuxer_unittest.cc',
1010 'filters/ffmpeg_glue_unittest.cc',
1011 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1012 'filters/ffmpeg_video_decoder_unittest.cc',
1013 'filters/pipeline_integration_test.cc',
1014 'filters/pipeline_integration_test_base.cc',
1017 ['gtest_target_type=="shared_library"', {
1019 '../testing/android/native_test.gyp:native_test_native_code',
1029 'audio/cras/cras_input_unittest.cc',
1030 'audio/cras/cras_unified_unittest.cc',
1040 'audio/linux/alsa_output_unittest.cc',
1041 'audio/audio_low_latency_input_output_unittest.cc',
1044 ['target_arch=="ia32" or target_arch=="x64"', {
1046 'base/simd/convert_rgb_to_yuv_unittest.cc',
1049 ['proprietary_codecs==1', {
1051 'mp2t/mp2t_stream_parser_unittest.cc',
1052 'mp3/mp3_stream_parser_unittest.cc',
1053 'mp4/aac_unittest.cc',
1054 'mp4/avc_unittest.cc',
1055 'mp4/box_reader_unittest.cc',
1056 'mp4/es_descriptor_unittest.cc',
1057 'mp4/mp4_stream_parser_unittest.cc',
1058 'mp4/offset_byte_queue_unittest.cc',
1059 'mp4/track_run_iterator_unittest.cc',
1062 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1063 # http://crbug.com/171009
1064 ['OS=="win" and target_arch=="x64"', {
1065 'msvs_disabled_warnings': [ 4267, ],
1070 'target_name': 'media_perftests',
1071 'type': '<(gtest_target_type)',
1074 '../base/base.gyp:test_support_base',
1075 '../testing/gmock.gyp:gmock',
1076 '../testing/gtest.gyp:gtest',
1079 'base/run_all_unittests.cc',
1083 'target_name': 'media_test_support',
1084 'type': 'static_library',
1087 'shared_memory_support',
1088 '../base/base.gyp:base',
1089 '../skia/skia.gyp:skia',
1090 '../testing/gmock.gyp:gmock',
1091 '../testing/gtest.gyp:gtest',
1094 'audio/mock_audio_manager.cc',
1095 'audio/mock_audio_manager.h',
1096 'audio/test_audio_input_controller_factory.cc',
1097 'audio/test_audio_input_controller_factory.h',
1098 'base/fake_audio_render_callback.cc',
1099 'base/fake_audio_render_callback.h',
1100 'base/fake_audio_renderer_sink.cc',
1101 'base/fake_audio_renderer_sink.h',
1102 'base/gmock_callback_support.h',
1103 'base/mock_audio_renderer_sink.cc',
1104 'base/mock_audio_renderer_sink.h',
1105 'base/mock_data_source_host.cc',
1106 'base/mock_data_source_host.h',
1107 'base/mock_demuxer_host.cc',
1108 'base/mock_demuxer_host.h',
1109 'base/mock_filters.cc',
1110 'base/mock_filters.h',
1111 'base/test_helpers.cc',
1112 'base/test_helpers.h',
1113 'filters/mock_gpu_video_accelerator_factories.cc',
1114 'filters/mock_gpu_video_accelerator_factories.h',
1115 'video/mock_video_decode_accelerator.cc',
1116 'video/mock_video_decode_accelerator.h',
1120 # Minimal target for NaCl and other renderer side media clients which
1121 # only need to send audio data across the shared memory to the browser
1123 'target_name': 'shared_memory_support',
1124 'type': '<(component)',
1126 '../base/base.gyp:base',
1129 'MEDIA_IMPLEMENTATION',
1135 'shared_memory_support.gypi',
1138 '<@(shared_memory_support_sources)',
1146 ['target_arch=="ia32" or target_arch=="x64"', {
1148 'shared_memory_support_sse'
1154 'target_name': 'demuxer_bench',
1155 'type': 'executable',
1158 '../base/base.gyp:base',
1161 'tools/demuxer_bench/demuxer_bench.cc',
1163 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1164 'msvs_disabled_warnings': [ 4267, ],
1168 ['target_arch!="arm"', {
1171 'target_name': 'media_asm',
1172 'type': 'static_library',
1174 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1175 'base/simd/convert_yuv_to_rgb_mmx.asm',
1176 'base/simd/convert_yuv_to_rgb_sse.asm',
1177 'base/simd/convert_yuva_to_argb_mmx.asm',
1178 'base/simd/empty_register_state_mmx.asm',
1179 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1180 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1181 'base/simd/scale_yuv_to_rgb_mmx.asm',
1182 'base/simd/scale_yuv_to_rgb_sse.asm',
1185 ['component=="shared_library"', {
1187 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1190 ['target_arch=="x64"', {
1191 # Source files optimized for X64 systems.
1193 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1194 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1197 'yasm_flags': ['-DARCH_X86_64'],
1208 # XCode doesn't want to link a pure assembly target and will
1209 # fail to link when it creates an empty file list. So add a
1210 # dummy file keep the linker happy. See http://crbug.com/157073
1211 'base/simd/xcode_hack.c',
1214 ['os_posix==1 and OS!="mac"', {
1217 ['target_arch=="ia32"', {
1233 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1236 # In addition to the same path as source asm, let yasm %include
1237 # search path be relative to src/ per Chromium policy.
1241 '../third_party/x86inc/x86inc.asm',
1242 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1243 'base/simd/convert_yuv_to_rgb_mmx.inc',
1244 'base/simd/convert_yuva_to_argb_mmx.inc',
1245 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1246 'base/simd/media_export.asm',
1247 'base/simd/scale_yuv_to_rgb_mmx.inc',
1250 'msvs_2010_disable_uldi_when_referenced': 1,
1252 '../third_party/yasm/yasm_compile.gypi',
1256 'target_name': 'media_mmx',
1257 'type': 'static_library',
1262 'MEDIA_IMPLEMENTATION',
1268 'base/simd/filter_yuv_mmx.cc',
1272 'target_name': 'media_sse',
1273 'type': 'static_library',
1278 'MEDIA_IMPLEMENTATION',
1284 'base/simd/sinc_resampler_sse.cc',
1288 'target_name': 'media_sse2',
1289 'type': 'static_library',
1294 'MEDIA_IMPLEMENTATION',
1300 'base/simd/convert_rgb_to_yuv_sse2.cc',
1301 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1302 'base/simd/filter_yuv_sse2.cc',
1306 'target_name': 'shared_memory_support_sse',
1307 'type': 'static_library',
1312 'MEDIA_IMPLEMENTATION',
1318 'base/simd/vector_math_sse.cc',
1326 'target_name': 'player_x11',
1327 'type': 'executable',
1330 '../base/base.gyp:base',
1331 '../ui/gl/gl.gyp:gl',
1332 '../ui/gfx/gfx.gyp:gfx',
1343 # Linux/Solaris need libdl for dlopen() and friends.
1344 ['OS=="linux" or OS=="solaris"', {
1353 'tools/player_x11/data_source_logger.cc',
1354 'tools/player_x11/data_source_logger.h',
1355 'tools/player_x11/gl_video_renderer.cc',
1356 'tools/player_x11/gl_video_renderer.h',
1357 'tools/player_x11/player_x11.cc',
1358 'tools/player_x11/x11_video_renderer.cc',
1359 'tools/player_x11/x11_video_renderer.h',
1364 # Special target to wrap a gtest_target_type==shared_library
1365 # media_unittests into an android apk for execution.
1366 ['OS=="android" and gtest_target_type=="shared_library"', {
1369 'target_name': 'media_unittests_apk',
1376 'test_suite_name': 'media_unittests',
1377 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)media_unittests<(SHARED_LIB_SUFFIX)',
1379 'includes': ['../build/apk_test.gypi'],
1386 'target_name': 'media_android_jni_headers',
1389 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1390 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1391 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1392 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1393 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1394 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1397 'jni_gen_package': 'media',
1399 'includes': ['../build/jni_generator.gypi'],
1402 'target_name': 'video_capture_android_jni_headers',
1405 'base/android/java/src/org/chromium/media/VideoCapture.java',
1408 'jni_gen_package': 'media',
1410 'includes': ['../build/jni_generator.gypi'],
1413 'target_name': 'player_android',
1414 'type': 'static_library',
1416 'base/android/audio_decoder_job.cc',
1417 'base/android/audio_decoder_job.h',
1418 'base/android/media_codec_bridge.cc',
1419 'base/android/media_codec_bridge.h',
1420 'base/android/media_decoder_job.cc',
1421 'base/android/media_decoder_job.h',
1422 'base/android/media_drm_bridge.cc',
1423 'base/android/media_drm_bridge.h',
1424 'base/android/media_jni_registrar.cc',
1425 'base/android/media_jni_registrar.h',
1426 'base/android/media_player_android.cc',
1427 'base/android/media_player_android.h',
1428 'base/android/media_player_bridge.cc',
1429 'base/android/media_player_bridge.h',
1430 'base/android/media_player_listener.cc',
1431 'base/android/media_player_listener.h',
1432 'base/android/media_source_player.cc',
1433 'base/android/media_source_player.h',
1434 'base/android/video_decoder_job.cc',
1435 'base/android/video_decoder_job.h',
1436 'base/android/webaudio_media_codec_bridge.cc',
1437 'base/android/webaudio_media_codec_bridge.h',
1438 'base/android/webaudio_media_codec_info.h',
1441 '../base/base.gyp:base',
1442 '../ui/gl/gl.gyp:gl',
1443 '../url/url.gyp:url_lib',
1444 'media_android_jni_headers',
1447 'MEDIA_IMPLEMENTATION',
1450 '<(SHARED_INTERMEDIATE_DIR)/media',
1454 'target_name': 'media_java',
1457 '../base/base.gyp:base',
1458 'media_android_imageformat_list',
1460 'export_dependent_settings': [
1461 '../base/base.gyp:base',
1464 'java_in_dir': 'base/android/java',
1466 'includes': ['../build/java.gypi'],
1469 'target_name': 'media_android_imageformat_list',
1472 'base/android/java/src/org/chromium/media/ImageFormat.template',
1475 'package_name': 'org/chromium/media',
1476 'template_deps': ['video/capture/android/imageformat_list.h'],
1478 'includes': [ '../build/android/java_cpp_template.gypi' ],
1482 ['media_use_ffmpeg==1', {
1485 'target_name': 'ffmpeg_unittests',
1486 'type': 'executable',
1488 '../base/base.gyp:base',
1489 '../base/base.gyp:base_i18n',
1490 '../base/base.gyp:test_support_base',
1491 '../base/base.gyp:test_support_perf',
1492 '../testing/gtest.gyp:gtest',
1493 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1495 'media_test_support',
1498 'ffmpeg/ffmpeg_unittest.cc',
1501 ['toolkit_uses_gtk==1', {
1503 # Needed for the following #include chain:
1504 # base/run_all_unittests.cc
1505 # ../base/test_suite.h
1507 '../build/linux/system.gyp:gtk',
1510 ['linux_use_tcmalloc==1', {
1512 '../base/allocator/allocator.gyp:allocator',
1520 'target_name': 'ffmpeg_regression_tests',
1521 'type': 'executable',
1523 '../base/base.gyp:test_support_base',
1524 '../testing/gmock.gyp:gmock',
1525 '../testing/gtest.gyp:gtest',
1526 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1528 'media_test_support',
1531 'base/run_all_unittests.cc',
1532 'base/test_data_util.cc',
1533 'ffmpeg/ffmpeg_regression_tests.cc',
1534 'filters/pipeline_integration_test_base.cc',
1537 ['os_posix==1 and OS!="mac"', {
1539 ['linux_use_tcmalloc==1', {
1541 '../base/allocator/allocator.gyp:allocator',