| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/arm.gni") | 6 import("//build/config/arm.gni") |
| 7 import("//build/config/features.gni") | 7 import("//build/config/features.gni") |
| 8 import("//build/config/linux/pkg_config.gni") | 8 import("//build/config/linux/pkg_config.gni") |
| 9 import("//build/config/ui.gni") | 9 import("//build/config/ui.gni") |
| 10 import("//media/media_options.gni") | 10 import("//media/media_options.gni") |
| 11 import("//testing/test.gni") | 11 import("//testing/test.gni") |
| 12 | 12 |
| 13 # Common configuration for targets in the media directory. | 13 # Common configuration for targets in the media directory. |
| 14 # NOT for exporting. | 14 # NOT for exporting. |
| 15 config("media_config") { | 15 config("media_config") { |
| 16 defines = [] | 16 defines = [] |
| 17 if (!media_use_libvpx) { | 17 if (!media_use_libvpx) { |
| 18 defines += [ "MEDIA_DISABLE_LIBVPX" ] | 18 defines += [ "MEDIA_DISABLE_LIBVPX" ] |
| 19 } | 19 } |
| 20 if (!media_use_ffmpeg) { | 20 if (!media_use_ffmpeg) { |
| 21 defines += [ "MEDIA_DISABLE_FFMPEG" ] | 21 defines += [ "MEDIA_DISABLE_FFMPEG" ] |
| 22 } | 22 } |
| 23 if (!media_use_libwebm) { | |
| 24 defines += [ "MEDIA_DISABLE_LIBWEBM" ] | |
| 25 } | |
| 26 if (current_cpu == "arm" && arm_use_neon) { | 23 if (current_cpu == "arm" && arm_use_neon) { |
| 27 defines += [ "USE_NEON" ] | 24 defines += [ "USE_NEON" ] |
| 28 } | 25 } |
| 29 if (use_pulseaudio) { | 26 if (use_pulseaudio) { |
| 30 defines += [ "USE_PULSEAUDIO" ] | 27 defines += [ "USE_PULSEAUDIO" ] |
| 31 if (!link_pulseaudio) { | 28 if (!link_pulseaudio) { |
| 32 defines += [ "DLOPEN_PULSEAUDIO" ] | 29 defines += [ "DLOPEN_PULSEAUDIO" ] |
| 33 } | 30 } |
| 34 } | 31 } |
| 35 if (use_cras) { | 32 if (use_cras) { |
| 36 defines += [ "USE_CRAS" ] | 33 defines += [ "USE_CRAS" ] |
| 37 } | 34 } |
| 38 if (proprietary_codecs && enable_hevc_demuxing) { | 35 if (proprietary_codecs && enable_hevc_demuxing) { |
| 39 defines += [ "ENABLE_HEVC_DEMUXING" ] | 36 defines += [ "ENABLE_HEVC_DEMUXING" ] |
| 40 } | 37 } |
| 41 } | 38 } |
| 42 | 39 |
| 43 config("media_implementation") { | 40 config("media_implementation") { |
| 44 defines = [ "MEDIA_IMPLEMENTATION" ] | 41 defines = [ "MEDIA_IMPLEMENTATION" ] |
| 45 } | 42 } |
| 46 | 43 |
| 47 config("media_dependent_config") { | 44 config("media_dependent_config") { |
| 48 defines = [] | 45 defines = [] |
| 49 if (!media_use_libvpx) { | 46 if (!media_use_libvpx) { |
| 50 defines += [ "MEDIA_DISABLE_LIBVPX" ] | 47 defines += [ "MEDIA_DISABLE_LIBVPX" ] |
| 51 } | 48 } |
| 52 if (!media_use_ffmpeg) { | 49 if (!media_use_ffmpeg) { |
| 53 defines += [ "MEDIA_DISABLE_FFMPEG" ] | 50 defines += [ "MEDIA_DISABLE_FFMPEG" ] |
| 54 } | 51 } |
| 55 if (!media_use_libwebm) { | |
| 56 defines += [ "MEDIA_DISABLE_LIBWEBM" ] | |
| 57 } | |
| 58 if (is_win) { | 52 if (is_win) { |
| 59 ldflags = [ | 53 ldflags = [ |
| 60 "/DELAYLOAD:mf.dll", | 54 "/DELAYLOAD:mf.dll", |
| 61 "/DELAYLOAD:mfplat.dll", | 55 "/DELAYLOAD:mfplat.dll", |
| 62 "/DELAYLOAD:mfreadwrite.dll", | 56 "/DELAYLOAD:mfreadwrite.dll", |
| 63 ] | 57 ] |
| 64 } | 58 } |
| 65 if (media_use_ffmpeg && is_android) { | 59 if (media_use_ffmpeg && is_android) { |
| 66 defines += [ | 60 defines += [ |
| 67 "ENABLE_MEDIA_PIPELINE_ON_ANDROID", | 61 "ENABLE_MEDIA_PIPELINE_ON_ANDROID", |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 "capture/video/win/sink_filter_win.cc", | 156 "capture/video/win/sink_filter_win.cc", |
| 163 "capture/video/win/sink_filter_win.h", | 157 "capture/video/win/sink_filter_win.h", |
| 164 "capture/video/win/sink_input_pin_win.cc", | 158 "capture/video/win/sink_input_pin_win.cc", |
| 165 "capture/video/win/sink_input_pin_win.h", | 159 "capture/video/win/sink_input_pin_win.h", |
| 166 "capture/video/win/video_capture_device_factory_win.cc", | 160 "capture/video/win/video_capture_device_factory_win.cc", |
| 167 "capture/video/win/video_capture_device_factory_win.h", | 161 "capture/video/win/video_capture_device_factory_win.h", |
| 168 "capture/video/win/video_capture_device_mf_win.cc", | 162 "capture/video/win/video_capture_device_mf_win.cc", |
| 169 "capture/video/win/video_capture_device_mf_win.h", | 163 "capture/video/win/video_capture_device_mf_win.h", |
| 170 "capture/video/win/video_capture_device_win.cc", | 164 "capture/video/win/video_capture_device_win.cc", |
| 171 "capture/video/win/video_capture_device_win.h", | 165 "capture/video/win/video_capture_device_win.h", |
| 166 "capture/webm_muxer.cc", |
| 167 "capture/webm_muxer.h", |
| 172 "cdm/aes_decryptor.cc", | 168 "cdm/aes_decryptor.cc", |
| 173 "cdm/aes_decryptor.h", | 169 "cdm/aes_decryptor.h", |
| 174 "cdm/cdm_adapter.cc", | 170 "cdm/cdm_adapter.cc", |
| 175 "cdm/cdm_adapter.h", | 171 "cdm/cdm_adapter.h", |
| 176 "cdm/default_cdm_factory.cc", | 172 "cdm/default_cdm_factory.cc", |
| 177 "cdm/default_cdm_factory.h", | 173 "cdm/default_cdm_factory.h", |
| 178 "cdm/json_web_key.cc", | 174 "cdm/json_web_key.cc", |
| 179 "cdm/json_web_key.h", | 175 "cdm/json_web_key.h", |
| 180 "cdm/key_system_names.cc", | 176 "cdm/key_system_names.cc", |
| 181 "cdm/key_system_names.h", | 177 "cdm/key_system_names.h", |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 362 } |
| 367 | 363 |
| 368 if (media_use_libvpx) { | 364 if (media_use_libvpx) { |
| 369 sources += [ | 365 sources += [ |
| 370 "filters/vpx_video_decoder.cc", | 366 "filters/vpx_video_decoder.cc", |
| 371 "filters/vpx_video_decoder.h", | 367 "filters/vpx_video_decoder.h", |
| 372 ] | 368 ] |
| 373 deps += [ "//third_party/libvpx_new" ] | 369 deps += [ "//third_party/libvpx_new" ] |
| 374 } | 370 } |
| 375 | 371 |
| 376 if (media_use_libwebm) { | |
| 377 sources += [ | |
| 378 "capture/webm_muxer.cc", | |
| 379 "capture/webm_muxer.h", | |
| 380 ] | |
| 381 deps += [ "//third_party/libwebm" ] | |
| 382 } | |
| 383 | |
| 384 if (is_android) { | 372 if (is_android) { |
| 385 # On Android, FFmpeg is built without video decoders. We only | 373 # On Android, FFmpeg is built without video decoders. We only |
| 386 # support hardware video decoding. | 374 # support hardware video decoding. |
| 387 if (media_use_ffmpeg) { | 375 if (media_use_ffmpeg) { |
| 388 sources -= [ | 376 sources -= [ |
| 389 "filters/ffmpeg_video_decoder.cc", | 377 "filters/ffmpeg_video_decoder.cc", |
| 390 "filters/ffmpeg_video_decoder.h", | 378 "filters/ffmpeg_video_decoder.h", |
| 391 ] | 379 ] |
| 392 } | 380 } |
| 393 sources += [ | 381 sources += [ |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 545 |
| 558 deps += [ | 546 deps += [ |
| 559 ":shared_memory_support", | 547 ":shared_memory_support", |
| 560 "//base", | 548 "//base", |
| 561 "//base:i18n", | 549 "//base:i18n", |
| 562 "//base/third_party/dynamic_annotations", | 550 "//base/third_party/dynamic_annotations", |
| 563 "//crypto", | 551 "//crypto", |
| 564 "//crypto:platform", # TODO(ajwong): This used to be provided by crypto.gyp
via export_dependent_settings | 552 "//crypto:platform", # TODO(ajwong): This used to be provided by crypto.gyp
via export_dependent_settings |
| 565 "//gpu/command_buffer/common", | 553 "//gpu/command_buffer/common", |
| 566 "//skia", | 554 "//skia", |
| 555 "//third_party/libwebm", |
| 567 "//third_party/libyuv", | 556 "//third_party/libyuv", |
| 568 "//third_party/opus", | 557 "//third_party/opus", |
| 569 "//ui/events:events_base", | 558 "//ui/events:events_base", |
| 570 "//ui/gfx", | 559 "//ui/gfx", |
| 571 "//ui/gfx/geometry", | 560 "//ui/gfx/geometry", |
| 572 "//url", | 561 "//url", |
| 573 ] | 562 ] |
| 574 } | 563 } |
| 575 | 564 |
| 576 # Minimal media component for media/cast on iOS. | 565 # Minimal media component for media/cast on iOS. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 606 | 595 |
| 607 test("media_unittests") { | 596 test("media_unittests") { |
| 608 sources = [ | 597 sources = [ |
| 609 "capture/content/animated_content_sampler_unittest.cc", | 598 "capture/content/animated_content_sampler_unittest.cc", |
| 610 "capture/content/capture_resolution_chooser_unittest.cc", | 599 "capture/content/capture_resolution_chooser_unittest.cc", |
| 611 "capture/content/feedback_signal_accumulator_unittest.cc", | 600 "capture/content/feedback_signal_accumulator_unittest.cc", |
| 612 "capture/content/smooth_event_sampler_unittest.cc", | 601 "capture/content/smooth_event_sampler_unittest.cc", |
| 613 "capture/content/video_capture_oracle_unittest.cc", | 602 "capture/content/video_capture_oracle_unittest.cc", |
| 614 "capture/video/fake_video_capture_device_unittest.cc", | 603 "capture/video/fake_video_capture_device_unittest.cc", |
| 615 "capture/video/video_capture_device_unittest.cc", | 604 "capture/video/video_capture_device_unittest.cc", |
| 605 "capture/webm_muxer_unittest.cc", |
| 616 "cdm/aes_decryptor_unittest.cc", | 606 "cdm/aes_decryptor_unittest.cc", |
| 617 "cdm/json_web_key_unittest.cc", | 607 "cdm/json_web_key_unittest.cc", |
| 618 "filters/audio_clock_unittest.cc", | 608 "filters/audio_clock_unittest.cc", |
| 619 "filters/audio_decoder_selector_unittest.cc", | 609 "filters/audio_decoder_selector_unittest.cc", |
| 620 "filters/audio_renderer_algorithm_unittest.cc", | 610 "filters/audio_renderer_algorithm_unittest.cc", |
| 621 "filters/chunk_demuxer_unittest.cc", | 611 "filters/chunk_demuxer_unittest.cc", |
| 622 "filters/decrypting_audio_decoder_unittest.cc", | 612 "filters/decrypting_audio_decoder_unittest.cc", |
| 623 "filters/decrypting_demuxer_stream_unittest.cc", | 613 "filters/decrypting_demuxer_stream_unittest.cc", |
| 624 "filters/decrypting_video_decoder_unittest.cc", | 614 "filters/decrypting_video_decoder_unittest.cc", |
| 625 "filters/fake_video_decoder.cc", | 615 "filters/fake_video_decoder.cc", |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 "//gpu:test_support", | 666 "//gpu:test_support", |
| 677 "//gpu/command_buffer/common", | 667 "//gpu/command_buffer/common", |
| 678 "//media/audio:test_support", | 668 "//media/audio:test_support", |
| 679 "//media/audio:unittests", | 669 "//media/audio:unittests", |
| 680 "//media/base:test_support", | 670 "//media/base:test_support", |
| 681 "//media/base:unittests", | 671 "//media/base:unittests", |
| 682 "//media/test:pipeline_integration_tests", | 672 "//media/test:pipeline_integration_tests", |
| 683 "//skia", # Direct dependency required to inherit config. | 673 "//skia", # Direct dependency required to inherit config. |
| 684 "//testing/gmock", | 674 "//testing/gmock", |
| 685 "//testing/gtest", | 675 "//testing/gtest", |
| 676 "//third_party/libwebm", |
| 686 "//third_party/libyuv", | 677 "//third_party/libyuv", |
| 687 "//third_party/widevine/cdm:version_h", | 678 "//third_party/widevine/cdm:version_h", |
| 688 "//ui/gfx:test_support", | 679 "//ui/gfx:test_support", |
| 689 "//url", | 680 "//url", |
| 690 ] | 681 ] |
| 691 | 682 |
| 692 if (is_android) { | 683 if (is_android) { |
| 693 isolate_file = "media_unittests.isolate" | 684 isolate_file = "media_unittests.isolate" |
| 694 deps += [ "//media/base/android:unittests" ] | 685 deps += [ "//media/base/android:unittests" ] |
| 695 sources -= [ | 686 sources -= [ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 721 if (!is_android) { | 712 if (!is_android) { |
| 722 sources += [ | 713 sources += [ |
| 723 "filters/audio_file_reader_unittest.cc", | 714 "filters/audio_file_reader_unittest.cc", |
| 724 "filters/blocking_url_protocol_unittest.cc", | 715 "filters/blocking_url_protocol_unittest.cc", |
| 725 "filters/ffmpeg_video_decoder_unittest.cc", | 716 "filters/ffmpeg_video_decoder_unittest.cc", |
| 726 "filters/in_memory_url_protocol_unittest.cc", | 717 "filters/in_memory_url_protocol_unittest.cc", |
| 727 ] | 718 ] |
| 728 } | 719 } |
| 729 } | 720 } |
| 730 | 721 |
| 731 if (media_use_libwebm) { | |
| 732 sources += [ "capture/webm_muxer_unittest.cc" ] | |
| 733 deps += [ "//third_party/libwebm" ] | |
| 734 } | |
| 735 | |
| 736 if (current_cpu != "arm" && is_chromeos) { | 722 if (current_cpu != "arm" && is_chromeos) { |
| 737 sources += [ "filters/h264_bitstream_buffer_unittest.cc" ] | 723 sources += [ "filters/h264_bitstream_buffer_unittest.cc" ] |
| 738 } | 724 } |
| 739 | 725 |
| 740 if (proprietary_codecs) { | 726 if (proprietary_codecs) { |
| 741 sources += [ | 727 sources += [ |
| 742 "cdm/cenc_utils_unittest.cc", | 728 "cdm/cenc_utils_unittest.cc", |
| 743 "filters/h264_to_annex_b_bitstream_converter_unittest.cc", | 729 "filters/h264_to_annex_b_bitstream_converter_unittest.cc", |
| 744 "formats/common/stream_parser_test_base.cc", | 730 "formats/common/stream_parser_test_base.cc", |
| 745 "formats/common/stream_parser_test_base.h", | 731 "formats/common/stream_parser_test_base.h", |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 "//media/base:test_support", | 882 "//media/base:test_support", |
| 897 "//media/test:pipeline_integration_tests", | 883 "//media/test:pipeline_integration_tests", |
| 898 "//testing/gmock", | 884 "//testing/gmock", |
| 899 "//testing/gtest", | 885 "//testing/gtest", |
| 900 "//third_party/ffmpeg", | 886 "//third_party/ffmpeg", |
| 901 "//ui/gfx:test_support", | 887 "//ui/gfx:test_support", |
| 902 "//ui/gfx/geometry", | 888 "//ui/gfx/geometry", |
| 903 ] | 889 ] |
| 904 } | 890 } |
| 905 } | 891 } |
| OLD | NEW |