Moved ALR experiment settings to new experiments folder.
This replaces most of the existing dependencies on the application limited region(ALR) detector. This is to achieve a greater separation of concerns and will make further refactoring regarding the ALR Detector less invasive on other parts of the code base. Bug: webrtc:8415 Change-Id: I92912254c6d02285cce6a88f6789f0ac94794c88 Reviewed-on: https://webrtc-review.googlesource.com/37560 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21598}
This commit is contained in:
parent
0a52f1def6
commit
cabe3838bb
@ -40,6 +40,7 @@ rtc_static_library("pacing") {
|
||||
"../../logging:rtc_event_log_api",
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base/experiments:alr_experiment",
|
||||
"../../system_wrappers",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"../remote_bitrate_estimator",
|
||||
@ -65,6 +66,7 @@ if (rtc_include_tests) {
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base:rtc_base_tests_utils",
|
||||
"../../rtc_base/experiments:alr_experiment",
|
||||
"../../system_wrappers",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"../../test:field_trial",
|
||||
|
||||
@ -10,11 +10,13 @@
|
||||
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_alr_state.h"
|
||||
#include "logging/rtc_event_log/rtc_event_log.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
#include "rtc_base/format_macros.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
@ -22,13 +24,6 @@
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
const char AlrDetector::kScreenshareProbingBweExperimentName[] =
|
||||
"WebRTC-ProbingScreenshareBwe";
|
||||
const char AlrDetector::kStrictPacingAndProbingExperimentName[] =
|
||||
"WebRTC-StrictPacingAndProbing";
|
||||
const char kDefaultProbingScreenshareBweSettings[] = "1.0,2875,80,40,-60,3";
|
||||
|
||||
AlrDetector::AlrDetector() : AlrDetector(nullptr) {}
|
||||
|
||||
AlrDetector::AlrDetector(RtcEventLog* event_log)
|
||||
@ -37,15 +32,13 @@ AlrDetector::AlrDetector(RtcEventLog* event_log)
|
||||
alr_stop_budget_level_percent_(kDefaultAlrStopBudgetLevelPercent),
|
||||
alr_budget_(0, true),
|
||||
event_log_(event_log) {
|
||||
RTC_CHECK(
|
||||
field_trial::FindFullName(kStrictPacingAndProbingExperimentName)
|
||||
.empty() ||
|
||||
field_trial::FindFullName(kScreenshareProbingBweExperimentName).empty());
|
||||
RTC_CHECK(AlrExperimentSettings::MaxOneFieldTrialEnabled());
|
||||
rtc::Optional<AlrExperimentSettings> experiment_settings =
|
||||
ParseAlrSettingsFromFieldTrial(kScreenshareProbingBweExperimentName);
|
||||
AlrExperimentSettings::CreateFromFieldTrial(
|
||||
AlrExperimentSettings::kScreenshareProbingBweExperimentName);
|
||||
if (!experiment_settings) {
|
||||
experiment_settings =
|
||||
ParseAlrSettingsFromFieldTrial(kStrictPacingAndProbingExperimentName);
|
||||
experiment_settings = AlrExperimentSettings::CreateFromFieldTrial(
|
||||
AlrExperimentSettings::kStrictPacingAndProbingExperimentName);
|
||||
}
|
||||
if (experiment_settings) {
|
||||
alr_stop_budget_level_percent_ =
|
||||
@ -80,7 +73,7 @@ void AlrDetector::OnBytesSent(size_t bytes_sent, int64_t delta_time_ms) {
|
||||
|
||||
void AlrDetector::SetEstimatedBitrate(int bitrate_bps) {
|
||||
RTC_DCHECK(bitrate_bps);
|
||||
const auto target_rate_kbps = int64_t{bitrate_bps} *
|
||||
const auto target_rate_kbps = static_cast<int64_t>(bitrate_bps) *
|
||||
bandwidth_usage_percent_ / (1000 * 100);
|
||||
alr_budget_.set_target_rate_kbps(rtc::dchecked_cast<int>(target_rate_kbps));
|
||||
}
|
||||
@ -89,54 +82,4 @@ rtc::Optional<int64_t> AlrDetector::GetApplicationLimitedRegionStartTime()
|
||||
const {
|
||||
return alr_started_time_ms_;
|
||||
}
|
||||
|
||||
rtc::Optional<AlrDetector::AlrExperimentSettings>
|
||||
AlrDetector::ParseAlrSettingsFromFieldTrial(const char* experiment_name) {
|
||||
rtc::Optional<AlrExperimentSettings> ret;
|
||||
std::string group_name = field_trial::FindFullName(experiment_name);
|
||||
|
||||
const std::string kIgnoredSuffix = "_Dogfood";
|
||||
std::string::size_type suffix_pos = group_name.rfind(kIgnoredSuffix);
|
||||
if (suffix_pos != std::string::npos &&
|
||||
suffix_pos == group_name.length() - kIgnoredSuffix.length()) {
|
||||
group_name.resize(group_name.length() - kIgnoredSuffix.length());
|
||||
}
|
||||
|
||||
if (experiment_name == kScreenshareProbingBweExperimentName) {
|
||||
// This experiment is now default-on with fixed settings.
|
||||
// TODO(sprang): Remove this kill-switch and clean up experiment code.
|
||||
if (group_name != "Disabled") {
|
||||
group_name = kDefaultProbingScreenshareBweSettings;
|
||||
}
|
||||
}
|
||||
|
||||
if (group_name.empty())
|
||||
return ret;
|
||||
|
||||
AlrExperimentSettings settings;
|
||||
if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d,%d",
|
||||
&settings.pacing_factor, &settings.max_paced_queue_time,
|
||||
&settings.alr_bandwidth_usage_percent,
|
||||
&settings.alr_start_budget_level_percent,
|
||||
&settings.alr_stop_budget_level_percent,
|
||||
&settings.group_id) == 6) {
|
||||
ret.emplace(settings);
|
||||
RTC_LOG(LS_INFO) << "Using ALR experiment settings: "
|
||||
"pacing factor: "
|
||||
<< settings.pacing_factor << ", max pacer queue length: "
|
||||
<< settings.max_paced_queue_time
|
||||
<< ", ALR start bandwidth usage percent: "
|
||||
<< settings.alr_bandwidth_usage_percent
|
||||
<< ", ALR end budget level percent: "
|
||||
<< settings.alr_start_budget_level_percent
|
||||
<< ", ALR end budget level percent: "
|
||||
<< settings.alr_stop_budget_level_percent
|
||||
<< ", ALR experiment group ID: " << settings.group_id;
|
||||
} else {
|
||||
RTC_LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -44,20 +44,6 @@ class AlrDetector {
|
||||
// started or empty result if the sender is currently not application-limited.
|
||||
rtc::Optional<int64_t> GetApplicationLimitedRegionStartTime() const;
|
||||
|
||||
struct AlrExperimentSettings {
|
||||
float pacing_factor = PacedSender::kDefaultPaceMultiplier;
|
||||
int64_t max_paced_queue_time = PacedSender::kMaxQueueLengthMs;
|
||||
int alr_bandwidth_usage_percent = kDefaultAlrBandwidthUsagePercent;
|
||||
int alr_start_budget_level_percent = kDefaultAlrStartBudgetLevelPercent;
|
||||
int alr_stop_budget_level_percent = kDefaultAlrStopBudgetLevelPercent;
|
||||
// Will be sent to the receive side for stats slicing.
|
||||
// Can be 0..6, because it's sent as a 3 bits value and there's also
|
||||
// reserved value to indicate absence of experiment.
|
||||
int group_id = 0;
|
||||
};
|
||||
static rtc::Optional<AlrExperimentSettings> ParseAlrSettingsFromFieldTrial(
|
||||
const char* experiment_name);
|
||||
|
||||
// Sent traffic percentage as a function of network capacity used to determine
|
||||
// application-limited region. ALR region start when bandwidth usage drops
|
||||
// below kAlrStartUsagePercent and ends when it raises above
|
||||
@ -66,8 +52,6 @@ class AlrDetector {
|
||||
static constexpr int kDefaultAlrBandwidthUsagePercent = 65;
|
||||
static constexpr int kDefaultAlrStartBudgetLevelPercent = 80;
|
||||
static constexpr int kDefaultAlrStopBudgetLevelPercent = 50;
|
||||
static const char kScreenshareProbingBweExperimentName[];
|
||||
static const char kStrictPacingAndProbingExperimentName[];
|
||||
|
||||
void UpdateBudgetWithElapsedTime(int64_t delta_time_ms);
|
||||
void UpdateBudgetWithBytesSent(size_t bytes_sent);
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
@ -145,8 +146,8 @@ TEST_F(AlrDetectorTest, BandwidthEstimateChanges) {
|
||||
TEST_F(AlrDetectorTest, ParseControlFieldTrial) {
|
||||
webrtc::test::ScopedFieldTrials field_trial(
|
||||
"WebRTC-ProbingScreenshareBwe/Control/");
|
||||
rtc::Optional<AlrDetector::AlrExperimentSettings> parsed_params =
|
||||
AlrDetector::ParseAlrSettingsFromFieldTrial(
|
||||
rtc::Optional<AlrExperimentSettings> parsed_params =
|
||||
AlrExperimentSettings::CreateFromFieldTrial(
|
||||
"WebRTC-ProbingScreenshareBwe");
|
||||
EXPECT_FALSE(static_cast<bool>(parsed_params));
|
||||
}
|
||||
@ -154,8 +155,8 @@ TEST_F(AlrDetectorTest, ParseControlFieldTrial) {
|
||||
TEST_F(AlrDetectorTest, ParseActiveFieldTrial) {
|
||||
webrtc::test::ScopedFieldTrials field_trial(
|
||||
"WebRTC-ProbingScreenshareBwe/1.1,2875,85,20,-20,1/");
|
||||
rtc::Optional<AlrDetector::AlrExperimentSettings> parsed_params =
|
||||
AlrDetector::ParseAlrSettingsFromFieldTrial(
|
||||
rtc::Optional<AlrExperimentSettings> parsed_params =
|
||||
AlrExperimentSettings::CreateFromFieldTrial(
|
||||
"WebRTC-ProbingScreenshareBwe");
|
||||
ASSERT_TRUE(static_cast<bool>(parsed_params));
|
||||
EXPECT_EQ(1.1f, parsed_params->pacing_factor);
|
||||
|
||||
@ -150,6 +150,7 @@ if (rtc_include_tests) {
|
||||
"../../rtc_base:rtc_base",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base:rtc_numerics",
|
||||
"../../rtc_base/experiments:alr_experiment",
|
||||
"../../system_wrappers",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"../../test:perf_test",
|
||||
|
||||
@ -118,10 +118,10 @@ rtc_static_library("video_coding") {
|
||||
"../../rtc_base:rtc_numerics",
|
||||
"../../rtc_base:rtc_task_queue",
|
||||
"../../rtc_base:sequenced_task_checker",
|
||||
"../../rtc_base/experiments:alr_experiment",
|
||||
"../../system_wrappers",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"../../system_wrappers:metrics_api",
|
||||
"../pacing",
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"../utility:utility",
|
||||
]
|
||||
|
||||
@ -2,6 +2,7 @@ include_rules = [
|
||||
"+vpx",
|
||||
"+call",
|
||||
"+common_video",
|
||||
"+experiments",
|
||||
"+system_wrappers",
|
||||
"+rtc_tools",
|
||||
"+third_party/libyuv",
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
#include "api/optional.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
#include "modules/include/module_common_types_public.h"
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
#include "modules/video_coding/encoded_frame.h"
|
||||
#include "modules/video_coding/media_optimization.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
#include "rtc_base/trace_event.h"
|
||||
@ -194,16 +194,16 @@ VCMEncodedFrameCallback::VCMEncodedFrameCallback(
|
||||
incorrect_capture_time_logged_messages_(0),
|
||||
reordered_frames_logged_messages_(0),
|
||||
stalled_encoder_logged_messages_(0) {
|
||||
rtc::Optional<AlrDetector::AlrExperimentSettings> experiment_settings =
|
||||
AlrDetector::ParseAlrSettingsFromFieldTrial(
|
||||
AlrDetector::kStrictPacingAndProbingExperimentName);
|
||||
rtc::Optional<AlrExperimentSettings> experiment_settings =
|
||||
AlrExperimentSettings::CreateFromFieldTrial(
|
||||
AlrExperimentSettings::kStrictPacingAndProbingExperimentName);
|
||||
if (experiment_settings) {
|
||||
experiment_groups_[0] = experiment_settings->group_id + 1;
|
||||
} else {
|
||||
experiment_groups_[0] = 0;
|
||||
}
|
||||
experiment_settings = AlrDetector::ParseAlrSettingsFromFieldTrial(
|
||||
AlrDetector::kScreenshareProbingBweExperimentName);
|
||||
experiment_settings = AlrExperimentSettings::CreateFromFieldTrial(
|
||||
AlrExperimentSettings::kScreenshareProbingBweExperimentName);
|
||||
if (experiment_settings) {
|
||||
experiment_groups_[1] = experiment_settings->group_id + 1;
|
||||
} else {
|
||||
|
||||
21
rtc_base/experiments/BUILD.gn
Normal file
21
rtc_base/experiments/BUILD.gn
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2018 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("alr_experiment") {
|
||||
sources = [
|
||||
"alr_experiment.cc",
|
||||
"alr_experiment.h",
|
||||
]
|
||||
deps = [
|
||||
"../:rtc_base_approved",
|
||||
"../../api:optional",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
]
|
||||
}
|
||||
3
rtc_base/experiments/DEPS
Normal file
3
rtc_base/experiments/DEPS
Normal file
@ -0,0 +1,3 @@
|
||||
include_rules = [
|
||||
"+system_wrappers",
|
||||
]
|
||||
83
rtc_base/experiments/alr_experiment.cc
Normal file
83
rtc_base/experiments/alr_experiment.cc
Normal file
@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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.
|
||||
*/
|
||||
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "rtc_base/format_macros.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
const char AlrExperimentSettings::kScreenshareProbingBweExperimentName[] =
|
||||
"WebRTC-ProbingScreenshareBwe";
|
||||
const char AlrExperimentSettings::kStrictPacingAndProbingExperimentName[] =
|
||||
"WebRTC-StrictPacingAndProbing";
|
||||
const char kDefaultProbingScreenshareBweSettings[] = "1.0,2875,80,40,-60,3";
|
||||
|
||||
bool AlrExperimentSettings::MaxOneFieldTrialEnabled() {
|
||||
return field_trial::FindFullName(kStrictPacingAndProbingExperimentName)
|
||||
.empty() ||
|
||||
field_trial::FindFullName(kScreenshareProbingBweExperimentName)
|
||||
.empty();
|
||||
}
|
||||
|
||||
rtc::Optional<AlrExperimentSettings>
|
||||
AlrExperimentSettings::CreateFromFieldTrial(const char* experiment_name) {
|
||||
rtc::Optional<AlrExperimentSettings> ret;
|
||||
std::string group_name = field_trial::FindFullName(experiment_name);
|
||||
|
||||
const std::string kIgnoredSuffix = "_Dogfood";
|
||||
std::string::size_type suffix_pos = group_name.rfind(kIgnoredSuffix);
|
||||
if (suffix_pos != std::string::npos &&
|
||||
suffix_pos == group_name.length() - kIgnoredSuffix.length()) {
|
||||
group_name.resize(group_name.length() - kIgnoredSuffix.length());
|
||||
}
|
||||
|
||||
if (experiment_name == kScreenshareProbingBweExperimentName) {
|
||||
// This experiment is now default-on with fixed settings.
|
||||
// TODO(sprang): Remove this kill-switch and clean up experiment code.
|
||||
if (group_name != "Disabled") {
|
||||
group_name = kDefaultProbingScreenshareBweSettings;
|
||||
}
|
||||
}
|
||||
|
||||
if (group_name.empty())
|
||||
return ret;
|
||||
|
||||
AlrExperimentSettings settings;
|
||||
if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d,%d",
|
||||
&settings.pacing_factor, &settings.max_paced_queue_time,
|
||||
&settings.alr_bandwidth_usage_percent,
|
||||
&settings.alr_start_budget_level_percent,
|
||||
&settings.alr_stop_budget_level_percent,
|
||||
&settings.group_id) == 6) {
|
||||
ret.emplace(settings);
|
||||
RTC_LOG(LS_INFO) << "Using ALR experiment settings: "
|
||||
"pacing factor: "
|
||||
<< settings.pacing_factor << ", max pacer queue length: "
|
||||
<< settings.max_paced_queue_time
|
||||
<< ", ALR start bandwidth usage percent: "
|
||||
<< settings.alr_bandwidth_usage_percent
|
||||
<< ", ALR end budget level percent: "
|
||||
<< settings.alr_start_budget_level_percent
|
||||
<< ", ALR end budget level percent: "
|
||||
<< settings.alr_stop_budget_level_percent
|
||||
<< ", ALR experiment group ID: " << settings.group_id;
|
||||
} else {
|
||||
RTC_LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
40
rtc_base/experiments/alr_experiment.h
Normal file
40
rtc_base/experiments/alr_experiment.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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.
|
||||
*/
|
||||
|
||||
#ifndef RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_
|
||||
#define RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_
|
||||
|
||||
#include "api/optional.h"
|
||||
|
||||
namespace webrtc {
|
||||
struct AlrExperimentSettings {
|
||||
public:
|
||||
float pacing_factor;
|
||||
int64_t max_paced_queue_time;
|
||||
int alr_bandwidth_usage_percent;
|
||||
int alr_start_budget_level_percent;
|
||||
int alr_stop_budget_level_percent;
|
||||
// Will be sent to the receive side for stats slicing.
|
||||
// Can be 0..6, because it's sent as a 3 bits value and there's also
|
||||
// reserved value to indicate absence of experiment.
|
||||
int group_id;
|
||||
|
||||
static const char kScreenshareProbingBweExperimentName[];
|
||||
static const char kStrictPacingAndProbingExperimentName[];
|
||||
static rtc::Optional<AlrExperimentSettings> CreateFromFieldTrial(
|
||||
const char* experiment_name);
|
||||
static bool MaxOneFieldTrialEnabled();
|
||||
|
||||
private:
|
||||
AlrExperimentSettings() = default;
|
||||
};
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_
|
||||
@ -69,6 +69,7 @@ rtc_static_library("video") {
|
||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||
"../modules/video_coding:video_codec_interface",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base/experiments:alr_experiment",
|
||||
"../system_wrappers:field_trial_api",
|
||||
"../system_wrappers:metrics_api",
|
||||
|
||||
@ -143,6 +144,7 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":video_quality_test",
|
||||
"../modules/pacing:pacing",
|
||||
"../rtc_base/experiments:alr_experiment",
|
||||
"../test:field_trial",
|
||||
"../test:test_common",
|
||||
"../test:test_support",
|
||||
@ -322,6 +324,7 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../rtc_base:rtc_numerics",
|
||||
"../rtc_base/experiments:alr_experiment",
|
||||
"../system_wrappers",
|
||||
"../system_wrappers:field_trial_default",
|
||||
"../system_wrappers:metrics_api",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "video/video_quality_test.h"
|
||||
@ -30,7 +30,7 @@ class FullStackTest : public VideoQualityTest {
|
||||
const std::string kScreenshareSimulcastExperiment =
|
||||
"WebRTC-SimulcastScreenshare/Enabled/";
|
||||
const std::string kAlrProbingExperiment =
|
||||
std::string(AlrDetector::kScreenshareProbingBweExperimentName) +
|
||||
std::string(AlrExperimentSettings::kScreenshareProbingBweExperimentName) +
|
||||
"/1.1,2875,85,20,-20,0/";
|
||||
const std::string kRoundRobinPacingQueueExperiment =
|
||||
"WebRTC-RoundRobinPacing/Enabled/";
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
#include "modules/video_coding/include/video_codec_interface.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
@ -17,17 +17,18 @@
|
||||
#include <vector>
|
||||
|
||||
#include "call/rtp_transport_controller_send_interface.h"
|
||||
#include "call/video_send_stream.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "common_video/include/video_bitrate_allocator.h"
|
||||
#include "modules/bitrate_controller/include/bitrate_controller.h"
|
||||
#include "modules/congestion_controller/include/send_side_congestion_controller.h"
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
#include "modules/pacing/packet_router.h"
|
||||
#include "modules/rtp_rtcp/include/rtp_rtcp.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_sender.h"
|
||||
#include "modules/utility/include/process_thread.h"
|
||||
#include "modules/video_coding/utility/ivf_file_writer.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
#include "rtc_base/file.h"
|
||||
#include "rtc_base/location.h"
|
||||
#include "rtc_base/logging.h"
|
||||
@ -36,7 +37,6 @@
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
#include "video/call_stats.h"
|
||||
#include "video/payload_router.h"
|
||||
#include "call/video_send_stream.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -754,22 +754,18 @@ VideoSendStreamImpl::VideoSendStreamImpl(
|
||||
RTC_DCHECK(transport_);
|
||||
RTC_DCHECK(transport_->send_side_cc());
|
||||
RTC_DCHECK_GT(encoder_max_bitrate_bps_, 0);
|
||||
RTC_CHECK(field_trial::FindFullName(
|
||||
AlrDetector::kStrictPacingAndProbingExperimentName)
|
||||
.empty() ||
|
||||
field_trial::FindFullName(
|
||||
AlrDetector::kScreenshareProbingBweExperimentName)
|
||||
.empty());
|
||||
|
||||
RTC_CHECK(AlrExperimentSettings::MaxOneFieldTrialEnabled());
|
||||
// If send-side BWE is enabled, check if we should apply updated probing and
|
||||
// pacing settings.
|
||||
if (TransportSeqNumExtensionConfigured(*config_)) {
|
||||
rtc::Optional<AlrDetector::AlrExperimentSettings> alr_settings;
|
||||
rtc::Optional<AlrExperimentSettings> alr_settings;
|
||||
if (content_type == VideoEncoderConfig::ContentType::kScreen) {
|
||||
alr_settings = AlrDetector::ParseAlrSettingsFromFieldTrial(
|
||||
AlrDetector::kScreenshareProbingBweExperimentName);
|
||||
alr_settings = AlrExperimentSettings::CreateFromFieldTrial(
|
||||
AlrExperimentSettings::kScreenshareProbingBweExperimentName);
|
||||
} else {
|
||||
alr_settings = AlrDetector::ParseAlrSettingsFromFieldTrial(
|
||||
AlrDetector::kStrictPacingAndProbingExperimentName);
|
||||
alr_settings = AlrExperimentSettings::CreateFromFieldTrial(
|
||||
AlrExperimentSettings::kStrictPacingAndProbingExperimentName);
|
||||
}
|
||||
if (alr_settings) {
|
||||
transport->send_side_cc()->EnablePeriodicAlrProbing(true);
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#include "call/rtp_transport_controller_send.h"
|
||||
#include "common_video/include/frame_callback.h"
|
||||
#include "common_video/include/video_frame.h"
|
||||
#include "modules/pacing/alr_detector.h"
|
||||
#include "modules/rtp_rtcp/include/rtp_header_parser.h"
|
||||
#include "modules/rtp_rtcp/include/rtp_rtcp.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_sender.h"
|
||||
@ -26,6 +25,7 @@
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/criticalsection.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/experiments/alr_experiment.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/platform_thread.h"
|
||||
#include "rtc_base/rate_limiter.h"
|
||||
@ -3541,7 +3541,7 @@ TEST_F(VideoSendStreamTest, SendsKeepAlive) {
|
||||
|
||||
TEST_F(VideoSendStreamTest, ConfiguresAlrWhenSendSideOn) {
|
||||
const std::string kAlrProbingExperiment =
|
||||
std::string(AlrDetector::kScreenshareProbingBweExperimentName) +
|
||||
std::string(AlrExperimentSettings::kScreenshareProbingBweExperimentName) +
|
||||
"/1.0,2875,80,40,-60,3/";
|
||||
test::ScopedFieldTrials alr_experiment(kAlrProbingExperiment);
|
||||
class PacingFactorObserver : public test::SendTest {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user