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. 4 5 { 6 'variables': { 7 'chromium_code': 1, 8 # Override to dynamically link the cras (ChromeOS audio) library. 9 'use_cras%': 0, 10 # Option e.g. for Linux distributions to link pulseaudio directly 11 # (DT_NEEDED) instead of using dlopen. This helps with automated 12 # detection of ABI mismatches and prevents silent errors. 13 'linux_link_pulseaudio%': 0, 14 'conditions': [ 15 ['OS=="android" or OS=="ios"', { 16 # Android and iOS don't use ffmpeg. 17 'media_use_ffmpeg%': 0, 18 # Android and iOS don't use libvpx. 19 'media_use_libvpx%': 0, 20 }, { # 'OS!="android" and OS!="ios"' 21 'media_use_ffmpeg%': 1, 22 'media_use_libvpx%': 1, 23 }], 24 # ALSA usage. 25 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', { 26 'use_alsa%': 1, 27 }, { 28 'use_alsa%': 0, 29 }], 30 ['os_posix==1 and OS!="mac" and OS!="ios" and OS!="android" and chromeos!=1', { 31 'use_pulseaudio%': 1, 32 }, { 33 'use_pulseaudio%': 0, 34 }], 35 ], 36 }, 37 'targets': [ 38 { 39 'target_name': 'media', 40 'type': '<(component)', 41 'dependencies': [ 42 '../base/base.gyp:base', 43 '../crypto/crypto.gyp:crypto', 44 '../skia/skia.gyp:skia', 45 '../third_party/opus/opus.gyp:opus', 46 '../ui/ui.gyp:ui', 47 '../url/url.gyp:url_lib', 48 ], 49 'defines': [ 50 'MEDIA_IMPLEMENTATION', 51 ], 52 'include_dirs': [ 53 '..', 54 ], 55 'sources': [ 56 'audio/agc_audio_stream.h', 57 'audio/android/audio_manager_android.cc', 58 'audio/android/audio_manager_android.h', 59 'audio/android/opensles_input.cc', 60 'audio/android/opensles_input.h', 61 'audio/android/opensles_output.cc', 62 'audio/android/opensles_output.h', 63 'audio/async_socket_io_handler.h', 64 'audio/async_socket_io_handler_posix.cc', 65 'audio/async_socket_io_handler_win.cc', 66 'audio/audio_buffers_state.cc', 67 'audio/audio_buffers_state.h', 68 'audio/audio_device_name.cc', 69 'audio/audio_device_name.h', 70 'audio/audio_device_thread.cc', 71 'audio/audio_device_thread.h', 72 'audio/audio_input_controller.cc', 73 'audio/audio_input_controller.h', 74 'audio/audio_input_device.cc', 75 'audio/audio_input_device.h', 76 'audio/audio_input_ipc.cc', 77 'audio/audio_input_ipc.h', 78 'audio/audio_io.h', 79 'audio/audio_manager.cc', 80 'audio/audio_manager.h', 81 'audio/audio_manager_base.cc', 82 'audio/audio_manager_base.h', 83 'audio/audio_output_controller.cc', 84 'audio/audio_output_controller.h', 85 'audio/audio_output_device.cc', 86 'audio/audio_output_device.h', 87 'audio/audio_output_dispatcher.cc', 88 'audio/audio_output_dispatcher.h', 89 'audio/audio_output_dispatcher_impl.cc', 90 'audio/audio_output_dispatcher_impl.h', 91 'audio/audio_output_ipc.cc', 92 'audio/audio_output_ipc.h', 93 'audio/audio_output_proxy.cc', 94 'audio/audio_output_proxy.h', 95 'audio/audio_output_resampler.cc', 96 'audio/audio_output_resampler.h', 97 'audio/audio_power_monitor.cc', 98 'audio/audio_power_monitor.h', 99 'audio/audio_source_diverter.h', 100 'audio/audio_util.cc', 101 'audio/audio_util.h', 102 'audio/cras/audio_manager_cras.cc', 103 'audio/cras/audio_manager_cras.h', 104 'audio/cras/cras_input.cc', 105 'audio/cras/cras_input.h', 106 'audio/cras/cras_unified.cc', 107 'audio/cras/cras_unified.h', 108 'audio/cross_process_notification.cc', 109 'audio/cross_process_notification.h', 110 'audio/cross_process_notification_posix.cc', 111 'audio/cross_process_notification_win.cc', 112 'audio/fake_audio_consumer.cc', 113 'audio/fake_audio_consumer.h', 114 'audio/fake_audio_input_stream.cc', 115 'audio/fake_audio_input_stream.h', 116 'audio/fake_audio_output_stream.cc', 117 'audio/fake_audio_output_stream.h', 118 'audio/ios/audio_manager_ios.h', 119 'audio/ios/audio_manager_ios.mm', 120 'audio/ios/audio_session_util_ios.h', 121 'audio/ios/audio_session_util_ios.mm', 122 'audio/linux/alsa_input.cc', 123 'audio/linux/alsa_input.h', 124 'audio/linux/alsa_output.cc', 125 'audio/linux/alsa_output.h', 126 'audio/linux/alsa_util.cc', 127 'audio/linux/alsa_util.h', 128 'audio/linux/alsa_wrapper.cc', 129 'audio/linux/alsa_wrapper.h', 130 'audio/linux/audio_manager_linux.cc', 131 'audio/linux/audio_manager_linux.h', 132 'audio/mac/aggregate_device_manager.cc', 133 'audio/mac/aggregate_device_manager.h', 134 'audio/mac/audio_auhal_mac.cc', 135 'audio/mac/audio_auhal_mac.h', 136 'audio/mac/audio_device_listener_mac.cc', 137 'audio/mac/audio_device_listener_mac.h', 138 'audio/mac/audio_input_mac.cc', 139 'audio/mac/audio_input_mac.h', 140 'audio/mac/audio_low_latency_input_mac.cc', 141 'audio/mac/audio_low_latency_input_mac.h', 142 'audio/mac/audio_low_latency_output_mac.cc', 143 'audio/mac/audio_low_latency_output_mac.h', 144 'audio/mac/audio_manager_mac.cc', 145 'audio/mac/audio_manager_mac.h', 146 'audio/mac/audio_synchronized_mac.cc', 147 'audio/mac/audio_synchronized_mac.h', 148 'audio/mac/audio_unified_mac.cc', 149 'audio/mac/audio_unified_mac.h', 150 'audio/null_audio_sink.cc', 151 'audio/null_audio_sink.h', 152 'audio/openbsd/audio_manager_openbsd.cc', 153 'audio/openbsd/audio_manager_openbsd.h', 154 'audio/pulse/audio_manager_pulse.cc', 155 'audio/pulse/audio_manager_pulse.h', 156 'audio/pulse/pulse_output.cc', 157 'audio/pulse/pulse_output.h', 158 'audio/pulse/pulse_input.cc', 159 'audio/pulse/pulse_input.h', 160 'audio/pulse/pulse_unified.cc', 161 'audio/pulse/pulse_unified.h', 162 'audio/pulse/pulse_util.cc', 163 'audio/pulse/pulse_util.h', 164 'audio/sample_rates.cc', 165 'audio/sample_rates.h', 166 'audio/scoped_loop_observer.cc', 167 'audio/scoped_loop_observer.h', 168 'audio/simple_sources.cc', 169 'audio/simple_sources.h', 170 'audio/virtual_audio_input_stream.cc', 171 'audio/virtual_audio_input_stream.h', 172 'audio/virtual_audio_output_stream.cc', 173 'audio/virtual_audio_output_stream.h', 174 'audio/win/audio_device_listener_win.cc', 175 'audio/win/audio_device_listener_win.h', 176 'audio/win/audio_low_latency_input_win.cc', 177 'audio/win/audio_low_latency_input_win.h', 178 'audio/win/audio_low_latency_output_win.cc', 179 'audio/win/audio_low_latency_output_win.h', 180 'audio/win/audio_manager_win.cc', 181 'audio/win/audio_manager_win.h', 182 'audio/win/audio_unified_win.cc', 183 'audio/win/audio_unified_win.h', 184 'audio/win/avrt_wrapper_win.cc', 185 'audio/win/avrt_wrapper_win.h', 186 'audio/win/device_enumeration_win.cc', 187 'audio/win/device_enumeration_win.h', 188 'audio/win/core_audio_util_win.cc', 189 'audio/win/core_audio_util_win.h', 190 'audio/win/wavein_input_win.cc', 191 'audio/win/wavein_input_win.h', 192 'audio/win/waveout_output_win.cc', 193 'audio/win/waveout_output_win.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', 211 'base/audio_fifo.h', 212 'base/audio_hardware_config.cc', 213 'base/audio_hardware_config.h', 214 'base/audio_hash.cc', 215 'base/audio_hash.h', 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_sink.h', 221 'base/audio_renderer_mixer.cc', 222 'base/audio_renderer_mixer.h', 223 'base/audio_renderer_mixer_input.cc', 224 'base/audio_renderer_mixer_input.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/bitstream_buffer.h', 231 'base/bit_reader.cc', 232 'base/bit_reader.h', 233 'base/buffers.h', 234 'base/byte_queue.cc', 235 'base/byte_queue.h', 236 'base/channel_mixer.cc', 237 'base/channel_mixer.h', 238 'base/clock.cc', 239 'base/clock.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/decryptor.cc', 251 'base/decryptor.h', 252 'base/decrypt_config.cc', 253 'base/decrypt_config.h', 254 'base/demuxer.cc', 255 'base/demuxer.h', 256 'base/demuxer_stream.cc', 257 'base/demuxer_stream.h', 258 'base/djb2.cc', 259 'base/djb2.h', 260 'base/filter_collection.cc', 261 'base/filter_collection.h', 262 'base/media.cc', 263 'base/media.h', 264 'base/media_file_checker.cc', 265 'base/media_file_checker.h', 266 'base/media_keys.cc', 267 'base/media_keys.h', 268 'base/media_log.cc', 269 'base/media_log.h', 270 'base/media_log_event.h', 271 'base/media_posix.cc', 272 'base/media_switches.cc', 273 'base/media_switches.h', 274 'base/media_win.cc', 275 'base/multi_channel_resampler.cc', 276 'base/multi_channel_resampler.h', 277 'base/pipeline.cc', 278 'base/pipeline.h', 279 'base/pipeline_status.cc', 280 'base/pipeline_status.h', 281 'base/ranges.cc', 282 'base/ranges.h', 283 'base/sample_format.cc', 284 'base/sample_format.h', 285 'base/scoped_histogram_timer.h', 286 'base/seekable_buffer.cc', 287 'base/seekable_buffer.h', 288 'base/serial_runner.cc', 289 'base/serial_runner.h', 290 'base/simd/convert_rgb_to_yuv.h', 291 'base/simd/convert_rgb_to_yuv_c.cc', 292 'base/simd/convert_yuv_to_rgb.h', 293 'base/simd/convert_yuv_to_rgb_c.cc', 294 'base/simd/filter_yuv.h', 295 'base/simd/filter_yuv_c.cc', 296 'base/simd/yuv_to_rgb_table.cc', 297 'base/simd/yuv_to_rgb_table.h', 298 'base/sinc_resampler.cc', 299 'base/sinc_resampler.h', 300 'base/stream_parser.cc', 301 'base/stream_parser.h', 302 'base/stream_parser_buffer.cc', 303 'base/stream_parser_buffer.h', 304 'base/text_track.h', 305 'base/video_decoder.cc', 306 'base/video_decoder.h', 307 'base/video_decoder_config.cc', 308 'base/video_decoder_config.h', 309 'base/video_frame.cc', 310 'base/video_frame.h', 311 'base/video_renderer.cc', 312 'base/video_renderer.h', 313 'base/video_util.cc', 314 'base/video_util.h', 315 'base/yuv_convert.cc', 316 'base/yuv_convert.h', 317 'cdm/aes_decryptor.cc', 318 'cdm/aes_decryptor.h', 319 'ffmpeg/ffmpeg_common.cc', 320 'ffmpeg/ffmpeg_common.h', 321 'filters/audio_decoder_selector.cc', 322 'filters/audio_decoder_selector.h', 323 'filters/audio_file_reader.cc', 324 'filters/audio_file_reader.h', 325 'filters/audio_renderer_algorithm.cc', 326 'filters/audio_renderer_algorithm.h', 327 'filters/audio_renderer_impl.cc', 328 'filters/audio_renderer_impl.h', 329 'filters/blocking_url_protocol.cc', 330 'filters/blocking_url_protocol.h', 331 'filters/chunk_demuxer.cc', 332 'filters/chunk_demuxer.h', 333 'filters/decrypting_audio_decoder.cc', 334 'filters/decrypting_audio_decoder.h', 335 'filters/decrypting_demuxer_stream.cc', 336 'filters/decrypting_demuxer_stream.h', 337 'filters/decrypting_video_decoder.cc', 338 'filters/decrypting_video_decoder.h', 339 'filters/ffmpeg_audio_decoder.cc', 340 'filters/ffmpeg_audio_decoder.h', 341 'filters/ffmpeg_demuxer.cc', 342 'filters/ffmpeg_demuxer.h', 343 'filters/ffmpeg_glue.cc', 344 'filters/ffmpeg_glue.h', 345 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc', 346 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h', 347 'filters/ffmpeg_video_decoder.cc', 348 'filters/ffmpeg_video_decoder.h', 349 'filters/file_data_source.cc', 350 'filters/file_data_source.h', 351 'filters/gpu_video_decoder.cc', 352 'filters/gpu_video_decoder.h', 353 'filters/gpu_video_decoder_factories.cc', 354 'filters/gpu_video_decoder_factories.h', 355 'filters/h264_to_annex_b_bitstream_converter.cc', 356 'filters/h264_to_annex_b_bitstream_converter.h', 357 'filters/in_memory_url_protocol.cc', 358 'filters/in_memory_url_protocol.h', 359 'filters/opus_audio_decoder.cc', 360 'filters/opus_audio_decoder.h', 361 'filters/skcanvas_video_renderer.cc', 362 'filters/skcanvas_video_renderer.h', 363 'filters/source_buffer_stream.cc', 364 'filters/source_buffer_stream.h', 365 'filters/stream_parser_factory.cc', 366 'filters/stream_parser_factory.h', 367 'filters/video_decoder_selector.cc', 368 'filters/video_decoder_selector.h', 369 'filters/video_frame_stream.cc', 370 'filters/video_frame_stream.h', 371 'filters/video_renderer_base.cc', 372 'filters/video_renderer_base.h', 373 'filters/vpx_video_decoder.cc', 374 'filters/vpx_video_decoder.h', 375 'midi/midi_manager.h', 376 'midi/midi_manager.cc', 377 'midi/midi_manager_mac.h', 378 'midi/midi_manager_mac.cc', 379 'midi/midi_port_info.h', 380 'midi/midi_port_info.cc', 381 'video/capture/android/video_capture_device_android.cc', 382 'video/capture/android/video_capture_device_android.h', 383 'video/capture/fake_video_capture_device.cc', 384 'video/capture/fake_video_capture_device.h', 385 'video/capture/linux/video_capture_device_linux.cc', 386 'video/capture/linux/video_capture_device_linux.h', 387 'video/capture/mac/video_capture_device_mac.h', 388 'video/capture/mac/video_capture_device_mac.mm', 389 'video/capture/mac/video_capture_device_qtkit_mac.h', 390 'video/capture/mac/video_capture_device_qtkit_mac.mm', 391 392 'video/capture/video_capture.h', 393 'video/capture/video_capture_device.cc', 394 'video/capture/video_capture_device.h', 395 'video/capture/video_capture_device_dummy.cc', 396 'video/capture/video_capture_device_dummy.h', 397 'video/capture/video_capture_proxy.cc', 398 'video/capture/video_capture_proxy.h', 399 'video/capture/video_capture_types.h', 400 'video/capture/win/capability_list_win.cc', 401 'video/capture/win/capability_list_win.h', 402 'video/capture/win/filter_base_win.cc', 403 'video/capture/win/filter_base_win.h', 404 'video/capture/win/pin_base_win.cc', 405 'video/capture/win/pin_base_win.h', 406 'video/capture/win/sink_filter_observer_win.h', 407 'video/capture/win/sink_filter_win.cc', 408 'video/capture/win/sink_filter_win.h', 409 'video/capture/win/sink_input_pin_win.cc', 410 'video/capture/win/sink_input_pin_win.h', 411 'video/capture/win/video_capture_device_mf_win.cc', 412 'video/capture/win/video_capture_device_mf_win.h', 413 'video/capture/win/video_capture_device_win.cc', 414 'video/capture/win/video_capture_device_win.h', 415 'video/picture.cc', 416 'video/picture.h', 417 'video/video_decode_accelerator.cc', 418 'video/video_decode_accelerator.h', 419 'webm/webm_audio_client.cc', 420 'webm/webm_audio_client.h', 421 'webm/webm_cluster_parser.cc', 422 'webm/webm_cluster_parser.h', 423 'webm/webm_constants.cc', 424 'webm/webm_constants.h', 425 'webm/webm_content_encodings.cc', 426 'webm/webm_content_encodings.h', 427 'webm/webm_content_encodings_client.cc', 428 'webm/webm_content_encodings_client.h', 429 'webm/webm_crypto_helpers.cc', 430 'webm/webm_crypto_helpers.h', 431 'webm/webm_info_parser.cc', 432 'webm/webm_info_parser.h', 433 'webm/webm_parser.cc', 434 'webm/webm_parser.h', 435 'webm/webm_stream_parser.cc', 436 'webm/webm_stream_parser.h', 437 'webm/webm_tracks_parser.cc', 438 'webm/webm_tracks_parser.h', 439 'webm/webm_video_client.cc', 440 'webm/webm_video_client.h', 441 'webm/webm_webvtt_parser.cc', 442 'webm/webm_webvtt_parser.h' 443 ], 444 'direct_dependent_settings': { 445 'include_dirs': [ 446 '..', 447 ], 448 }, 449 'conditions': [ 450 ['arm_neon==1', { 451 'defines': [ 452 'USE_NEON' 453 ], 454 }], 455 ['OS!="ios"', { 456 'dependencies': [ 457 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 458 '../gpu/gpu.gyp:command_buffer_common', 459 'shared_memory_support', 460 ], 461 }], 462 ['media_use_ffmpeg==1', { 463 'dependencies': [ 464 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', 465 ], 466 }, { # media_use_ffmpeg==0 467 # Exclude the sources that depend on ffmpeg. 468 'sources!': [ 469 'base/container_names.cc', 470 'base/container_names.h', 471 'base/media_file_checker.cc', 472 'base/media_file_checker.h', 473 'base/media_posix.cc', 474 'ffmpeg/ffmpeg_common.cc', 475 'ffmpeg/ffmpeg_common.h', 476 'filters/audio_file_reader.cc', 477 'filters/audio_file_reader.h', 478 'filters/blocking_url_protocol.cc', 479 'filters/blocking_url_protocol.h', 480 'filters/ffmpeg_audio_decoder.cc', 481 'filters/ffmpeg_audio_decoder.h', 482 'filters/ffmpeg_demuxer.cc', 483 'filters/ffmpeg_demuxer.h', 484 'filters/ffmpeg_glue.cc', 485 'filters/ffmpeg_glue.h', 486 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc', 487 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h', 488 'filters/ffmpeg_video_decoder.cc', 489 'filters/ffmpeg_video_decoder.h', 490 ], 491 }], 492 ['media_use_libvpx==1', { 493 'dependencies': [ 494 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx', 495 ], 496 }, { # media_use_libvpx==0 497 'direct_dependent_settings': { 498 'defines': [ 499 'MEDIA_DISABLE_LIBVPX', 500 ], 501 }, 502 # Exclude the sources that depend on libvpx. 503 'sources!': [ 504 'filters/vpx_video_decoder.cc', 505 'filters/vpx_video_decoder.h', 506 ], 507 }], 508 ['OS=="ios"', { 509 'includes': [ 510 # For shared_memory_support_sources variable. 511 'shared_memory_support.gypi', 512 ], 513 'sources': [ 514 'base/media_stub.cc', 515 # These sources are normally built via a dependency on the 516 # shared_memory_support target, but that target is not built on iOS. 517 # Instead, directly build only the files that are needed for iOS. 518 '<@(shared_memory_support_sources)', 519 ], 520 'sources/': [ 521 # Exclude everything but iOS-specific files. 522 ['exclude', '\\.(cc|mm)$'], 523 ['include', '_ios\\.(cc|mm)$'], 524 ['include', '(^|/)ios/'], 525 # Re-include specific pieces. 526 # iOS support is limited to audio input only. 527 ['include', '^audio/audio_buffers_state\\.'], 528 ['include', '^audio/audio_input_controller\\.'], 529 ['include', '^audio/audio_manager\\.'], 530 ['include', '^audio/audio_manager_base\\.'], 531 ['include', '^audio/audio_parameters\\.'], 532 ['include', '^audio/fake_audio_consumer\\.'], 533 ['include', '^audio/fake_audio_input_stream\\.'], 534 ['include', '^audio/fake_audio_output_stream\\.'], 535 ['include', '^base/audio_bus\\.'], 536 ['include', '^base/channel_layout\\.'], 537 ['include', '^base/media\\.cc$'], 538 ['include', '^base/media_stub\\.cc$'], 539 ['include', '^base/media_switches\\.'], 540 ['include', '^base/vector_math\\.'], 541 ], 542 'link_settings': { 543 'libraries': [ 544 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework', 545 '$(SDKROOT)/System/Library/Frameworks/AVFoundation.framework', 546 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', 547 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework', 548 ], 549 }, 550 }], 551 ['OS=="android"', { 552 'link_settings': { 553 'libraries': [ 554 '-lOpenSLES', 555 ], 556 }, 557 'include_dirs': [ 558 '<(SHARED_INTERMEDIATE_DIR)/media', 559 ], 560 'dependencies': [ 561 'media_android_jni_headers', 562 'player_android', 563 'video_capture_android_jni_headers', 564 ], 565 'sources': [ 566 'base/media.cc', 567 'base/media.h', 568 'base/media_stub.cc', 569 ], 570 'conditions': [ 571 ['android_webview_build==0', { 572 'dependencies': [ 573 'media_java', 574 ], 575 }], 576 ], 577 }], 578 # A simple WebM encoder for animated avatars on ChromeOS. 579 ['chromeos==1', { 580 'dependencies': [ 581 '../third_party/libvpx/libvpx.gyp:libvpx', 582 '../third_party/libyuv/libyuv.gyp:libyuv', 583 ], 584 'sources': [ 585 'webm/chromeos/ebml_writer.cc', 586 'webm/chromeos/ebml_writer.h', 587 'webm/chromeos/webm_encoder.cc', 588 'webm/chromeos/webm_encoder.h', 589 ], 590 }], 591 ['use_alsa==1', { 592 'link_settings': { 593 'libraries': [ 594 '-lasound', 595 ], 596 }, 597 }, { # use_alsa==0 598 'sources/': [ ['exclude', '/alsa_'], 599 ['exclude', '/audio_manager_linux'] ], 600 }], 601 ['OS!="openbsd"', { 602 'sources!': [ 603 'audio/openbsd/audio_manager_openbsd.cc', 604 'audio/openbsd/audio_manager_openbsd.h', 605 ], 606 }], 607 ['OS=="linux"', { 608 'variables': { 609 'conditions': [ 610 ['sysroot!=""', { 611 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', 612 }, { 613 'pkg-config': 'pkg-config' 614 }], 615 ], 616 }, 617 'conditions': [ 618 ['use_x11==1', { 619 'link_settings': { 620 'libraries': [ 621 '-lX11', 622 '-lXdamage', 623 '-lXext', 624 '-lXfixes', 625 ], 626 }, 627 }], 628 ['use_cras==1', { 629 'cflags': [ 630 '<!@(<(pkg-config) --cflags libcras)', 631 ], 632 'link_settings': { 633 'libraries': [ 634 '<!@(<(pkg-config) --libs libcras)', 635 ], 636 }, 637 'defines': [ 638 'USE_CRAS', 639 ], 640 }, { # else: use_cras==0 641 'sources!': [ 642 'audio/cras/audio_manager_cras.cc', 643 'audio/cras/audio_manager_cras.h', 644 'audio/cras/cras_input.cc', 645 'audio/cras/cras_input.h', 646 'audio/cras/cras_unified.cc', 647 'audio/cras/cras_unified.h', 648 ], 649 }], 650 ], 651 }], 652 ['OS!="linux"', { 653 'sources!': [ 654 'audio/cras/audio_manager_cras.cc', 655 'audio/cras/audio_manager_cras.h', 656 'audio/cras/cras_input.cc', 657 'audio/cras/cras_input.h', 658 'audio/cras/cras_unified.cc', 659 'audio/cras/cras_unified.h', 660 ], 661 }], 662 ['use_pulseaudio==1', { 663 'cflags': [ 664 '<!@(pkg-config --cflags libpulse)', 665 ], 666 'defines': [ 667 'USE_PULSEAUDIO', 668 ], 669 'conditions': [ 670 ['linux_link_pulseaudio==0', { 671 'defines': [ 672 'DLOPEN_PULSEAUDIO', 673 ], 674 'variables': { 675 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py', 676 'extra_header': 'audio/pulse/pulse_stub_header.fragment', 677 'sig_files': ['audio/pulse/pulse.sigs'], 678 'outfile_type': 'posix_stubs', 679 'stubs_filename_root': 'pulse_stubs', 680 'project_path': 'media/audio/pulse', 681 'intermediate_dir': '<(INTERMEDIATE_DIR)', 682 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse', 683 }, 684 'include_dirs': [ 685 '<(output_root)', 686 ], 687 'actions': [ 688 { 689 'action_name': 'generate_stubs', 690 'inputs': [ 691 '<(generate_stubs_script)', 692 '<(extra_header)', 693 '<@(sig_files)', 694 ], 695 'outputs': [ 696 '<(intermediate_dir)/<(stubs_filename_root).cc', 697 '<(output_root)/<(project_path)/<(stubs_filename_root).h', 698 ], 699 'action': ['python', 700 '<(generate_stubs_script)', 701 '-i', '<(intermediate_dir)', 702 '-o', '<(output_root)/<(project_path)', 703 '-t', '<(outfile_type)', 704 '-e', '<(extra_header)', 705 '-s', '<(stubs_filename_root)', 706 '-p', '<(project_path)', 707 '<@(_inputs)', 708 ], 709 'process_outputs_as_sources': 1, 710 'message': 'Generating Pulse stubs for dynamic loading.', 711 }, 712 ], 713 'conditions': [ 714 # Linux/Solaris need libdl for dlopen() and friends. 715 ['OS=="linux" or OS=="solaris"', { 716 'link_settings': { 717 'libraries': [ 718 '-ldl', 719 ], 720 }, 721 }], 722 ], 723 }, { # else: linux_link_pulseaudio==0 724 'link_settings': { 725 'ldflags': [ 726 '<!@(pkg-config --libs-only-L --libs-only-other libpulse)', 727 ], 728 'libraries': [ 729 '<!@(pkg-config --libs-only-l libpulse)', 730 ], 731 }, 732 }], 733 ], 734 }, { # else: use_pulseaudio==0 735 'sources!': [ 736 'audio/pulse/audio_manager_pulse.cc', 737 'audio/pulse/audio_manager_pulse.h', 738 'audio/pulse/pulse_input.cc', 739 'audio/pulse/pulse_input.h', 740 'audio/pulse/pulse_output.cc', 741 'audio/pulse/pulse_output.h', 742 'audio/pulse/pulse_unified.cc', 743 'audio/pulse/pulse_unified.h', 744 'audio/pulse/pulse_util.cc', 745 'audio/pulse/pulse_util.h', 746 ], 747 }], 748 ['os_posix==1', { 749 'sources!': [ 750 'video/capture/video_capture_device_dummy.cc', 751 'video/capture/video_capture_device_dummy.h', 752 ], 753 }], 754 ['OS=="mac"', { 755 'link_settings': { 756 'libraries': [ 757 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework', 758 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', 759 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', 760 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework', 761 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework', 762 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', 763 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework', 764 ], 765 }, 766 }], 767 ['OS=="win"', { 768 'sources!': [ 769 'video/capture/video_capture_device_dummy.cc', 770 'video/capture/video_capture_device_dummy.h', 771 ], 772 'link_settings': { 773 'libraries': [ 774 '-lmf.lib', 775 '-lmfplat.lib', 776 '-lmfreadwrite.lib', 777 '-lmfuuid.lib', 778 ], 779 }, 780 # Specify delayload for media.dll. 781 'msvs_settings': { 782 'VCLinkerTool': { 783 'DelayLoadDLLs': [ 784 'mf.dll', 785 'mfplat.dll', 786 'mfreadwrite.dll', 787 ], 788 }, 789 }, 790 # Specify delayload for components that link with media.lib. 791 'all_dependent_settings': { 792 'msvs_settings': { 793 'VCLinkerTool': { 794 'DelayLoadDLLs': [ 795 'mf.dll', 796 'mfplat.dll', 797 'mfreadwrite.dll', 798 ], 799 }, 800 }, 801 }, 802 # TODO(wolenetz): Fix size_t to int truncations in win64. See 803 # http://crbug.com/171009 804 'conditions': [ 805 ['target_arch=="x64"', { 806 'msvs_disabled_warnings': [ 4267, ], 807 }], 808 ], 809 }], 810 ['proprietary_codecs==1 or branding=="Chrome"', { 811 'sources': [ 812 'mp4/aac.cc', 813 'mp4/aac.h', 814 'mp4/avc.cc', 815 'mp4/avc.h', 816 'mp4/box_definitions.cc', 817 'mp4/box_definitions.h', 818 'mp4/box_reader.cc', 819 'mp4/box_reader.h', 820 'mp4/cenc.cc', 821 'mp4/cenc.h', 822 'mp4/es_descriptor.cc', 823 'mp4/es_descriptor.h', 824 'mp4/mp4_stream_parser.cc', 825 'mp4/mp4_stream_parser.h', 826 'mp4/offset_byte_queue.cc', 827 'mp4/offset_byte_queue.h', 828 'mp4/track_run_iterator.cc', 829 'mp4/track_run_iterator.h', 830 ], 831 }], 832 ['toolkit_uses_gtk==1', { 833 'dependencies': [ 834 '../build/linux/system.gyp:gtk', 835 ], 836 }], 837 # ios check is necessary due to http://crbug.com/172682. 838 ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', { 839 'dependencies': [ 840 'media_asm', 841 'media_mmx', 842 'media_sse', 843 'media_sse2', 844 ], 845 'sources': [ 846 'base/simd/convert_yuv_to_rgb_x86.cc', 847 ], 848 }], 849 ['google_tv==1', { 850 'defines': [ 851 'ENABLE_EAC3_PLAYBACK', 852 ], 853 }], 854 ], 855 'target_conditions': [ 856 ['OS=="ios"', { 857 'sources/': [ 858 # Pull in specific Mac files for iOS (which have been filtered out 859 # by file name rules). 860 ['include', '^audio/mac/audio_input_mac\\.'], 861 ], 862 }], 863 ], 864 }, 865 { 866 'target_name': 'media_unittests', 867 'type': '<(gtest_target_type)', 868 'dependencies': [ 869 'media', 870 'media_test_support', 871 '../base/base.gyp:base', 872 '../base/base.gyp:base_i18n', 873 '../base/base.gyp:test_support_base', 874 '../skia/skia.gyp:skia', 875 '../testing/gmock.gyp:gmock', 876 '../testing/gtest.gyp:gtest', 877 '../ui/ui.gyp:ui', 878 ], 879 'sources': [ 880 'audio/async_socket_io_handler_unittest.cc', 881 'audio/audio_input_controller_unittest.cc', 882 'audio/audio_input_device_unittest.cc', 883 'audio/audio_input_unittest.cc', 884 'audio/audio_input_volume_unittest.cc', 885 'audio/audio_low_latency_input_output_unittest.cc', 886 'audio/audio_output_controller_unittest.cc', 887 'audio/audio_output_device_unittest.cc', 888 'audio/audio_output_proxy_unittest.cc', 889 'audio/audio_parameters_unittest.cc', 890 'audio/audio_power_monitor_unittest.cc', 891 'audio/cross_process_notification_unittest.cc', 892 'audio/fake_audio_consumer_unittest.cc', 893 'audio/ios/audio_manager_ios_unittest.cc', 894 'audio/linux/alsa_output_unittest.cc', 895 'audio/mac/audio_auhal_mac_unittest.cc', 896 'audio/mac/audio_device_listener_mac_unittest.cc', 897 'audio/mac/audio_low_latency_input_mac_unittest.cc', 898 'audio/simple_sources_unittest.cc', 899 'audio/virtual_audio_input_stream_unittest.cc', 900 'audio/virtual_audio_output_stream_unittest.cc', 901 'audio/win/audio_device_listener_win_unittest.cc', 902 'audio/win/audio_low_latency_input_win_unittest.cc', 903 'audio/win/audio_low_latency_output_win_unittest.cc', 904 'audio/win/audio_output_win_unittest.cc', 905 'audio/win/audio_unified_win_unittest.cc', 906 'audio/win/core_audio_util_win_unittest.cc', 907 'base/android/media_codec_bridge_unittest.cc', 908 'base/android/media_source_player_unittest.cc', 909 'base/audio_buffer_unittest.cc', 910 'base/audio_buffer_queue_unittest.cc', 911 'base/audio_bus_unittest.cc', 912 'base/audio_converter_unittest.cc', 913 'base/audio_fifo_unittest.cc', 914 'base/audio_hardware_config_unittest.cc', 915 'base/audio_hash_unittest.cc', 916 'base/audio_pull_fifo_unittest.cc', 917 'base/audio_renderer_mixer_input_unittest.cc', 918 'base/audio_renderer_mixer_unittest.cc', 919 'base/audio_splicer_unittest.cc', 920 'base/audio_timestamp_helper_unittest.cc', 921 'base/bind_to_loop_unittest.cc', 922 'base/bit_reader_unittest.cc', 923 'base/callback_holder.h', 924 'base/callback_holder_unittest.cc', 925 'base/channel_mixer_unittest.cc', 926 'base/clock_unittest.cc', 927 'base/container_names_unittest.cc', 928 'base/data_buffer_unittest.cc', 929 'base/decoder_buffer_queue_unittest.cc', 930 'base/decoder_buffer_unittest.cc', 931 'base/djb2_unittest.cc', 932 'base/gmock_callback_support_unittest.cc', 933 'base/media_file_checker_unittest.cc', 934 'base/multi_channel_resampler_unittest.cc', 935 'base/pipeline_unittest.cc', 936 'base/ranges_unittest.cc', 937 'base/run_all_unittests.cc', 938 'base/scoped_histogram_timer_unittest.cc', 939 'base/seekable_buffer_unittest.cc', 940 'base/sinc_resampler_unittest.cc', 941 'base/test_data_util.cc', 942 'base/test_data_util.h', 943 'base/vector_math_testing.h', 944 'base/vector_math_unittest.cc', 945 'base/video_frame_unittest.cc', 946 'base/video_util_unittest.cc', 947 'base/yuv_convert_unittest.cc', 948 'cdm/aes_decryptor_unittest.cc', 949 'ffmpeg/ffmpeg_common_unittest.cc', 950 'filters/audio_decoder_selector_unittest.cc', 951 'filters/audio_file_reader_unittest.cc', 952 'filters/audio_renderer_algorithm_unittest.cc', 953 'filters/audio_renderer_impl_unittest.cc', 954 'filters/blocking_url_protocol_unittest.cc', 955 'filters/chunk_demuxer_unittest.cc', 956 'filters/decrypting_audio_decoder_unittest.cc', 957 'filters/decrypting_demuxer_stream_unittest.cc', 958 'filters/decrypting_video_decoder_unittest.cc', 959 'filters/fake_demuxer_stream.cc', 960 'filters/fake_demuxer_stream.h', 961 'filters/fake_demuxer_stream_unittest.cc', 962 'filters/fake_video_decoder.cc', 963 'filters/fake_video_decoder.h', 964 'filters/fake_video_decoder_unittest.cc', 965 'filters/ffmpeg_audio_decoder_unittest.cc', 966 'filters/ffmpeg_demuxer_unittest.cc', 967 'filters/ffmpeg_glue_unittest.cc', 968 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', 969 'filters/ffmpeg_video_decoder_unittest.cc', 970 'filters/file_data_source_unittest.cc', 971 'filters/h264_to_annex_b_bitstream_converter_unittest.cc', 972 'filters/pipeline_integration_test.cc', 973 'filters/pipeline_integration_test_base.cc', 974 'filters/skcanvas_video_renderer_unittest.cc', 975 'filters/source_buffer_stream_unittest.cc', 976 'filters/video_decoder_selector_unittest.cc', 977 'filters/video_frame_stream_unittest.cc', 978 'filters/video_renderer_base_unittest.cc', 979 'video/capture/video_capture_device_unittest.cc', 980 'webm/cluster_builder.cc', 981 'webm/cluster_builder.h', 982 'webm/tracks_builder.cc', 983 'webm/tracks_builder.h', 984 'webm/webm_cluster_parser_unittest.cc', 985 'webm/webm_content_encodings_client_unittest.cc', 986 'webm/webm_parser_unittest.cc', 987 'webm/webm_tracks_parser_unittest.cc', 988 'webm/webm_webvtt_parser_unittest.cc', 989 ], 990 'conditions': [ 991 ['arm_neon==1', { 992 'defines': [ 993 'USE_NEON' 994 ], 995 }], 996 ['OS!="ios"', { 997 'dependencies': [ 998 '../gpu/gpu.gyp:command_buffer_common', 999 'shared_memory_support', 1000 ], 1001 }], 1002 ['media_use_ffmpeg==1', { 1003 'dependencies': [ 1004 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', 1005 ], 1006 }, { # media_use_ffmpeg== 0 1007 'sources!': [ 1008 'base/media_file_checker_unittest.cc', 1009 ], 1010 }], 1011 ['os_posix==1 and OS!="mac" and OS!="ios"', { 1012 'conditions': [ 1013 ['linux_use_tcmalloc==1', { 1014 'dependencies': [ 1015 '../base/allocator/allocator.gyp:allocator', 1016 ], 1017 }], 1018 ], 1019 }], 1020 ['OS=="ios"', { 1021 'sources/': [ 1022 ['exclude', '.*'], 1023 ['include', '^audio/audio_input_controller_unittest\\.cc$'], 1024 ['include', '^audio/audio_input_unittest\\.cc$'], 1025 ['include', '^audio/audio_parameters_unittest\\.cc$'], 1026 ['include', '^audio/ios/audio_manager_ios_unittest\\.cc$'], 1027 ['include', '^base/mock_reader\\.h$'], 1028 ['include', '^base/run_all_unittests\\.cc$'], 1029 ], 1030 }], 1031 ['OS=="android"', { 1032 'sources!': [ 1033 'audio/audio_input_volume_unittest.cc', 1034 'base/container_names_unittest.cc', 1035 'ffmpeg/ffmpeg_common_unittest.cc', 1036 'filters/audio_file_reader_unittest.cc', 1037 'filters/blocking_url_protocol_unittest.cc', 1038 'filters/chunk_demuxer_unittest.cc', 1039 'filters/ffmpeg_audio_decoder_unittest.cc', 1040 'filters/ffmpeg_demuxer_unittest.cc', 1041 'filters/ffmpeg_glue_unittest.cc', 1042 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc', 1043 'filters/ffmpeg_video_decoder_unittest.cc', 1044 'filters/pipeline_integration_test.cc', 1045 'filters/pipeline_integration_test_base.cc', 1046 'mp4/mp4_stream_parser_unittest.cc', 1047 'webm/webm_cluster_parser_unittest.cc', 1048 ], 1049 'conditions': [ 1050 ['gtest_target_type=="shared_library"', { 1051 'dependencies': [ 1052 '../testing/android/native_test.gyp:native_test_native_code', 1053 'player_android', 1054 ], 1055 }], 1056 ], 1057 }], 1058 ['OS=="linux"', { 1059 'conditions': [ 1060 ['use_cras==1', { 1061 'sources': [ 1062 'audio/cras/cras_input_unittest.cc', 1063 'audio/cras/cras_unified_unittest.cc', 1064 ], 1065 'defines': [ 1066 'USE_CRAS', 1067 ], 1068 }], 1069 ], 1070 }], 1071 ['use_alsa==0', { 1072 'sources!': [ 1073 'audio/linux/alsa_output_unittest.cc', 1074 'audio/audio_low_latency_input_output_unittest.cc', 1075 ], 1076 }], 1077 ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', { 1078 'sources': [ 1079 'base/simd/convert_rgb_to_yuv_unittest.cc', 1080 ], 1081 }], 1082 ['proprietary_codecs==1 or branding=="Chrome"', { 1083 'sources': [ 1084 'mp4/aac_unittest.cc', 1085 'mp4/avc_unittest.cc', 1086 'mp4/box_reader_unittest.cc', 1087 'mp4/es_descriptor_unittest.cc', 1088 'mp4/mp4_stream_parser_unittest.cc', 1089 'mp4/offset_byte_queue_unittest.cc', 1090 'mp4/track_run_iterator_unittest.cc', 1091 ], 1092 }], 1093 # TODO(wolenetz): Fix size_t to int truncations in win64. See 1094 # http://crbug.com/171009 1095 ['OS=="win" and target_arch=="x64"', { 1096 'msvs_disabled_warnings': [ 4267, ], 1097 }], 1098 ], 1099 }, 1100 { 1101 'target_name': 'media_test_support', 1102 'type': 'static_library', 1103 'dependencies': [ 1104 'media', 1105 '../base/base.gyp:base', 1106 '../skia/skia.gyp:skia', 1107 '../testing/gmock.gyp:gmock', 1108 '../testing/gtest.gyp:gtest', 1109 ], 1110 'sources': [ 1111 'audio/mock_audio_manager.cc', 1112 'audio/mock_audio_manager.h', 1113 'audio/test_audio_input_controller_factory.cc', 1114 'audio/test_audio_input_controller_factory.h', 1115 'base/fake_audio_render_callback.cc', 1116 'base/fake_audio_render_callback.h', 1117 'base/gmock_callback_support.h', 1118 'base/mock_audio_renderer_sink.cc', 1119 'base/mock_audio_renderer_sink.h', 1120 'base/mock_data_source_host.cc', 1121 'base/mock_data_source_host.h', 1122 'base/mock_demuxer_host.cc', 1123 'base/mock_demuxer_host.h', 1124 'base/mock_filters.cc', 1125 'base/mock_filters.h', 1126 'base/test_helpers.cc', 1127 'base/test_helpers.h', 1128 'filters/mock_gpu_video_decoder_factories.cc', 1129 'filters/mock_gpu_video_decoder_factories.h', 1130 'video/mock_video_decode_accelerator.cc', 1131 'video/mock_video_decode_accelerator.h', 1132 ], 1133 }, 1134 ], 1135 'conditions': [ 1136 ['OS!="ios" and target_arch!="arm"', { 1137 'targets': [ 1138 { 1139 'target_name': 'media_asm', 1140 'type': 'static_library', 1141 'sources': [ 1142 'base/simd/convert_rgb_to_yuv_ssse3.asm', 1143 'base/simd/convert_yuv_to_rgb_mmx.asm', 1144 'base/simd/convert_yuv_to_rgb_sse.asm', 1145 'base/simd/convert_yuva_to_argb_mmx.asm', 1146 'base/simd/empty_register_state_mmx.asm', 1147 'base/simd/linear_scale_yuv_to_rgb_mmx.asm', 1148 'base/simd/linear_scale_yuv_to_rgb_sse.asm', 1149 'base/simd/scale_yuv_to_rgb_mmx.asm', 1150 'base/simd/scale_yuv_to_rgb_sse.asm', 1151 ], 1152 'conditions': [ 1153 ['component=="shared_library"', { 1154 'variables': { 1155 'yasm_flags': ['-DEXPORT_SYMBOLS'], 1156 }, 1157 }], 1158 ['target_arch=="x64"', { 1159 # Source files optimized for X64 systems. 1160 'sources': [ 1161 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm', 1162 'base/simd/scale_yuv_to_rgb_sse2_x64.asm', 1163 ], 1164 'variables': { 1165 'yasm_flags': ['-DARCH_X86_64'], 1166 }, 1167 }], 1168 ['OS=="mac"', { 1169 'variables': { 1170 'yasm_flags': [ 1171 '-DPREFIX', 1172 '-DMACHO', 1173 ], 1174 }, 1175 'sources': [ 1176 # XCode doesn't want to link a pure assembly target and will 1177 # fail to link when it creates an empty file list. So add a 1178 # dummy file keep the linker happy. See http://crbug.com/157073 1179 'base/simd/xcode_hack.c', 1180 ], 1181 }], 1182 ['os_posix==1 and OS!="mac"', { 1183 'variables': { 1184 'conditions': [ 1185 ['target_arch=="ia32"', { 1186 'yasm_flags': [ 1187 '-DX86_32', 1188 '-DELF', 1189 ], 1190 }, { 1191 'yasm_flags': [ 1192 '-DELF', 1193 '-DPIC', 1194 ], 1195 }], 1196 ], 1197 }, 1198 }], 1199 ], 1200 'variables': { 1201 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media', 1202 'yasm_flags': [ 1203 '-DCHROMIUM', 1204 # In addition to the same path as source asm, let yasm %include 1205 # search path be relative to src/ per Chromium policy. 1206 '-I..', 1207 ], 1208 'yasm_includes': [ 1209 '../third_party/x86inc/x86inc.asm', 1210 'base/simd/convert_rgb_to_yuv_ssse3.inc', 1211 'base/simd/convert_yuv_to_rgb_mmx.inc', 1212 'base/simd/convert_yuva_to_argb_mmx.inc', 1213 'base/simd/linear_scale_yuv_to_rgb_mmx.inc', 1214 'base/simd/media_export.asm', 1215 'base/simd/scale_yuv_to_rgb_mmx.inc', 1216 ], 1217 }, 1218 'msvs_2010_disable_uldi_when_referenced': 1, 1219 'includes': [ 1220 '../third_party/yasm/yasm_compile.gypi', 1221 ], 1222 }, 1223 { 1224 'target_name': 'media_mmx', 1225 'type': 'static_library', 1226 'cflags': [ 1227 '-mmmx', 1228 ], 1229 'defines': [ 1230 'MEDIA_IMPLEMENTATION', 1231 ], 1232 'include_dirs': [ 1233 '..', 1234 ], 1235 'conditions': [ 1236 # TODO(jschuh): Get MMX enabled on Win64. crbug.com/179657 1237 ['OS!="win" or target_arch=="ia32"', { 1238 'sources': [ 1239 'base/simd/filter_yuv_mmx.cc', 1240 ], 1241 }], 1242 ], 1243 }, 1244 { 1245 'target_name': 'media_sse', 1246 'type': 'static_library', 1247 'cflags': [ 1248 '-msse', 1249 ], 1250 'defines': [ 1251 'MEDIA_IMPLEMENTATION', 1252 ], 1253 'include_dirs': [ 1254 '..', 1255 ], 1256 'sources': [ 1257 'base/simd/sinc_resampler_sse.cc', 1258 ], 1259 }, 1260 { 1261 'target_name': 'media_sse2', 1262 'type': 'static_library', 1263 'cflags': [ 1264 '-msse2', 1265 ], 1266 'defines': [ 1267 'MEDIA_IMPLEMENTATION', 1268 ], 1269 'include_dirs': [ 1270 '..', 1271 ], 1272 'sources': [ 1273 'base/simd/convert_rgb_to_yuv_sse2.cc', 1274 'base/simd/convert_rgb_to_yuv_ssse3.cc', 1275 'base/simd/filter_yuv_sse2.cc', 1276 ], 1277 }, 1278 { 1279 'target_name': 'shared_memory_support_sse', 1280 'type': 'static_library', 1281 'cflags': [ 1282 '-msse', 1283 ], 1284 'defines': [ 1285 'MEDIA_IMPLEMENTATION', 1286 ], 1287 'include_dirs': [ 1288 '..', 1289 ], 1290 'sources': [ 1291 'base/simd/vector_math_sse.cc', 1292 ], 1293 }, 1294 ], # targets 1295 }], 1296 ['OS!="ios"', { 1297 'includes': [ 1298 'media_cdm.gypi', 1299 ], 1300 'targets': [ 1301 { 1302 # Minimal target for NaCl and other renderer side media clients which 1303 # only need to send audio data across the shared memory to the browser 1304 # process. 1305 'target_name': 'shared_memory_support', 1306 'type': '<(component)', 1307 'dependencies': [ 1308 '../base/base.gyp:base', 1309 ], 1310 'defines': [ 1311 'MEDIA_IMPLEMENTATION', 1312 ], 1313 'include_dirs': [ 1314 '..', 1315 ], 1316 'includes': [ 1317 'shared_memory_support.gypi', 1318 ], 1319 'sources': [ 1320 '<@(shared_memory_support_sources)', 1321 ], 1322 'conditions': [ 1323 ['arm_neon==1', { 1324 'defines': [ 1325 'USE_NEON' 1326 ], 1327 }], 1328 ['target_arch=="ia32" or target_arch=="x64"', { 1329 'dependencies': [ 1330 'shared_memory_support_sse' 1331 ], 1332 }], 1333 ], 1334 }, 1335 { 1336 'target_name': 'seek_tester', 1337 'type': 'executable', 1338 'dependencies': [ 1339 'media', 1340 '../base/base.gyp:base', 1341 ], 1342 'sources': [ 1343 'tools/seek_tester/seek_tester.cc', 1344 ], 1345 }, 1346 { 1347 'target_name': 'demuxer_bench', 1348 'type': 'executable', 1349 'dependencies': [ 1350 'media', 1351 '../base/base.gyp:base', 1352 ], 1353 'sources': [ 1354 'tools/demuxer_bench/demuxer_bench.cc', 1355 ], 1356 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1357 'msvs_disabled_warnings': [ 4267, ], 1358 }, 1359 ], 1360 }], 1361 ['(OS=="win" or toolkit_uses_gtk==1) and use_aura!=1', { 1362 'targets': [ 1363 { 1364 'target_name': 'shader_bench', 1365 'type': 'executable', 1366 'dependencies': [ 1367 'media', 1368 '../base/base.gyp:base', 1369 '../ui/gl/gl.gyp:gl', 1370 '../ui/ui.gyp:ui', 1371 ], 1372 'sources': [ 1373 'tools/shader_bench/cpu_color_painter.cc', 1374 'tools/shader_bench/cpu_color_painter.h', 1375 'tools/shader_bench/gpu_color_painter.cc', 1376 'tools/shader_bench/gpu_color_painter.h', 1377 'tools/shader_bench/gpu_painter.cc', 1378 'tools/shader_bench/gpu_painter.h', 1379 'tools/shader_bench/painter.cc', 1380 'tools/shader_bench/painter.h', 1381 'tools/shader_bench/shader_bench.cc', 1382 'tools/shader_bench/window.cc', 1383 'tools/shader_bench/window.h', 1384 ], 1385 'conditions': [ 1386 ['toolkit_uses_gtk==1', { 1387 'dependencies': [ 1388 '../build/linux/system.gyp:gtk', 1389 ], 1390 'sources': [ 1391 'tools/shader_bench/window_linux.cc', 1392 ], 1393 }], 1394 ['OS=="win"', { 1395 'dependencies': [ 1396 '../third_party/angle_dx11/src/build_angle.gyp:libEGL', 1397 '../third_party/angle_dx11/src/build_angle.gyp:libGLESv2', 1398 ], 1399 'sources': [ 1400 'tools/shader_bench/window_win.cc', 1401 ], 1402 }], 1403 # See http://crbug.com/162998#c4 for why this is needed. 1404 ['OS=="linux" and linux_use_tcmalloc==1', { 1405 'dependencies': [ 1406 '../base/allocator/allocator.gyp:allocator', 1407 ], 1408 }], 1409 ], 1410 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1411 'msvs_disabled_warnings': [ 4267, ], 1412 }, 1413 ], 1414 }], 1415 ['use_x11==1', { 1416 'targets': [ 1417 { 1418 'target_name': 'player_x11', 1419 'type': 'executable', 1420 'dependencies': [ 1421 'media', 1422 '../base/base.gyp:base', 1423 '../ui/gl/gl.gyp:gl', 1424 '../ui/ui.gyp:ui', 1425 ], 1426 'link_settings': { 1427 'libraries': [ 1428 '-lX11', 1429 '-lXrender', 1430 '-lXext', 1431 ], 1432 }, 1433 'conditions': [ 1434 # Linux/Solaris need libdl for dlopen() and friends. 1435 ['OS=="linux" or OS=="solaris"', { 1436 'link_settings': { 1437 'libraries': [ 1438 '-ldl', 1439 ], 1440 }, 1441 }], 1442 ], 1443 'sources': [ 1444 'tools/player_x11/data_source_logger.cc', 1445 'tools/player_x11/data_source_logger.h', 1446 'tools/player_x11/gl_video_renderer.cc', 1447 'tools/player_x11/gl_video_renderer.h', 1448 'tools/player_x11/player_x11.cc', 1449 'tools/player_x11/x11_video_renderer.cc', 1450 'tools/player_x11/x11_video_renderer.h', 1451 ], 1452 }, 1453 ], 1454 }], 1455 # Special target to wrap a gtest_target_type==shared_library 1456 # media_unittests into an android apk for execution. 1457 ['OS=="android" and gtest_target_type=="shared_library"', { 1458 'targets': [ 1459 { 1460 'target_name': 'media_unittests_apk', 1461 'type': 'none', 1462 'dependencies': [ 1463 'media_java', 1464 'media_unittests', 1465 ], 1466 'variables': { 1467 'test_suite_name': 'media_unittests', 1468 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)media_unittests<(SHARED_LIB_SUFFIX)', 1469 }, 1470 'includes': ['../build/apk_test.gypi'], 1471 }, 1472 ], 1473 }], 1474 ['OS=="android"', { 1475 'targets': [ 1476 { 1477 'target_name': 'media_android_jni_headers', 1478 'type': 'none', 1479 'sources': [ 1480 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java', 1481 'base/android/java/src/org/chromium/media/MediaCodecBridge.java', 1482 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java', 1483 'base/android/java/src/org/chromium/media/MediaPlayerListener.java', 1484 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java', 1485 ], 1486 'variables': { 1487 'jni_gen_package': 'media', 1488 }, 1489 'includes': ['../build/jni_generator.gypi'], 1490 }, 1491 { 1492 'target_name': 'video_capture_android_jni_headers', 1493 'type': 'none', 1494 'sources': [ 1495 'base/android/java/src/org/chromium/media/VideoCapture.java', 1496 ], 1497 'variables': { 1498 'jni_gen_package': 'media', 1499 }, 1500 'includes': ['../build/jni_generator.gypi'], 1501 }, 1502 { 1503 'target_name': 'player_android', 1504 'type': 'static_library', 1505 'sources': [ 1506 'base/android/media_codec_bridge.cc', 1507 'base/android/media_codec_bridge.h', 1508 'base/android/media_drm_bridge.cc', 1509 'base/android/media_drm_bridge.h', 1510 'base/android/media_jni_registrar.cc', 1511 'base/android/media_jni_registrar.h', 1512 'base/android/media_player_android.cc', 1513 'base/android/media_player_android.h', 1514 'base/android/media_player_bridge.cc', 1515 'base/android/media_player_bridge.h', 1516 'base/android/media_player_listener.cc', 1517 'base/android/media_player_listener.h', 1518 'base/android/media_source_player.cc', 1519 'base/android/media_source_player.h', 1520 'base/android/webaudio_media_codec_bridge.cc', 1521 'base/android/webaudio_media_codec_bridge.h', 1522 'base/android/webaudio_media_codec_info.h', 1523 ], 1524 'dependencies': [ 1525 '../base/base.gyp:base', 1526 '../ui/gl/gl.gyp:gl', 1527 '../url/url.gyp:url_lib', 1528 'media_android_jni_headers', 1529 ], 1530 'defines': [ 1531 'MEDIA_IMPLEMENTATION', 1532 ], 1533 'include_dirs': [ 1534 '<(SHARED_INTERMEDIATE_DIR)/media', 1535 ], 1536 }, 1537 { 1538 'target_name': 'media_java', 1539 'type': 'none', 1540 'dependencies': [ 1541 '../base/base.gyp:base', 1542 ], 1543 'export_dependent_settings': [ 1544 '../base/base.gyp:base', 1545 ], 1546 'variables': { 1547 'java_in_dir': 'base/android/java', 1548 }, 1549 'includes': ['../build/java.gypi'], 1550 }, 1551 1552 ], 1553 }], 1554 ['media_use_ffmpeg==1', { 1555 'targets': [ 1556 { 1557 'target_name': 'ffmpeg_unittests', 1558 'type': 'executable', 1559 'dependencies': [ 1560 '../base/base.gyp:base', 1561 '../base/base.gyp:base_i18n', 1562 '../base/base.gyp:test_support_base', 1563 '../base/base.gyp:test_support_perf', 1564 '../testing/gtest.gyp:gtest', 1565 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', 1566 'media', 1567 'media_test_support', 1568 ], 1569 'sources': [ 1570 'ffmpeg/ffmpeg_unittest.cc', 1571 ], 1572 'conditions': [ 1573 ['toolkit_uses_gtk==1', { 1574 'dependencies': [ 1575 # Needed for the following #include chain: 1576 # base/run_all_unittests.cc 1577 # ../base/test_suite.h 1578 # gtk/gtk.h 1579 '../build/linux/system.gyp:gtk', 1580 ], 1581 'conditions': [ 1582 ['linux_use_tcmalloc==1', { 1583 'dependencies': [ 1584 '../base/allocator/allocator.gyp:allocator', 1585 ], 1586 }], 1587 ], 1588 }], 1589 ], 1590 }, 1591 { 1592 'target_name': 'ffmpeg_regression_tests', 1593 'type': 'executable', 1594 'dependencies': [ 1595 '../base/base.gyp:test_support_base', 1596 '../testing/gmock.gyp:gmock', 1597 '../testing/gtest.gyp:gtest', 1598 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', 1599 'media', 1600 'media_test_support', 1601 ], 1602 'sources': [ 1603 'base/run_all_unittests.cc', 1604 'base/test_data_util.cc', 1605 'ffmpeg/ffmpeg_regression_tests.cc', 1606 'filters/pipeline_integration_test_base.cc', 1607 ], 1608 'conditions': [ 1609 ['os_posix==1 and OS!="mac"', { 1610 'conditions': [ 1611 ['linux_use_tcmalloc==1', { 1612 'dependencies': [ 1613 '../base/allocator/allocator.gyp:allocator', 1614 ], 1615 }], 1616 ], 1617 }], 1618 ], 1619 }, 1620 { 1621 'target_name': 'ffmpeg_tests', 1622 'type': 'executable', 1623 'dependencies': [ 1624 '../base/base.gyp:base', 1625 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', 1626 'media', 1627 ], 1628 'sources': [ 1629 'test/ffmpeg_tests/ffmpeg_tests.cc', 1630 ], 1631 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1632 'msvs_disabled_warnings': [ 4267, ], 1633 }, 1634 { 1635 'target_name': 'media_bench', 1636 'type': 'executable', 1637 'dependencies': [ 1638 '../base/base.gyp:base', 1639 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', 1640 'media', 1641 ], 1642 'sources': [ 1643 'tools/media_bench/media_bench.cc', 1644 ], 1645 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1646 'msvs_disabled_warnings': [ 4267, ], 1647 }, 1648 ], 1649 }], 1650 ], 1651 } 1652