Renaming probing_interval to bwe_period globally.
This is a follow up of https://codereview.webrtc.org/2888893002/.
Bug: None
Change-Id: Ia76903858c0a6f2801f14878980e18ae6d3b85e6
Reviewed-on: https://chromium-review.googlesource.com/646020
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Minyue Li (BackIn2018March) <minyue@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#19644}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: bf94fda1e4b3bff094906d8c581c62d221fc0a5e
diff --git a/modules/audio_coding/codecs/cng/audio_encoder_cng.cc b/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
index 993fffe..52661d3 100644
--- a/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
+++ b/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
@@ -198,9 +198,9 @@
void AudioEncoderCng::OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) {
+ rtc::Optional<int64_t> bwe_period_ms) {
speech_encoder_->OnReceivedUplinkBandwidth(target_audio_bitrate_bps,
- probing_interval_ms);
+ bwe_period_ms);
}
AudioEncoder::EncodedInfo AudioEncoderCng::EncodePassive(
diff --git a/modules/audio_coding/codecs/cng/audio_encoder_cng.h b/modules/audio_coding/codecs/cng/audio_encoder_cng.h
index 563e997..66305e6 100644
--- a/modules/audio_coding/codecs/cng/audio_encoder_cng.h
+++ b/modules/audio_coding/codecs/cng/audio_encoder_cng.h
@@ -69,7 +69,7 @@
float uplink_recoverable_packet_loss_fraction) override;
void OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) override;
+ rtc::Optional<int64_t> bwe_period_ms) override;
private:
EncodedInfo EncodePassive(size_t frames_to_encode,
diff --git a/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
index 5756e2a..cd47bf4 100644
--- a/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
+++ b/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
@@ -514,22 +514,22 @@
void AudioEncoderOpus::OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) {
+ rtc::Optional<int64_t> bwe_period_ms) {
if (audio_network_adaptor_) {
audio_network_adaptor_->SetTargetAudioBitrate(target_audio_bitrate_bps);
// We give smoothed bitrate allocation to audio network adaptor as
// the uplink bandwidth.
- // The probing spikes should not affect the bitrate smoother more than 25%.
+ // The BWE spikes should not affect the bitrate smoother more than 25%.
// To simplify the calculations we use a step response as input signal.
// The step response of an exponential filter is
// u(t) = 1 - e^(-t / time_constant).
// In order to limit the affect of a BWE spike within 25% of its value
// before
- // the next probing, we would choose a time constant that fulfills
- // 1 - e^(-probing_interval_ms / time_constant) < 0.25
- // Then 4 * probing_interval_ms is a good choice.
- if (probing_interval_ms)
- bitrate_smoother_->SetTimeConstantMs(*probing_interval_ms * 4);
+ // the next BWE update, we would choose a time constant that fulfills
+ // 1 - e^(-bwe_period_ms / time_constant) < 0.25
+ // Then 4 * bwe_period_ms is a good choice.
+ if (bwe_period_ms)
+ bitrate_smoother_->SetTimeConstantMs(*bwe_period_ms * 4);
bitrate_smoother_->AddSample(target_audio_bitrate_bps);
ApplyAudioNetworkAdaptor();
diff --git a/modules/audio_coding/codecs/opus/audio_encoder_opus.h b/modules/audio_coding/codecs/opus/audio_encoder_opus.h
index 2382700..f78cf1e 100644
--- a/modules/audio_coding/codecs/opus/audio_encoder_opus.h
+++ b/modules/audio_coding/codecs/opus/audio_encoder_opus.h
@@ -111,7 +111,7 @@
float uplink_recoverable_packet_loss_fraction) override;
void OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) override;
+ rtc::Optional<int64_t> bwe_period_ms) override;
void OnReceivedRtt(int rtt_ms) override;
void OnReceivedOverhead(size_t overhead_bytes_per_packet) override;
void SetReceiverFrameLengthRange(int min_frame_length_ms,
diff --git a/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc b/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
index 0ce7d34..3680ff0 100644
--- a/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
+++ b/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
@@ -134,9 +134,9 @@
void AudioEncoderCopyRed::OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) {
+ rtc::Optional<int64_t> bwe_period_ms) {
speech_encoder_->OnReceivedUplinkBandwidth(target_audio_bitrate_bps,
- probing_interval_ms);
+ bwe_period_ms);
}
} // namespace webrtc
diff --git a/modules/audio_coding/codecs/red/audio_encoder_copy_red.h b/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
index 4261c47..664c13e 100644
--- a/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
+++ b/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
@@ -57,7 +57,7 @@
float uplink_recoverable_packet_loss_fraction) override;
void OnReceivedUplinkBandwidth(
int target_audio_bitrate_bps,
- rtc::Optional<int64_t> probing_interval_ms) override;
+ rtc::Optional<int64_t> bwe_period_ms) override;
protected:
EncodedInfo EncodeImpl(uint32_t rtp_timestamp,