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/video_capture_device_mac.h',
397 'video/capture/mac/video_capture_device_mac.mm',
398 'video/capture/mac/video_capture_device_qtkit_mac.h',
399 'video/capture/mac/video_capture_device_qtkit_mac.mm',
400 'video/capture/video_capture.h',
401 'video/capture/video_capture_device.cc',
402 'video/capture/video_capture_device.h',
403 'video/capture/video_capture_proxy.cc',
404 'video/capture/video_capture_proxy.h',
405 'video/capture/video_capture_types.cc',
406 'video/capture/video_capture_types.h',
407 'video/capture/win/capability_list_win.cc',
408 'video/capture/win/capability_list_win.h',
409 'video/capture/win/filter_base_win.cc',
410 'video/capture/win/filter_base_win.h',
411 'video/capture/win/pin_base_win.cc',
412 'video/capture/win/pin_base_win.h',
413 'video/capture/win/sink_filter_observer_win.h',
414 'video/capture/win/sink_filter_win.cc',
415 'video/capture/win/sink_filter_win.h',
416 'video/capture/win/sink_input_pin_win.cc',
417 'video/capture/win/sink_input_pin_win.h',
418 'video/capture/win/video_capture_device_mf_win.cc',
419 'video/capture/win/video_capture_device_mf_win.h',
420 'video/capture/win/video_capture_device_win.cc',
421 'video/capture/win/video_capture_device_win.h',
424 'video/video_decode_accelerator.cc',
425 'video/video_decode_accelerator.h',
426 'video/video_encode_accelerator.cc',
427 'video/video_encode_accelerator.h',
428 'webm/webm_audio_client.cc',
429 'webm/webm_audio_client.h',
430 'webm/webm_cluster_parser.cc',
431 'webm/webm_cluster_parser.h',
432 'webm/webm_constants.cc',
433 'webm/webm_constants.h',
434 'webm/webm_content_encodings.cc',
435 'webm/webm_content_encodings.h',
436 'webm/webm_content_encodings_client.cc',
437 'webm/webm_content_encodings_client.h',
438 'webm/webm_crypto_helpers.cc',
439 'webm/webm_crypto_helpers.h',
440 'webm/webm_info_parser.cc',
441 'webm/webm_info_parser.h',
442 'webm/webm_parser.cc',
443 'webm/webm_parser.h',
444 'webm/webm_stream_parser.cc',
445 'webm/webm_stream_parser.h',
446 'webm/webm_tracks_parser.cc',
447 'webm/webm_tracks_parser.h',
448 'webm/webm_video_client.cc',
449 'webm/webm_video_client.h',
450 'webm/webm_webvtt_parser.cc',
451 'webm/webm_webvtt_parser.h'
453 'direct_dependent_settings': {
464 ['media_use_ffmpeg==1', {
466 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
468 }, { # media_use_ffmpeg==0
469 # Exclude the sources that depend on ffmpeg.
471 'base/container_names.cc',
472 'base/container_names.h',
473 'base/media_file_checker.cc',
474 'base/media_file_checker.h',
475 'base/media_posix.cc',
476 'ffmpeg/ffmpeg_common.cc',
477 'ffmpeg/ffmpeg_common.h',
478 'filters/audio_file_reader.cc',
479 'filters/audio_file_reader.h',
480 'filters/blocking_url_protocol.cc',
481 'filters/blocking_url_protocol.h',
482 'filters/ffmpeg_audio_decoder.cc',
483 'filters/ffmpeg_audio_decoder.h',
484 'filters/ffmpeg_demuxer.cc',
485 'filters/ffmpeg_demuxer.h',
486 'filters/ffmpeg_glue.cc',
487 'filters/ffmpeg_glue.h',
488 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
489 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
490 'filters/ffmpeg_video_decoder.cc',
491 'filters/ffmpeg_video_decoder.h',
494 ['media_use_libvpx==1', {
496 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
498 }, { # media_use_libvpx==0
499 'direct_dependent_settings': {
501 'MEDIA_DISABLE_LIBVPX',
504 # Exclude the sources that depend on libvpx.
506 'filters/vpx_video_decoder.cc',
507 'filters/vpx_video_decoder.h',
512 '<(SHARED_INTERMEDIATE_DIR)/media',
515 'media_android_jni_headers',
517 'video_capture_android_jni_headers',
522 'base/media_stub.cc',
525 ['android_webview_build==0', {
532 'DISABLE_USER_INPUT_MONITOR',
535 # A simple WebM encoder for animated avatars on ChromeOS.
538 '../third_party/libvpx/libvpx.gyp:libvpx',
539 '../third_party/libyuv/libyuv.gyp:libyuv',
542 'webm/chromeos/ebml_writer.cc',
543 'webm/chromeos/ebml_writer.h',
544 'webm/chromeos/webm_encoder.cc',
545 'webm/chromeos/webm_encoder.h',
555 'sources/': [ ['exclude', '/alsa_'],
556 ['exclude', '/audio_manager_linux'] ],
560 'audio/openbsd/audio_manager_openbsd.cc',
561 'audio/openbsd/audio_manager_openbsd.h',
568 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
570 'pkg-config': 'pkg-config'
585 }, { # else: use_x11==0
587 'base/user_input_monitor_linux.cc',
590 'DISABLE_USER_INPUT_MONITOR',
595 '<!@(<(pkg-config) --cflags libcras)',
599 '<!@(<(pkg-config) --libs libcras)',
605 }, { # else: use_cras==0
607 'audio/cras/audio_manager_cras.cc',
608 'audio/cras/audio_manager_cras.h',
609 'audio/cras/cras_input.cc',
610 'audio/cras/cras_input.h',
611 'audio/cras/cras_unified.cc',
612 'audio/cras/cras_unified.h',
619 'audio/cras/audio_manager_cras.cc',
620 'audio/cras/audio_manager_cras.h',
621 'audio/cras/cras_input.cc',
622 'audio/cras/cras_input.h',
623 'audio/cras/cras_unified.cc',
624 'audio/cras/cras_unified.h',
627 ['use_pulseaudio==1', {
629 '<!@(pkg-config --cflags libpulse)',
635 ['linux_link_pulseaudio==0', {
640 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
641 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
642 'sig_files': ['audio/pulse/pulse.sigs'],
643 'outfile_type': 'posix_stubs',
644 'stubs_filename_root': 'pulse_stubs',
645 'project_path': 'media/audio/pulse',
646 'intermediate_dir': '<(INTERMEDIATE_DIR)',
647 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
654 'action_name': 'generate_stubs',
656 '<(generate_stubs_script)',
661 '<(intermediate_dir)/<(stubs_filename_root).cc',
662 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
665 '<(generate_stubs_script)',
666 '-i', '<(intermediate_dir)',
667 '-o', '<(output_root)/<(project_path)',
668 '-t', '<(outfile_type)',
669 '-e', '<(extra_header)',
670 '-s', '<(stubs_filename_root)',
671 '-p', '<(project_path)',
674 'process_outputs_as_sources': 1,
675 'message': 'Generating Pulse stubs for dynamic loading.',
679 # Linux/Solaris need libdl for dlopen() and friends.
680 ['OS=="linux" or OS=="solaris"', {
688 }, { # else: linux_link_pulseaudio==0
691 '<!@(pkg-config --libs-only-L --libs-only-other libpulse)',
694 '<!@(pkg-config --libs-only-l libpulse)',
699 }, { # else: use_pulseaudio==0
701 'audio/pulse/audio_manager_pulse.cc',
702 'audio/pulse/audio_manager_pulse.h',
703 'audio/pulse/pulse_input.cc',
704 'audio/pulse/pulse_input.h',
705 'audio/pulse/pulse_output.cc',
706 'audio/pulse/pulse_output.h',
707 'audio/pulse/pulse_unified.cc',
708 'audio/pulse/pulse_unified.h',
709 'audio/pulse/pulse_util.cc',
710 'audio/pulse/pulse_util.h',
716 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
717 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
718 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
719 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
720 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
721 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
722 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
735 # Specify delayload for media.dll.
745 # Specify delayload for components that link with media.lib.
746 'all_dependent_settings': {
757 # TODO(wolenetz): Fix size_t to int truncations in win64. See
758 # http://crbug.com/171009
760 ['target_arch=="x64"', {
761 'msvs_disabled_warnings': [ 4267, ],
765 ['proprietary_codecs==1', {
768 'mp2t/es_parser_adts.cc',
769 'mp2t/es_parser_adts.h',
770 'mp2t/es_parser_h264.cc',
771 'mp2t/es_parser_h264.h',
772 'mp2t/mp2t_common.h',
773 'mp2t/mp2t_stream_parser.cc',
774 'mp2t/mp2t_stream_parser.h',
778 'mp2t/ts_section_pat.cc',
779 'mp2t/ts_section_pat.h',
780 'mp2t/ts_section_pes.cc',
781 'mp2t/ts_section_pes.h',
782 'mp2t/ts_section_pmt.cc',
783 'mp2t/ts_section_pmt.h',
784 'mp2t/ts_section_psi.cc',
785 'mp2t/ts_section_psi.h',
786 'mp3/mp3_stream_parser.cc',
787 'mp3/mp3_stream_parser.h',
792 'mp4/box_definitions.cc',
793 'mp4/box_definitions.h',
798 'mp4/es_descriptor.cc',
799 'mp4/es_descriptor.h',
800 'mp4/mp4_stream_parser.cc',
801 'mp4/mp4_stream_parser.h',
802 'mp4/offset_byte_queue.cc',
803 'mp4/offset_byte_queue.h',
804 'mp4/track_run_iterator.cc',
805 'mp4/track_run_iterator.h',
808 ['toolkit_uses_gtk==1', {
810 '../build/linux/system.gyp:gtk',
813 ['target_arch=="ia32" or target_arch=="x64"', {
821 'base/simd/convert_yuv_to_rgb_x86.cc',
826 'ENABLE_EAC3_PLAYBACK',
829 ['OS!="linux" and OS!="win"', {
831 'base/keyboard_event_counter.cc',
832 'base/keyboard_event_counter.h',
838 'target_name': 'media_unittests',
839 'type': '<(gtest_target_type)',
842 'media_test_support',
843 'shared_memory_support',
844 '../base/base.gyp:base',
845 '../base/base.gyp:base_i18n',
846 '../base/base.gyp:test_support_base',
847 '../gpu/gpu.gyp:command_buffer_common',
848 '../skia/skia.gyp:skia',
849 '../testing/gmock.gyp:gmock',
850 '../testing/gtest.gyp:gtest',
851 '../ui/gfx/gfx.gyp:gfx',
855 'audio/android/audio_android_unittest.cc',
856 'audio/audio_input_controller_unittest.cc',
857 'audio/audio_input_unittest.cc',
858 'audio/audio_input_volume_unittest.cc',
859 'audio/audio_low_latency_input_output_unittest.cc',
860 'audio/audio_manager_unittest.cc',
861 'audio/audio_output_controller_unittest.cc',
862 'audio/audio_output_device_unittest.cc',
863 'audio/audio_output_proxy_unittest.cc',
864 'audio/audio_parameters_unittest.cc',
865 'audio/audio_power_monitor_unittest.cc',
866 'audio/fake_audio_consumer_unittest.cc',
867 'audio/linux/alsa_output_unittest.cc',
868 'audio/mac/audio_auhal_mac_unittest.cc',
869 'audio/mac/audio_device_listener_mac_unittest.cc',
870 'audio/mac/audio_low_latency_input_mac_unittest.cc',
871 'audio/simple_sources_unittest.cc',
872 'audio/virtual_audio_input_stream_unittest.cc',
873 'audio/virtual_audio_output_stream_unittest.cc',
874 'audio/win/audio_device_listener_win_unittest.cc',
875 'audio/win/audio_low_latency_input_win_unittest.cc',
876 'audio/win/audio_low_latency_output_win_unittest.cc',
877 'audio/win/audio_output_win_unittest.cc',
878 'audio/win/audio_unified_win_unittest.cc',
879 'audio/win/core_audio_util_win_unittest.cc',
880 'base/android/media_codec_bridge_unittest.cc',
881 'base/android/media_source_player_unittest.cc',
882 'base/audio_buffer_unittest.cc',
883 'base/audio_buffer_queue_unittest.cc',
884 'base/audio_bus_unittest.cc',
885 'base/audio_converter_unittest.cc',
886 'base/audio_fifo_unittest.cc',
887 'base/audio_hardware_config_unittest.cc',
888 'base/audio_hash_unittest.cc',
889 'base/audio_pull_fifo_unittest.cc',
890 'base/audio_renderer_mixer_input_unittest.cc',
891 'base/audio_renderer_mixer_unittest.cc',
892 'base/audio_splicer_unittest.cc',
893 'base/audio_timestamp_helper_unittest.cc',
894 'base/bind_to_loop_unittest.cc',
895 'base/bit_reader_unittest.cc',
896 'base/callback_holder.h',
897 'base/callback_holder_unittest.cc',
898 'base/channel_mixer_unittest.cc',
899 'base/clock_unittest.cc',
900 'base/container_names_unittest.cc',
901 'base/data_buffer_unittest.cc',
902 'base/decoder_buffer_queue_unittest.cc',
903 'base/decoder_buffer_unittest.cc',
904 'base/djb2_unittest.cc',
905 'base/gmock_callback_support_unittest.cc',
906 'base/media_file_checker_unittest.cc',
907 'base/multi_channel_resampler_unittest.cc',
908 'base/pipeline_unittest.cc',
909 'base/ranges_unittest.cc',
910 'base/run_all_unittests.cc',
911 'base/scoped_histogram_timer_unittest.cc',
912 'base/serial_runner_unittest.cc',
913 'base/seekable_buffer_unittest.cc',
914 'base/sinc_resampler_unittest.cc',
915 'base/test_data_util.cc',
916 'base/test_data_util.h',
917 'base/user_input_monitor_unittest.cc',
918 'base/vector_math_testing.h',
919 'base/vector_math_unittest.cc',
920 'base/video_frame_unittest.cc',
921 'base/video_util_unittest.cc',
922 'base/yuv_convert_unittest.cc',
923 'cdm/aes_decryptor_unittest.cc',
924 'ffmpeg/ffmpeg_common_unittest.cc',
925 'filters/audio_decoder_selector_unittest.cc',
926 'filters/audio_file_reader_unittest.cc',
927 'filters/audio_renderer_algorithm_unittest.cc',
928 'filters/audio_renderer_impl_unittest.cc',
929 'filters/blocking_url_protocol_unittest.cc',
930 'filters/chunk_demuxer_unittest.cc',
931 'filters/decrypting_audio_decoder_unittest.cc',
932 'filters/decrypting_demuxer_stream_unittest.cc',
933 'filters/decrypting_video_decoder_unittest.cc',
934 'filters/fake_demuxer_stream.cc',
935 'filters/fake_demuxer_stream.h',
936 'filters/fake_demuxer_stream_unittest.cc',
937 'filters/fake_video_decoder.cc',
938 'filters/fake_video_decoder.h',
939 'filters/fake_video_decoder_unittest.cc',
940 'filters/ffmpeg_audio_decoder_unittest.cc',
941 'filters/ffmpeg_demuxer_unittest.cc',
942 'filters/ffmpeg_glue_unittest.cc',
943 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
944 'filters/ffmpeg_video_decoder_unittest.cc',
945 'filters/file_data_source_unittest.cc',
946 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
947 'filters/pipeline_integration_test.cc',
948 'filters/pipeline_integration_test_base.cc',
949 'filters/skcanvas_video_renderer_unittest.cc',
950 'filters/source_buffer_stream_unittest.cc',
951 'filters/video_decoder_selector_unittest.cc',
952 'filters/video_frame_stream_unittest.cc',
953 'filters/video_renderer_base_unittest.cc',
954 'video/capture/video_capture_device_unittest.cc',
955 'webm/cluster_builder.cc',
956 'webm/cluster_builder.h',
957 'webm/tracks_builder.cc',
958 'webm/tracks_builder.h',
959 'webm/webm_cluster_parser_unittest.cc',
960 'webm/webm_content_encodings_client_unittest.cc',
961 'webm/webm_parser_unittest.cc',
962 'webm/webm_tracks_parser_unittest.cc',
963 'webm/webm_webvtt_parser_unittest.cc',
971 ['media_use_ffmpeg==1', {
973 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
975 }, { # media_use_ffmpeg== 0
977 'base/media_file_checker_unittest.cc',
985 ['use_pulseaudio==1', {
990 ['os_posix==1 and OS!="mac"', {
992 ['linux_use_tcmalloc==1', {
994 '../base/allocator/allocator.gyp:allocator',
1001 'audio/audio_input_volume_unittest.cc',
1002 'base/container_names_unittest.cc',
1003 'ffmpeg/ffmpeg_common_unittest.cc',
1004 'filters/audio_file_reader_unittest.cc',
1005 'filters/blocking_url_protocol_unittest.cc',
1006 'filters/ffmpeg_audio_decoder_unittest.cc',
1007 'filters/ffmpeg_demuxer_unittest.cc',
1008 'filters/ffmpeg_glue_unittest.cc',
1009 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1010 'filters/ffmpeg_video_decoder_unittest.cc',
1011 'filters/pipeline_integration_test.cc',
1012 'filters/pipeline_integration_test_base.cc',
1015 ['gtest_target_type=="shared_library"', {
1017 '../testing/android/native_test.gyp:native_test_native_code',
1027 'audio/cras/cras_input_unittest.cc',
1028 'audio/cras/cras_unified_unittest.cc',
1038 'audio/linux/alsa_output_unittest.cc',
1039 'audio/audio_low_latency_input_output_unittest.cc',
1042 ['target_arch=="ia32" or target_arch=="x64"', {
1044 'base/simd/convert_rgb_to_yuv_unittest.cc',
1047 ['proprietary_codecs==1', {
1049 'mp2t/mp2t_stream_parser_unittest.cc',
1050 'mp3/mp3_stream_parser_unittest.cc',
1051 'mp4/aac_unittest.cc',
1052 'mp4/avc_unittest.cc',
1053 'mp4/box_reader_unittest.cc',
1054 'mp4/es_descriptor_unittest.cc',
1055 'mp4/mp4_stream_parser_unittest.cc',
1056 'mp4/offset_byte_queue_unittest.cc',
1057 'mp4/track_run_iterator_unittest.cc',
1060 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1061 # http://crbug.com/171009
1062 ['OS=="win" and target_arch=="x64"', {
1063 'msvs_disabled_warnings': [ 4267, ],
1068 'target_name': 'media_test_support',
1069 'type': 'static_library',
1072 '../base/base.gyp:base',
1073 '../skia/skia.gyp:skia',
1074 '../testing/gmock.gyp:gmock',
1075 '../testing/gtest.gyp:gtest',
1078 'audio/mock_audio_manager.cc',
1079 'audio/mock_audio_manager.h',
1080 'audio/test_audio_input_controller_factory.cc',
1081 'audio/test_audio_input_controller_factory.h',
1082 'base/fake_audio_render_callback.cc',
1083 'base/fake_audio_render_callback.h',
1084 'base/fake_audio_renderer_sink.cc',
1085 'base/fake_audio_renderer_sink.h',
1086 'base/gmock_callback_support.h',
1087 'base/mock_audio_renderer_sink.cc',
1088 'base/mock_audio_renderer_sink.h',
1089 'base/mock_data_source_host.cc',
1090 'base/mock_data_source_host.h',
1091 'base/mock_demuxer_host.cc',
1092 'base/mock_demuxer_host.h',
1093 'base/mock_filters.cc',
1094 'base/mock_filters.h',
1095 'base/test_helpers.cc',
1096 'base/test_helpers.h',
1097 'filters/mock_gpu_video_accelerator_factories.cc',
1098 'filters/mock_gpu_video_accelerator_factories.h',
1099 'video/mock_video_decode_accelerator.cc',
1100 'video/mock_video_decode_accelerator.h',
1104 # Minimal target for NaCl and other renderer side media clients which
1105 # only need to send audio data across the shared memory to the browser
1107 'target_name': 'shared_memory_support',
1108 'type': '<(component)',
1110 '../base/base.gyp:base',
1113 'MEDIA_IMPLEMENTATION',
1119 'shared_memory_support.gypi',
1122 '<@(shared_memory_support_sources)',
1130 ['target_arch=="ia32" or target_arch=="x64"', {
1132 'shared_memory_support_sse'
1138 'target_name': 'demuxer_bench',
1139 'type': 'executable',
1142 '../base/base.gyp:base',
1145 'tools/demuxer_bench/demuxer_bench.cc',
1147 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1148 'msvs_disabled_warnings': [ 4267, ],
1152 ['target_arch!="arm"', {
1155 'target_name': 'media_asm',
1156 'type': 'static_library',
1158 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1159 'base/simd/convert_yuv_to_rgb_mmx.asm',
1160 'base/simd/convert_yuv_to_rgb_sse.asm',
1161 'base/simd/convert_yuva_to_argb_mmx.asm',
1162 'base/simd/empty_register_state_mmx.asm',
1163 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1164 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1165 'base/simd/scale_yuv_to_rgb_mmx.asm',
1166 'base/simd/scale_yuv_to_rgb_sse.asm',
1169 ['component=="shared_library"', {
1171 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1174 ['target_arch=="x64"', {
1175 # Source files optimized for X64 systems.
1177 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1178 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1181 'yasm_flags': ['-DARCH_X86_64'],
1192 # XCode doesn't want to link a pure assembly target and will
1193 # fail to link when it creates an empty file list. So add a
1194 # dummy file keep the linker happy. See http://crbug.com/157073
1195 'base/simd/xcode_hack.c',
1198 ['os_posix==1 and OS!="mac"', {
1201 ['target_arch=="ia32"', {
1217 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1220 # In addition to the same path as source asm, let yasm %include
1221 # search path be relative to src/ per Chromium policy.
1225 '../third_party/x86inc/x86inc.asm',
1226 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1227 'base/simd/convert_yuv_to_rgb_mmx.inc',
1228 'base/simd/convert_yuva_to_argb_mmx.inc',
1229 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1230 'base/simd/media_export.asm',
1231 'base/simd/scale_yuv_to_rgb_mmx.inc',
1234 'msvs_2010_disable_uldi_when_referenced': 1,
1236 '../third_party/yasm/yasm_compile.gypi',
1240 'target_name': 'media_mmx',
1241 'type': 'static_library',
1246 'MEDIA_IMPLEMENTATION',
1252 'base/simd/filter_yuv_mmx.cc',
1256 'target_name': 'media_sse',
1257 'type': 'static_library',
1262 'MEDIA_IMPLEMENTATION',
1268 'base/simd/sinc_resampler_sse.cc',
1272 'target_name': 'media_sse2',
1273 'type': 'static_library',
1278 'MEDIA_IMPLEMENTATION',
1284 'base/simd/convert_rgb_to_yuv_sse2.cc',
1285 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1286 'base/simd/filter_yuv_sse2.cc',
1290 'target_name': 'shared_memory_support_sse',
1291 'type': 'static_library',
1296 'MEDIA_IMPLEMENTATION',
1302 'base/simd/vector_math_sse.cc',
1310 'target_name': 'player_x11',
1311 'type': 'executable',
1314 '../base/base.gyp:base',
1315 '../ui/gl/gl.gyp:gl',
1316 '../ui/gfx/gfx.gyp:gfx',
1327 # Linux/Solaris need libdl for dlopen() and friends.
1328 ['OS=="linux" or OS=="solaris"', {
1337 'tools/player_x11/data_source_logger.cc',
1338 'tools/player_x11/data_source_logger.h',
1339 'tools/player_x11/gl_video_renderer.cc',
1340 'tools/player_x11/gl_video_renderer.h',
1341 'tools/player_x11/player_x11.cc',
1342 'tools/player_x11/x11_video_renderer.cc',
1343 'tools/player_x11/x11_video_renderer.h',
1348 # Special target to wrap a gtest_target_type==shared_library
1349 # media_unittests into an android apk for execution.
1350 ['OS=="android" and gtest_target_type=="shared_library"', {
1353 'target_name': 'media_unittests_apk',
1360 'test_suite_name': 'media_unittests',
1361 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)media_unittests<(SHARED_LIB_SUFFIX)',
1363 'includes': ['../build/apk_test.gypi'],
1370 'target_name': 'media_android_jni_headers',
1373 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1374 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1375 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1376 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1377 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1378 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1381 'jni_gen_package': 'media',
1383 'includes': ['../build/jni_generator.gypi'],
1386 'target_name': 'video_capture_android_jni_headers',
1389 'base/android/java/src/org/chromium/media/VideoCapture.java',
1392 'jni_gen_package': 'media',
1394 'includes': ['../build/jni_generator.gypi'],
1397 'target_name': 'player_android',
1398 'type': 'static_library',
1400 'base/android/audio_decoder_job.cc',
1401 'base/android/audio_decoder_job.h',
1402 'base/android/media_codec_bridge.cc',
1403 'base/android/media_codec_bridge.h',
1404 'base/android/media_decoder_job.cc',
1405 'base/android/media_decoder_job.h',
1406 'base/android/media_drm_bridge.cc',
1407 'base/android/media_drm_bridge.h',
1408 'base/android/media_jni_registrar.cc',
1409 'base/android/media_jni_registrar.h',
1410 'base/android/media_player_android.cc',
1411 'base/android/media_player_android.h',
1412 'base/android/media_player_bridge.cc',
1413 'base/android/media_player_bridge.h',
1414 'base/android/media_player_listener.cc',
1415 'base/android/media_player_listener.h',
1416 'base/android/media_source_player.cc',
1417 'base/android/media_source_player.h',
1418 'base/android/video_decoder_job.cc',
1419 'base/android/video_decoder_job.h',
1420 'base/android/webaudio_media_codec_bridge.cc',
1421 'base/android/webaudio_media_codec_bridge.h',
1422 'base/android/webaudio_media_codec_info.h',
1425 '../base/base.gyp:base',
1426 '../ui/gl/gl.gyp:gl',
1427 '../url/url.gyp:url_lib',
1428 'media_android_jni_headers',
1431 'MEDIA_IMPLEMENTATION',
1434 '<(SHARED_INTERMEDIATE_DIR)/media',
1438 'target_name': 'media_java',
1441 '../base/base.gyp:base',
1442 'media_android_imageformat_list',
1444 'export_dependent_settings': [
1445 '../base/base.gyp:base',
1448 'java_in_dir': 'base/android/java',
1450 'includes': ['../build/java.gypi'],
1453 'target_name': 'media_android_imageformat_list',
1456 'base/android/java/src/org/chromium/media/ImageFormat.template',
1459 'package_name': 'org/chromium/media',
1460 'template_deps': ['video/capture/android/imageformat_list.h'],
1462 'includes': [ '../build/android/java_cpp_template.gypi' ],
1466 ['media_use_ffmpeg==1', {
1469 'target_name': 'ffmpeg_unittests',
1470 'type': 'executable',
1472 '../base/base.gyp:base',
1473 '../base/base.gyp:base_i18n',
1474 '../base/base.gyp:test_support_base',
1475 '../base/base.gyp:test_support_perf',
1476 '../testing/gtest.gyp:gtest',
1477 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1479 'media_test_support',
1482 'ffmpeg/ffmpeg_unittest.cc',
1485 ['toolkit_uses_gtk==1', {
1487 # Needed for the following #include chain:
1488 # base/run_all_unittests.cc
1489 # ../base/test_suite.h
1491 '../build/linux/system.gyp:gtk',
1494 ['linux_use_tcmalloc==1', {
1496 '../base/allocator/allocator.gyp:allocator',
1504 'target_name': 'ffmpeg_regression_tests',
1505 'type': 'executable',
1507 '../base/base.gyp:test_support_base',
1508 '../testing/gmock.gyp:gmock',
1509 '../testing/gtest.gyp:gtest',
1510 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1512 'media_test_support',
1515 'base/run_all_unittests.cc',
1516 'base/test_data_util.cc',
1517 'ffmpeg/ffmpeg_regression_tests.cc',
1518 'filters/pipeline_integration_test_base.cc',
1521 ['os_posix==1 and OS!="mac"', {
1523 ['linux_use_tcmalloc==1', {
1525 '../base/allocator/allocator.gyp:allocator',