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

Unified Diff: webrtc/modules/congestion_controller/probe_bitrate_estimator.h

Issue 2254733005: Only use payload size within the receive/send interval for bitrate probing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Keep track of unique send times. Created 4 years, 4 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/probe_bitrate_estimator.h
diff --git a/webrtc/modules/congestion_controller/probe_bitrate_estimator.h b/webrtc/modules/congestion_controller/probe_bitrate_estimator.h
index 7f0c4569c97f039976e822d94887987d66e8e994..6c04020b4310db5c31603cf7e7aa34f1f8ac460d 100644
--- a/webrtc/modules/congestion_controller/probe_bitrate_estimator.h
+++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator.h
@@ -11,8 +11,9 @@
#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_
#define WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_
-#include <map>
#include <limits>
+#include <map>
+#include <set>
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@@ -40,7 +41,11 @@ class ProbeBitrateEstimator {
private:
struct AggregatedCluster {
- int num_probes = 0;
+ // Since sending padding can result in multiple packets being sent (all
danilchap 2016/08/19 14:08:31 same send time is common, but not guaranteed (it i
+ // with the same send time), we keep track of how many unique send times
+ // we have seen to make sure we don't count the same request to send padding
+ // as separate packets in the probing cluster.
+ std::set<int64_t> send_times_ms;
int64_t first_send_ms = std::numeric_limits<int64_t>::max();
int64_t last_send_ms = 0;
int64_t first_receive_ms = std::numeric_limits<int64_t>::max();

Powered by Google App Engine
This is Rietveld 408576698