Renaming probing_interval to bwe_period globally.
probing_interval as a name is used for the period that BWE attempt to increase its estimate. The name is confusing since it is not related to "probing" which is a special mechanism for estimating BWE.
BUG=None
Review-Url: https://codereview.webrtc.org/2888893002
Cr-Original-Commit-Position: refs/heads/master@{#18203}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 93e4522105e9933202d660f20a1d86f0c4972a40
diff --git a/api/audio_codecs/audio_encoder.cc b/api/audio_codecs/audio_encoder.cc
index 8dab4d6..ac5f89f 100644
--- a/api/audio_codecs/audio_encoder.cc
+++ b/api/audio_codecs/audio_encoder.cc
@@ -86,7 +86,7 @@
void AudioEncoder::OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) {}
+ rtc::Optional<int64_t> bwe_period_ms) {}
void AudioEncoder::OnReceivedRtt(int rtt_ms) {}
diff --git a/api/audio_codecs/audio_encoder.h b/api/audio_codecs/audio_encoder.h
index 3e81000..06e232d 100644
--- a/api/audio_codecs/audio_encoder.h
+++ b/api/audio_codecs/audio_encoder.h
@@ -189,7 +189,7 @@
// the bandwidth estimator to this encoder to allow it to adapt.
virtual void OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms);
+ rtc::Optional<int64_t> bwe_period_ms);
// Provides RTT to this encoder to allow it to adapt.
virtual void OnReceivedRtt(int rtt_ms);
diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc
index e95c5e7..3d636c2 100644
--- a/audio/audio_send_stream.cc
+++ b/audio/audio_send_stream.cc
@@ -305,7 +305,7 @@
uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt,
- int64_t probing_interval_ms) {
+ int64_t bwe_period_ms) {
// A send stream may be allocated a bitrate of zero if the allocator decides
// to disable it. For now we ignore this decision and keep sending on min
// bitrate.
@@ -320,7 +320,7 @@
if (bitrate_bps > max_bitrate_bps)
bitrate_bps = max_bitrate_bps;
- channel_proxy_->SetBitrate(bitrate_bps, probing_interval_ms);
+ channel_proxy_->SetBitrate(bitrate_bps, bwe_period_ms);
// The amount of audio protection is not exposed by the encoder, hence
// always returning 0.
diff --git a/audio/audio_send_stream.h b/audio/audio_send_stream.h
index dcc28c9..065fee7 100644
--- a/audio/audio_send_stream.h
+++ b/audio/audio_send_stream.h
@@ -64,7 +64,7 @@
uint32_t OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt,
- int64_t probing_interval_ms) override;
+ int64_t bwe_period_ms) override;
// From PacketFeedbackObserver.
void OnPacketAdded(uint32_t ssrc, uint16_t seq_num) override;
diff --git a/call/bitrate_allocator.cc b/call/bitrate_allocator.cc
index c3568df..9aecc6e 100644
--- a/call/bitrate_allocator.cc
+++ b/call/bitrate_allocator.cc
@@ -68,14 +68,14 @@
void BitrateAllocator::OnNetworkChanged(uint32_t target_bitrate_bps,
uint8_t fraction_loss,
int64_t rtt,
- int64_t probing_interval_ms) {
+ int64_t bwe_period_ms) {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequenced_checker_);
last_bitrate_bps_ = target_bitrate_bps;
last_non_zero_bitrate_bps_ =
target_bitrate_bps > 0 ? target_bitrate_bps : last_non_zero_bitrate_bps_;
last_fraction_loss_ = fraction_loss;
last_rtt_ = rtt;
- last_probing_interval_ms_ = probing_interval_ms;
+ last_bwe_period_ms_ = bwe_period_ms;
// Periodically log the incoming BWE.
int64_t now = clock_->TimeInMilliseconds();
@@ -90,7 +90,7 @@
uint32_t allocated_bitrate = allocation[config.observer];
uint32_t protection_bitrate = config.observer->OnBitrateUpdated(
allocated_bitrate, last_fraction_loss_, last_rtt_,
- last_probing_interval_ms_);
+ last_bwe_period_ms_);
if (allocated_bitrate == 0 && config.allocated_bitrate_bps > 0) {
if (target_bitrate_bps > 0)
@@ -148,7 +148,7 @@
uint32_t allocated_bitrate = allocation[config.observer];
uint32_t protection_bitrate = config.observer->OnBitrateUpdated(
allocated_bitrate, last_fraction_loss_, last_rtt_,
- last_probing_interval_ms_);
+ last_bwe_period_ms_);
config.allocated_bitrate_bps = allocated_bitrate;
if (allocated_bitrate > 0)
config.media_ratio = MediaRatio(allocated_bitrate, protection_bitrate);
@@ -159,7 +159,7 @@
// observer know that it can not produce frames.
allocation = AllocateBitrates(last_non_zero_bitrate_bps_);
observer->OnBitrateUpdated(0, last_fraction_loss_, last_rtt_,
- last_probing_interval_ms_);
+ last_bwe_period_ms_);
}
UpdateAllocationLimits();
}
diff --git a/call/bitrate_allocator.h b/call/bitrate_allocator.h
index f133fa1..e92eac9 100644
--- a/call/bitrate_allocator.h
+++ b/call/bitrate_allocator.h
@@ -34,7 +34,7 @@
virtual uint32_t OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt,
- int64_t probing_interval_ms) = 0;
+ int64_t bwe_period_ms) = 0;
protected:
virtual ~BitrateAllocatorObserver() {}
@@ -64,7 +64,7 @@
void OnNetworkChanged(uint32_t target_bitrate_bps,
uint8_t fraction_loss,
int64_t rtt,
- int64_t probing_interval_ms);
+ int64_t bwe_period_ms);
// Set the start and max send bitrate used by the bandwidth management.
//
@@ -160,7 +160,7 @@
uint32_t last_non_zero_bitrate_bps_ GUARDED_BY(&sequenced_checker_);
uint8_t last_fraction_loss_ GUARDED_BY(&sequenced_checker_);
int64_t last_rtt_ GUARDED_BY(&sequenced_checker_);
- int64_t last_probing_interval_ms_ GUARDED_BY(&sequenced_checker_);
+ int64_t last_bwe_period_ms_ GUARDED_BY(&sequenced_checker_);
// Number of mute events based on too low BWE, not network up/down.
int num_pause_events_ GUARDED_BY(&sequenced_checker_);
Clock* const clock_ GUARDED_BY(&sequenced_checker_);
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc
index e645090..d903cf9 100644
--- a/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -136,18 +136,18 @@
}
int AimdRateControl::GetExpectedBandwidthPeriodMs() const {
- constexpr int kMinIntervalMs = 2000;
- constexpr int kDefaultIntervalMs = 3000;
- constexpr int kMaxIntervalMs = 50000;
+ constexpr int kMinPeriodMs = 2000;
+ constexpr int kDefaultPeriodMs = 3000;
+ constexpr int kMaxPeriodMs = 50000;
int increase_rate = GetNearMaxIncreaseRateBps();
if (!last_decrease_)
- return kDefaultIntervalMs;
+ return kDefaultPeriodMs;
- return std::min(kMaxIntervalMs,
+ return std::min(kMaxPeriodMs,
std::max<int>(1000 * static_cast<int64_t>(*last_decrease_) /
increase_rate,
- kMinIntervalMs));
+ kMinPeriodMs));
}
uint32_t AimdRateControl::ChangeBitrate(uint32_t new_bitrate_bps,
diff --git a/test/fuzzers/congestion_controller_feedback_fuzzer.cc b/test/fuzzers/congestion_controller_feedback_fuzzer.cc
index de78a85..008d7a5 100644
--- a/test/fuzzers/congestion_controller_feedback_fuzzer.cc
+++ b/test/fuzzers/congestion_controller_feedback_fuzzer.cc
@@ -27,7 +27,7 @@
void OnNetworkChanged(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt_ms,
- int64_t probing_interval_ms) override {}
+ int64_t bwe_period_ms) override {}
void OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs,
uint32_t bitrate) override {}
};