Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 7e26723

Browse files
taste1981jianjunz
authored andcommitted
Fix issue with BWE value proposition (#81)
1 parent 7253b9f commit 7e26723

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation(
247247
if (LossBasedBandwidthEstimatorV2Enabled()) {
248248
loss_based_bandwidth_estimator_v2_.SetMinBitrate(min_bitrate_configured_);
249249
}
250+
is_low_latency_mode_ = field_trial::IsEnabled("OWT-LowLatencyMode");
250251
}
251252

252253
SendSideBandwidthEstimation::~SendSideBandwidthEstimation() {}
@@ -462,6 +463,9 @@ void SendSideBandwidthEstimation::UpdateRtt(TimeDelta rtt, Timestamp at_time) {
462463

463464
void SendSideBandwidthEstimation::UpdateEstimate(Timestamp at_time) {
464465
if (rtt_backoff_.CorrectedRtt(at_time) > rtt_backoff_.rtt_limit_) {
466+
// If last decrease happens before 1 second, and current target is larger than
467+
// 5kbps, and we decided an RTT backoff is neccessary, we drop current target by
468+
// 0.8 and use that as estimation result.
465469
if (at_time - time_last_decrease_ >= rtt_backoff_.drop_interval_ &&
466470
current_target_ > rtt_backoff_.bandwidth_floor_) {
467471
time_last_decrease_ = at_time;
@@ -663,7 +667,10 @@ void SendSideBandwidthEstimation::MaybeLogLossBasedEvent(Timestamp at_time) {
663667

664668
void SendSideBandwidthEstimation::UpdateTargetBitrate(DataRate new_bitrate,
665669
Timestamp at_time) {
666-
new_bitrate = std::min(new_bitrate, GetUpperLimit());
670+
if (is_low_latency_mode_)
671+
new_bitrate = GetUpperLimit();
672+
else
673+
new_bitrate = std::min(new_bitrate, GetUpperLimit());
667674
if (new_bitrate < min_bitrate_configured_) {
668675
MaybeLogLowBitrateWarning(new_bitrate, at_time);
669676
new_bitrate = min_bitrate_configured_;

modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ class SendSideBandwidthEstimation {
202202
LossBasedBandwidthEstimation loss_based_bandwidth_estimator_v1_;
203203
LossBasedBweV2 loss_based_bandwidth_estimator_v2_;
204204
FieldTrialFlag disable_receiver_limit_caps_only_;
205+
bool is_low_latency_mode_;
205206
};
206207
} // namespace webrtc
207208
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_SEND_SIDE_BANDWIDTH_ESTIMATION_H_

0 commit comments

Comments
 (0)