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-Commit-Position: refs/heads/master@{#19644}
This commit is contained in:
minyue-webrtc
2017-09-01 10:44:37 +02:00
committed by Commit Bot
parent 015444f853
commit bf94fda1e4
6 changed files with 14 additions and 14 deletions

View File

@ -514,22 +514,22 @@ void AudioEncoderOpus::OnReceivedUplinkRecoverablePacketLossFraction(
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();

View File

@ -111,7 +111,7 @@ class AudioEncoderOpus final : public AudioEncoder {
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,