Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: webrtc/modules/congestion_controller/delay_based_bwe.cc

Issue 2407143002: Remove GetFeedbackInterval in sender side BWE. (Closed)
Patch Set: Adapt unittest to the change. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/congestion_controller/delay_based_bwe.cc
diff --git a/webrtc/modules/congestion_controller/delay_based_bwe.cc b/webrtc/modules/congestion_controller/delay_based_bwe.cc
index 34b8242ed760dcc96e52bb7d870a926c0d472885..4cdd346ed83ed8a592e66989814553ec69483853 100644
--- a/webrtc/modules/congestion_controller/delay_based_bwe.cc
+++ b/webrtc/modules/congestion_controller/delay_based_bwe.cc
@@ -35,6 +35,7 @@ constexpr double kTimestampToMs =
// This ssrc is used to fulfill the current API but will be removed
// after the API has been changed.
constexpr uint32_t kFixedSsrc = 0;
+constexpr int64_t kDefaultRttMs = 200;
} // namespace
namespace webrtc {
@@ -47,7 +48,8 @@ DelayBasedBwe::DelayBasedBwe(Clock* clock)
incoming_bitrate_(kBitrateWindowMs, 8000),
last_update_ms_(-1),
last_seen_packet_ms_(-1),
- uma_recorded_(false) {
+ uma_recorded_(false),
+ rtt_ms_(kDefaultRttMs) {
network_thread_.DetachFromThread();
}
@@ -132,8 +134,7 @@ DelayBasedBwe::Result DelayBasedBwe::IncomingPacketInfo(
rtc::Optional<uint32_t> incoming_rate =
incoming_bitrate_.Rate(info.arrival_time_ms);
if (!result.updated &&
- (last_update_ms_ == -1 ||
- now_ms - last_update_ms_ > remote_rate_.GetFeedbackInterval())) {
+ (last_update_ms_ == -1 || now_ms - last_update_ms_ > rtt_ms_)) {
stefan-webrtc 2016/10/17 18:59:49 Do you think there's a true value having this chec
result.updated = UpdateEstimate(info.arrival_time_ms, now_ms,
&result.target_bitrate_bps);
}
@@ -158,6 +159,7 @@ bool DelayBasedBwe::UpdateEstimate(int64_t arrival_time_ms,
}
void DelayBasedBwe::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
+ rtt_ms_ = avg_rtt_ms;
remote_rate_.SetRtt(avg_rtt_ms);
}

Powered by Google App Engine
This is Rietveld 408576698