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 d1ab03af0f8fe92d54749fc5046dcc2c47362f38..7582258185e4ab4b70c87720a9bc3ef702716afa 100644 |
--- a/webrtc/modules/congestion_controller/congestion_controller.cc |
+++ b/webrtc/modules/congestion_controller/congestion_controller.cc |
@@ -17,7 +17,6 @@ |
#include "webrtc/base/checks.h" |
#include "webrtc/base/constructormagic.h" |
#include "webrtc/base/logging.h" |
-#include "webrtc/base/rate_limiter.h" |
#include "webrtc/base/socket.h" |
#include "webrtc/base/thread_annotations.h" |
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
@@ -33,8 +32,6 @@ |
namespace { |
static const uint32_t kTimeOffsetSwitchThreshold = 30; |
-static const int64_t kMinRetransmitWindowSizeMs = 30; |
-static const int64_t kMaxRetransmitWindowSizeMs = 1000; |
// Makes sure that the bitrate and the min, max values are in valid range. |
static void ClampBitrates(int* bitrate_bps, |
@@ -167,8 +164,6 @@ |
new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), |
bitrate_controller_( |
BitrateController::CreateBitrateController(clock_, event_log)), |
- retransmission_rate_limiter_( |
- new RateLimiter(clock, kMaxRetransmitWindowSizeMs)), |
remote_estimator_proxy_(clock_, packet_router_.get()), |
transport_feedback_adapter_(bitrate_controller_.get(), clock_), |
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps), |
@@ -196,8 +191,6 @@ |
// construction. |
bitrate_controller_( |
BitrateController::CreateBitrateController(clock_, event_log)), |
- retransmission_rate_limiter_( |
- new RateLimiter(clock, kMaxRetransmitWindowSizeMs)), |
remote_estimator_proxy_(clock_, packet_router_.get()), |
transport_feedback_adapter_(bitrate_controller_.get(), clock_), |
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps), |
@@ -273,10 +266,6 @@ |
return &transport_feedback_adapter_; |
} |
-RateLimiter* CongestionController::GetRetransmissionRateLimiter() { |
- return retransmission_rate_limiter_.get(); |
-} |
- |
void CongestionController::SetAllocatedSendBitrateLimits( |
int min_send_bitrate_bps, |
int max_padding_bitrate_bps) { |
@@ -310,14 +299,6 @@ |
void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
- |
- int64_t nack_window_size_ms = max_rtt_ms; |
- if (nack_window_size_ms > kMaxRetransmitWindowSizeMs) { |
- nack_window_size_ms = kMaxRetransmitWindowSizeMs; |
- } else if (nack_window_size_ms < kMinRetransmitWindowSizeMs) { |
- nack_window_size_ms = kMinRetransmitWindowSizeMs; |
- } |
- retransmission_rate_limiter_->SetWindowSize(nack_window_size_ms); |
} |
int64_t CongestionController::TimeUntilNextProcess() { |
@@ -342,10 +323,8 @@ |
int64_t rtt; |
bool estimate_changed = bitrate_controller_->GetNetworkParameters( |
&bitrate_bps, &fraction_loss, &rtt); |
- if (estimate_changed) { |
+ if (estimate_changed) |
pacer_->SetEstimatedBitrate(bitrate_bps); |
- retransmission_rate_limiter_->SetMaxRate(bitrate_bps); |
- } |
bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; |