| # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| # |
| # Use of this source code is governed by a BSD-style license |
| # that can be found in the LICENSE file in the root of the source |
| # tree. An additional intellectual property rights grant can be found |
| # in the file PATENTS. All contributing project authors may |
| # be found in the AUTHORS file in the root of the source tree. |
| |
| import("../webrtc.gni") |
| if (is_android) { |
| import("//build/config/android/config.gni") |
| import("//build/config/android/rules.gni") |
| } |
| |
| rtc_static_library("audio") { |
| sources = [ |
| "audio_receive_stream.cc", |
| "audio_receive_stream.h", |
| "audio_send_stream.cc", |
| "audio_send_stream.h", |
| "audio_state.cc", |
| "audio_state.h", |
| "audio_transport_proxy.cc", |
| "audio_transport_proxy.h", |
| "conversion.h", |
| "scoped_voe_interface.h", |
| "time_interval.cc", |
| "time_interval.h", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| |
| deps = [ |
| "..:webrtc_common", |
| "../api:audio_mixer_api", |
| "../api:call_api", |
| "../api/audio_codecs:audio_codecs_api", |
| "../api/audio_codecs:builtin_audio_encoder_factory", |
| "../call:call_interfaces", |
| "../call:rtp_interfaces", |
| "../common_audio", |
| "../modules/audio_coding:cng", |
| "../modules/audio_device", |
| "../modules/audio_processing", |
| "../modules/bitrate_controller:bitrate_controller", |
| "../modules/congestion_controller:congestion_controller", |
| "../modules/pacing:pacing", |
| "../modules/remote_bitrate_estimator:remote_bitrate_estimator", |
| "../modules/rtp_rtcp:rtp_rtcp", |
| "../rtc_base:rtc_base_approved", |
| "../rtc_base:rtc_task_queue", |
| "../system_wrappers", |
| "../voice_engine", |
| ] |
| } |
| if (rtc_include_tests) { |
| rtc_source_set("audio_tests") { |
| testonly = true |
| |
| # Skip restricting visibility on mobile platforms since the tests on those |
| # gets additional generated targets which would require many lines here to |
| # cover (which would be confusing to read and hard to maintain). |
| if (!is_android && !is_ios) { |
| visibility = [ "..:video_engine_tests" ] |
| } |
| |
| # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| # This needs remote_bitrate_estimator to be moved to webrtc/api first. |
| check_includes = false |
| |
| sources = [ |
| "audio_receive_stream_unittest.cc", |
| "audio_send_stream_unittest.cc", |
| "audio_state_unittest.cc", |
| "time_interval_unittest.cc", |
| ] |
| deps = [ |
| ":audio", |
| "../api:mock_audio_mixer", |
| "../call:rtp_receiver", |
| "../modules/audio_device:mock_audio_device", |
| "../modules/audio_mixer:audio_mixer_impl", |
| "../modules/congestion_controller:congestion_controller", |
| "../modules/congestion_controller:mock_congestion_controller", |
| "../modules/pacing:pacing", |
| "../rtc_base:rtc_base_approved", |
| "../rtc_base:rtc_task_queue", |
| "../test:test_common", |
| "../test:test_support", |
| "utility:utility_tests", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| |
| if (rtc_enable_protobuf) { |
| rtc_test("low_bandwidth_audio_test") { |
| testonly = true |
| |
| sources = [ |
| "test/low_bandwidth_audio_test.cc", |
| "test/low_bandwidth_audio_test.h", |
| ] |
| |
| deps = [ |
| "../common_audio", |
| "../rtc_base:rtc_base_approved", |
| "../system_wrappers", |
| "../test:fake_audio_device", |
| "../test:test_common", |
| "../test:test_main", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| if (is_android) { |
| deps += [ "//testing/android/native_test:native_test_native_code" ] |
| } |
| |
| data = [ |
| "../../resources/voice_engine/audio_tiny16.wav", |
| "../../resources/voice_engine/audio_tiny48.wav", |
| "../../resources/voice_engine/audio_dtx16.wav", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| } |
| |
| rtc_source_set("audio_perf_tests") { |
| testonly = true |
| |
| # Skip restricting visibility on mobile platforms since the tests on those |
| # gets additional generated targets which would require many lines here to |
| # cover (which would be confusing to read and hard to maintain). |
| if (!is_android && !is_ios) { |
| visibility = [ "..:webrtc_perf_tests" ] |
| } |
| sources = [ |
| "test/audio_bwe_integration_test.cc", |
| "test/audio_bwe_integration_test.h", |
| ] |
| deps = [ |
| "../common_audio", |
| "../rtc_base:rtc_base_approved", |
| "../system_wrappers", |
| "../test:fake_audio_device", |
| "../test:field_trial", |
| "../test:single_threaded_task_queue", |
| "../test:test_common", |
| "../test:test_main", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| data = [ |
| "//resources/voice_engine/audio_dtx16.wav", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| } |