Renaming min_pacing_rate to min_total_allocated_bitrate.

This prepares for upcoming CL using the value for more than
controlling pacing rates.

Bug: webrtc:9887
Change-Id: Id3891c3727865149b87f946b3e7c3095a6ac9f26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126001
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27004}
This commit is contained in:
Sebastian Jansson 2019-03-06 16:58:18 +01:00 committed by Commit Bot
parent 7b41225156
commit 11e55ee90a
7 changed files with 21 additions and 18 deletions

View File

@ -44,6 +44,7 @@ specific_include_rules = {
"+rtc_base/checks.h",
"+rtc_base/system/rtc_export.h",
"+rtc_base/units/unit_base.h",
"+rtc_base/deprecation.h",
],
"array_view\.h": [
@ -66,10 +67,6 @@ specific_include_rules = {
"+rtc_base/socket_address.h",
],
"create_peerconnection_factory\.h": [
"+rtc_base/deprecation.h",
],
"data_channel_interface\.h": [
"+rtc_base/copy_on_write_buffer.h",
"+rtc_base/ref_count.h",
@ -150,10 +147,6 @@ specific_include_rules = {
"+rtc_base/logging.h",
],
"rtp_parameters\.h": [
"+rtc_base/deprecation.h",
],
"rtp_receiver_interface\.h": [
"+rtc_base/ref_count.h",
],
@ -208,7 +201,6 @@ specific_include_rules = {
"audio_encoder\.h": [
"+rtc_base/buffer.h",
"+rtc_base/deprecation.h",
],
"audio_encoder_factory\.h": [

View File

@ -36,6 +36,7 @@ rtc_static_library("network_control") {
deps = [
":webrtc_key_value_config",
"../../rtc_base:deprecation",
"../units:data_rate",
"../units:data_size",
"../units:time_delta",

View File

@ -12,7 +12,8 @@
namespace webrtc {
StreamsConfig::StreamsConfig() = default;
// TODO(srte): Revert to using default after removing union member.
StreamsConfig::StreamsConfig() {}
StreamsConfig::StreamsConfig(const StreamsConfig&) = default;
StreamsConfig::~StreamsConfig() = default;

View File

@ -18,6 +18,7 @@
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "rtc_base/deprecation.h"
namespace webrtc {
@ -33,7 +34,11 @@ struct StreamsConfig {
Timestamp at_time = Timestamp::PlusInfinity();
absl::optional<bool> requests_alr_probing;
absl::optional<double> pacing_factor;
absl::optional<DataRate> min_pacing_rate;
union {
absl::optional<DataRate> min_total_allocated_bitrate = absl::nullopt;
// Use min_total_allocated_bitrate instead.
RTC_DEPRECATED absl::optional<DataRate> min_pacing_rate;
};
absl::optional<DataRate> max_padding_rate;
absl::optional<DataRate> max_total_allocated_bitrate;
};

View File

@ -165,7 +165,8 @@ void RtpTransportControllerSend::SetAllocatedSendBitrateLimits(
int max_padding_bitrate_bps,
int max_total_bitrate_bps) {
RTC_DCHECK_RUN_ON(&task_queue_);
streams_config_.min_pacing_rate = DataRate::bps(min_send_bitrate_bps);
streams_config_.min_total_allocated_bitrate =
DataRate::bps(min_send_bitrate_bps);
streams_config_.max_padding_rate = DataRate::bps(max_padding_bitrate_bps);
streams_config_.max_total_allocated_bitrate =
DataRate::bps(max_total_bitrate_bps);

View File

@ -122,8 +122,9 @@ GoogCcNetworkController::GoogCcNetworkController(RtcEventLog* event_log,
last_pushback_target_rate_(last_raw_target_rate_),
pacing_factor_(config.stream_based_config.pacing_factor.value_or(
kDefaultPaceMultiplier)),
min_pacing_rate_(config.stream_based_config.min_pacing_rate.value_or(
DataRate::Zero())),
min_total_allocated_bitrate_(
config.stream_based_config.min_total_allocated_bitrate.value_or(
DataRate::Zero())),
max_padding_rate_(config.stream_based_config.max_padding_rate.value_or(
DataRate::Zero())),
max_total_allocated_bitrate_(DataRate::Zero()) {
@ -308,8 +309,9 @@ NetworkControlUpdate GoogCcNetworkController::OnStreamsConfig(
pacing_factor_ = *msg.pacing_factor;
pacing_changed = true;
}
if (msg.min_pacing_rate && *msg.min_pacing_rate != min_pacing_rate_) {
min_pacing_rate_ = *msg.min_pacing_rate;
if (msg.min_total_allocated_bitrate &&
*msg.min_total_allocated_bitrate != min_total_allocated_bitrate_) {
min_total_allocated_bitrate_ = *msg.min_total_allocated_bitrate;
pacing_changed = true;
}
if (msg.max_padding_rate && *msg.max_padding_rate != max_padding_rate_) {
@ -633,7 +635,8 @@ PacerConfig GoogCcNetworkController::GetPacingRates(Timestamp at_time) const {
// Pacing rate is based on target rate before congestion window pushback,
// because we don't want to build queues in the pacer when pushback occurs.
DataRate pacing_rate =
std::max(min_pacing_rate_, last_raw_target_rate_) * pacing_factor_;
std::max(min_total_allocated_bitrate_, last_raw_target_rate_) *
pacing_factor_;
DataRate padding_rate =
std::min(max_padding_rate_, last_pushback_target_rate_);
PacerConfig msg;

View File

@ -108,7 +108,7 @@ class GoogCcNetworkController : public NetworkControllerInterface {
int64_t last_estimated_rtt_ms_ = 0;
double pacing_factor_;
DataRate min_pacing_rate_;
DataRate min_total_allocated_bitrate_;
DataRate max_padding_rate_;
DataRate max_total_allocated_bitrate_;