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

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

Issue 2352093002: ProbeController: Limit max probing bitrate (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/probe_controller.cc
diff --git a/webrtc/modules/congestion_controller/probe_controller.cc b/webrtc/modules/congestion_controller/probe_controller.cc
index e91e06efd555c9f8a0e9e852ad4979ee9088e1cc..2e253f1a1396d481d2f1db0dd45df9941ababc01 100644
--- a/webrtc/modules/congestion_controller/probe_controller.cc
+++ b/webrtc/modules/congestion_controller/probe_controller.cc
@@ -10,6 +10,7 @@
#include "webrtc/modules/congestion_controller/probe_controller.h"
+#include <algorithm>
#include <initializer_list>
#include "webrtc/base/logging.h"
@@ -31,6 +32,9 @@ constexpr int64_t kMaxWaitingTimeForProbingResultMs = 1000;
// further probing is disabled.
constexpr int kExponentialProbingDisabled = 0;
+// A limit to prevent probing at excessive bitrates.
+constexpr int kMaxProbingBitrateBps = 10000000;
+
} // namespace
ProbeController::ProbeController(PacedSender* pacer, Clock* clock)
@@ -97,6 +101,7 @@ void ProbeController::InitiateProbing(
int min_bitrate_to_probe_further_bps) {
bool first_cluster = true;
for (int bitrate : bitrates_to_probe) {
+ bitrate = std::min(bitrate, kMaxProbingBitrateBps);
if (first_cluster) {
pacer_->CreateProbeCluster(bitrate, kProbeDeltasPerCluster + 1);
first_cluster = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698