From 780c13652351fe01ce88d622a743ae62c4880bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Thu, 9 May 2019 13:12:24 +0200 Subject: [PATCH] Move OverUseDetectorOptions out of common_types.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved to modules/remote_bitrate_estimator/overuse_estimator.h. Bug: webrtc:5876 Change-Id: Iae4b07d94bf4f16b887c3a4129168c4a45a3b5e1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135570 Commit-Queue: Niels Moller Reviewed-by: Björn Terelius Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#27893} --- common_types.h | 28 ------------------- modules/remote_bitrate_estimator/BUILD.gn | 1 - .../overuse_estimator.h | 16 ++++++++++- 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/common_types.h b/common_types.h index 58c0a93d88..d150a3d771 100644 --- a/common_types.h +++ b/common_types.h @@ -77,34 +77,6 @@ struct SpatialLayer { // settings such as resolution. typedef SpatialLayer SimulcastStream; -// Bandwidth over-use detector options. These are used to drive -// experimentation with bandwidth estimation parameters. -// See modules/remote_bitrate_estimator/overuse_detector.h -// TODO(terelius): This is only used in overuse_estimator.cc, and only in the -// default constructed state. Can we move the relevant variables into that -// class and delete this? See also disabled warning at line 27 -struct OverUseDetectorOptions { - OverUseDetectorOptions() - : initial_slope(8.0 / 512.0), - initial_offset(0), - initial_e(), - initial_process_noise(), - initial_avg_noise(0.0), - initial_var_noise(50) { - initial_e[0][0] = 100; - initial_e[1][1] = 1e-1; - initial_e[0][1] = initial_e[1][0] = 0; - initial_process_noise[0] = 1e-13; - initial_process_noise[1] = 1e-3; - } - double initial_slope; - double initial_offset; - double initial_e[2][2]; - double initial_process_noise[2]; - double initial_avg_noise; - double initial_var_noise; -}; - // Minimum and maximum playout delay values from capture to render. // These are best effort values. // diff --git a/modules/remote_bitrate_estimator/BUILD.gn b/modules/remote_bitrate_estimator/BUILD.gn index 20977b2619..ea2a5279fb 100644 --- a/modules/remote_bitrate_estimator/BUILD.gn +++ b/modules/remote_bitrate_estimator/BUILD.gn @@ -40,7 +40,6 @@ rtc_static_library("remote_bitrate_estimator") { } deps = [ - "../..:webrtc_common", "../../api:network_state_predictor_api", "../../api:rtp_headers", "../../api/transport:field_trial_based_config", diff --git a/modules/remote_bitrate_estimator/overuse_estimator.h b/modules/remote_bitrate_estimator/overuse_estimator.h index c06345bd69..f52e063ce1 100644 --- a/modules/remote_bitrate_estimator/overuse_estimator.h +++ b/modules/remote_bitrate_estimator/overuse_estimator.h @@ -13,12 +13,26 @@ #include #include -#include "common_types.h" // NOLINT(build/include) #include "modules/remote_bitrate_estimator/include/bwe_defines.h" #include "rtc_base/constructor_magic.h" namespace webrtc { +// Bandwidth over-use detector options. These are used to drive +// experimentation with bandwidth estimation parameters. +// TODO(terelius): This is only used in overuse_estimator.cc, and only in the +// default constructed state. Can we move the relevant variables into that +// class and delete this? +struct OverUseDetectorOptions { + OverUseDetectorOptions() = default; + double initial_slope = 8.0 / 512.0; + double initial_offset = 0; + double initial_e[2][2] = {{100.0, 0.0}, {0.0, 1e-1}}; + double initial_process_noise[2] = {1e-13, 1e-3}; + double initial_avg_noise = 0.0; + double initial_var_noise = 50.0; +}; + class OveruseEstimator { public: explicit OveruseEstimator(const OverUseDetectorOptions& options);