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

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

Issue 2415543002: Set min BWE bitrate form 10kbps to 5kbps and centralize minimum bitrate. (Closed)
Patch Set: Fixed unittest 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/congestion_controller.cc
diff --git a/webrtc/modules/congestion_controller/congestion_controller.cc b/webrtc/modules/congestion_controller/congestion_controller.cc
index f7e7e5625a2984500bbb8a8231935181c3f42dc5..3db96d7500c6c625a43818768e2d149cb3bacac2 100644
--- a/webrtc/modules/congestion_controller/congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller.cc
@@ -22,6 +22,7 @@
#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/congestion_controller/probe_controller.h"
+#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h"
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
@@ -42,9 +43,8 @@ static void ClampBitrates(int* bitrate_bps,
// TODO(holmer): We should make sure the default bitrates are set to 10 kbps,
// and that we don't try to set the min bitrate to 0 from any applications.
// The congestion controller should allow a min bitrate of 0.
- const int kMinBitrateBps = 10000;
- if (*min_bitrate_bps < kMinBitrateBps)
- *min_bitrate_bps = kMinBitrateBps;
+ if (*min_bitrate_bps < remote_bitrate_estimator_defines::kMinBitrateBps)
+ *min_bitrate_bps = remote_bitrate_estimator_defines::kMinBitrateBps;
if (*max_bitrate_bps > 0)
*max_bitrate_bps = std::max(*min_bitrate_bps, *max_bitrate_bps);
if (*bitrate_bps > 0)
@@ -60,7 +60,7 @@ class WrappingBitrateEstimator : public RemoteBitrateEstimator {
rbe_(new RemoteBitrateEstimatorSingleStream(observer_, clock_)),
using_absolute_send_time_(false),
packets_since_absolute_send_time_(0),
- min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) {}
+ min_bitrate_bps_(remote_bitrate_estimator_defines::kMinBitrateBps) {}
virtual ~WrappingBitrateEstimator() {}
@@ -171,7 +171,7 @@ CongestionController::CongestionController(
new RateLimiter(clock, kRetransmitWindowSizeMs)),
remote_estimator_proxy_(clock_, packet_router_.get()),
transport_feedback_adapter_(clock_, bitrate_controller_.get()),
- min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
+ min_bitrate_bps_(remote_bitrate_estimator_defines::kMinBitrateBps),
max_bitrate_bps_(0),
last_reported_bitrate_bps_(0),
last_reported_fraction_loss_(0),
@@ -202,7 +202,7 @@ CongestionController::CongestionController(
new RateLimiter(clock, kRetransmitWindowSizeMs)),
remote_estimator_proxy_(clock_, packet_router_.get()),
transport_feedback_adapter_(clock_, bitrate_controller_.get()),
- min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
+ min_bitrate_bps_(remote_bitrate_estimator_defines::kMinBitrateBps),
max_bitrate_bps_(0),
last_reported_bitrate_bps_(0),
last_reported_fraction_loss_(0),

Powered by Google App Engine
This is Rietveld 408576698