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

Unified Diff: webrtc/base/ratetracker.cc

Issue 2381833003: Change TWCC send interval to reduce overhead on low BW situations. (Closed)
Patch Set: Rebased 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/base/ratetracker.cc
diff --git a/webrtc/base/ratetracker.cc b/webrtc/base/ratetracker.cc
index a59ec2fc3f419c4fd0d33fa4234eba6ef36e940e..d8ff7c4975cd74dc451d134381ef72a5e49c9003 100644
--- a/webrtc/base/ratetracker.cc
+++ b/webrtc/base/ratetracker.cc
@@ -93,6 +93,11 @@ double RateTracker::ComputeRateForInterval(
static_cast<double>(available_interval_milliseconds);
}
+double RateTracker::ComputeRate() const {
+ return ComputeRateForInterval(bucket_milliseconds_ *
+ static_cast<int64_t>(bucket_count_));
+}
+
double RateTracker::ComputeTotalRate() const {
if (bucket_start_time_milliseconds_ == kTimeUnset) {
return 0.0;

Powered by Google App Engine
This is Rietveld 408576698