First approach to remove parts of the heavy load done for encoding, and preparation for sending, from native audio thread to separate task queue. With this change we will give the native input audio thread more time to "relax" between successive audio captures. Separate profiling done on Android has verified that the change works well; the load is now redistributed and the load of the native AudioRecordThread is reduced. Similar conclusions should be valid for all other OS:es as well. BUG=NONE CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_compile_dbg,linux_android_rel_ng Review-Url: https://codereview.webrtc.org/2665693002 Cr-Commit-Position: refs/heads/master@{#17488}
307 lines
8.7 KiB
Plaintext
307 lines
8.7 KiB
Plaintext
# Copyright (c) 2014 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")
|
|
|
|
rtc_static_library("audio_coder") {
|
|
sources = [
|
|
"coder.cc",
|
|
"coder.h",
|
|
]
|
|
deps = [
|
|
"..:webrtc_common",
|
|
"../api/audio_codecs:builtin_audio_decoder_factory",
|
|
"../modules/audio_coding",
|
|
"../modules/audio_coding:audio_format_conversion",
|
|
"../modules/audio_coding:rent_a_codec",
|
|
]
|
|
|
|
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_static_library("file_player") {
|
|
sources = [
|
|
"file_player.cc",
|
|
"file_player.h",
|
|
]
|
|
deps = [
|
|
":audio_coder",
|
|
"..:webrtc_common",
|
|
"../common_audio",
|
|
"../modules/media_file",
|
|
"../system_wrappers",
|
|
]
|
|
|
|
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_static_library("file_recorder") {
|
|
sources = [
|
|
"file_recorder.cc",
|
|
"file_recorder.h",
|
|
]
|
|
deps = [
|
|
":audio_coder",
|
|
"..:webrtc_common",
|
|
"../base:rtc_base_approved",
|
|
"../common_audio",
|
|
"../modules/media_file:media_file",
|
|
"../system_wrappers",
|
|
]
|
|
|
|
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_static_library("voice_engine") {
|
|
sources = [
|
|
"channel.cc",
|
|
"channel.h",
|
|
"channel_manager.cc",
|
|
"channel_manager.h",
|
|
"channel_proxy.cc",
|
|
"channel_proxy.h",
|
|
"include/voe_base.h",
|
|
"include/voe_codec.h",
|
|
"include/voe_errors.h",
|
|
"include/voe_file.h",
|
|
"include/voe_network.h",
|
|
"include/voe_rtp_rtcp.h",
|
|
"monitor_module.h",
|
|
"output_mixer.cc",
|
|
"output_mixer.h",
|
|
"shared_data.cc",
|
|
"shared_data.h",
|
|
"statistics.cc",
|
|
"statistics.h",
|
|
"transmit_mixer.cc",
|
|
"transmit_mixer.h",
|
|
"transport_feedback_packet_loss_tracker.cc",
|
|
"transport_feedback_packet_loss_tracker.h",
|
|
"utility.cc",
|
|
"utility.h",
|
|
"voe_base_impl.cc",
|
|
"voe_base_impl.h",
|
|
"voe_codec_impl.cc",
|
|
"voe_codec_impl.h",
|
|
"voe_file_impl.cc",
|
|
"voe_file_impl.h",
|
|
"voe_network_impl.cc",
|
|
"voe_network_impl.h",
|
|
"voe_rtp_rtcp_impl.cc",
|
|
"voe_rtp_rtcp_impl.h",
|
|
"voice_engine_defines.h",
|
|
"voice_engine_impl.cc",
|
|
"voice_engine_impl.h",
|
|
]
|
|
|
|
if (is_win) {
|
|
defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
|
|
|
|
cflags = [
|
|
# TODO(kjellander): Bug 261: fix this warning.
|
|
"/wd4373", # Virtual function override.
|
|
]
|
|
}
|
|
|
|
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" ]
|
|
}
|
|
|
|
public_deps = [
|
|
"../modules/audio_coding",
|
|
]
|
|
deps = [
|
|
":audio_level",
|
|
":file_player",
|
|
":file_recorder",
|
|
"..:webrtc_common",
|
|
"../api:audio_mixer_api",
|
|
"../api:call_api",
|
|
"../api:transport_api",
|
|
"../api/audio_codecs:audio_codecs_api",
|
|
"../api/audio_codecs:builtin_audio_decoder_factory",
|
|
"../audio/utility:audio_frame_operations",
|
|
"../base:rtc_base_approved",
|
|
"../base:rtc_task_queue",
|
|
|
|
# TODO(nisse): Delete when declaration of RtpTransportController
|
|
# and related interfaces move to api/.
|
|
"../call:call_interfaces",
|
|
"../common_audio",
|
|
"../logging:rtc_event_log_api",
|
|
"../modules/audio_coding:audio_format_conversion",
|
|
"../modules/audio_coding:rent_a_codec",
|
|
"../modules/audio_conference_mixer",
|
|
"../modules/audio_device",
|
|
"../modules/audio_processing",
|
|
"../modules/bitrate_controller",
|
|
"../modules/media_file",
|
|
"../modules/pacing",
|
|
"../modules/rtp_rtcp",
|
|
"../modules/utility",
|
|
"../system_wrappers",
|
|
]
|
|
}
|
|
|
|
rtc_static_library("audio_level") {
|
|
sources = [
|
|
"audio_level.cc",
|
|
"audio_level.h",
|
|
]
|
|
|
|
deps = [
|
|
"..:webrtc_common",
|
|
"../base:rtc_base_approved",
|
|
"../common_audio",
|
|
]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_test("voice_engine_unittests") {
|
|
deps = [
|
|
":file_player",
|
|
":voice_engine",
|
|
"../base:rtc_base_approved",
|
|
"../test:test_common",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//third_party/gflags",
|
|
"//webrtc/common_audio",
|
|
"//webrtc/modules/audio_coding",
|
|
"//webrtc/modules/audio_conference_mixer",
|
|
"//webrtc/modules/audio_device",
|
|
"//webrtc/modules/audio_processing",
|
|
"//webrtc/modules/media_file",
|
|
"//webrtc/modules/rtp_rtcp",
|
|
"//webrtc/modules/utility",
|
|
"//webrtc/modules/video_capture:video_capture",
|
|
"//webrtc/system_wrappers",
|
|
"//webrtc/test:test_main",
|
|
"//webrtc/test:video_test_common",
|
|
]
|
|
|
|
if (is_android) {
|
|
deps += [ "//testing/android/native_test:native_test_native_code" ]
|
|
shard_timeout = 900
|
|
}
|
|
|
|
sources = [
|
|
"channel_unittest.cc",
|
|
"file_player_unittests.cc",
|
|
"transport_feedback_packet_loss_tracker_unittest.cc",
|
|
"utility_unittest.cc",
|
|
"voe_base_unittest.cc",
|
|
"voe_codec_unittest.cc",
|
|
"voe_network_unittest.cc",
|
|
"voice_engine_fixture.cc",
|
|
"voice_engine_fixture.h",
|
|
]
|
|
|
|
data = [
|
|
"//resources/utility/encapsulated_pcm16b_8khz.wav",
|
|
"//resources/utility/encapsulated_pcmu_8khz.wav",
|
|
]
|
|
|
|
if (is_win) {
|
|
defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
|
|
|
|
cflags = [
|
|
# TODO(kjellander): Bug 261: fix this warning.
|
|
"/wd4373", # Virtual function override.
|
|
]
|
|
}
|
|
|
|
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 (!is_ios) {
|
|
rtc_executable("voe_auto_test") {
|
|
testonly = true
|
|
|
|
deps = [
|
|
":voice_engine",
|
|
"..:webrtc_common",
|
|
"../base:rtc_base_approved",
|
|
"../modules/audio_device:audio_device",
|
|
"../modules/audio_processing:audio_processing",
|
|
"../modules/rtp_rtcp:rtp_rtcp",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//third_party/gflags",
|
|
"//webrtc/logging:rtc_event_log_api",
|
|
"//webrtc/modules/video_capture",
|
|
"//webrtc/system_wrappers",
|
|
"//webrtc/system_wrappers/:system_wrappers_default",
|
|
"//webrtc/test/:test_common",
|
|
"//webrtc/test/:test_support",
|
|
"//webrtc/test/:video_test_common",
|
|
]
|
|
|
|
sources = [
|
|
"test/auto_test/automated_mode.cc",
|
|
"test/auto_test/fakes/conference_transport.cc",
|
|
"test/auto_test/fakes/conference_transport.h",
|
|
"test/auto_test/fakes/loudest_filter.cc",
|
|
"test/auto_test/fakes/loudest_filter.h",
|
|
"test/auto_test/fixtures/after_initialization_fixture.cc",
|
|
"test/auto_test/fixtures/after_initialization_fixture.h",
|
|
"test/auto_test/fixtures/after_streaming_fixture.cc",
|
|
"test/auto_test/fixtures/after_streaming_fixture.h",
|
|
"test/auto_test/fixtures/before_initialization_fixture.cc",
|
|
"test/auto_test/fixtures/before_initialization_fixture.h",
|
|
"test/auto_test/fixtures/before_streaming_fixture.cc",
|
|
"test/auto_test/fixtures/before_streaming_fixture.h",
|
|
"test/auto_test/standard/codec_before_streaming_test.cc",
|
|
"test/auto_test/standard/codec_test.cc",
|
|
"test/auto_test/standard/dtmf_test.cc",
|
|
"test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
|
|
"test/auto_test/standard/rtp_rtcp_extensions.cc",
|
|
"test/auto_test/standard/rtp_rtcp_test.cc",
|
|
"test/auto_test/voe_conference_test.cc",
|
|
"test/auto_test/voe_standard_test.cc",
|
|
"test/auto_test/voe_standard_test.h",
|
|
"test/auto_test/voe_test_defines.h",
|
|
]
|
|
|
|
defines = []
|
|
|
|
if (rtc_enable_protobuf) {
|
|
defines = [ "ENABLE_RTC_EVENT_LOG" ]
|
|
}
|
|
|
|
if (is_win) {
|
|
defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
|
|
|
|
cflags = [
|
|
"/wd4267", # size_t to int truncation.
|
|
"/wd4373", # Virtual function override.
|
|
# TODO(kjellander): Bug 261: fix this warning.
|
|
]
|
|
}
|
|
|
|
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" ]
|
|
}
|
|
}
|
|
}
|
|
}
|