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

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

Issue 2970653004: Reimplemeted "Test and fix for huge bwe drop after alr state" (Closed)
Patch Set: Response to comments Created 3 years, 5 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/send_side_congestion_controller.cc
diff --git a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
index 60e692ccdfe46c4ea3e04b110a31448af0da7ea0..e2b14b75015886ac399739cb4cc14213d03275c6 100644
--- a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
@@ -15,16 +15,19 @@
#include <vector>
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
-#include "webrtc/modules/congestion_controller/acknowledge_bitrate_estimator.h"
+#include "webrtc/modules/congestion_controller/acknowledged_bitrate_estimator.h"
#include "webrtc/modules/congestion_controller/probe_controller.h"
+#include "webrtc/modules/pacing/alr_detector.h"
#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "webrtc/rtc_base/checks.h"
#include "webrtc/rtc_base/logging.h"
#include "webrtc/rtc_base/ptr_util.h"
#include "webrtc/rtc_base/rate_limiter.h"
#include "webrtc/rtc_base/socket.h"
+#include "webrtc/rtc_base/timeutils.h"
namespace webrtc {
+
namespace {
static const int64_t kRetransmitWindowSizeMs = 500;
@@ -99,7 +102,8 @@ SendSideCongestionController::SendSideCongestionController(
last_reported_rtt_(0),
network_state_(kNetworkUp),
min_bitrate_bps_(congestion_controller::GetMinBitrateBps()),
- delay_based_bwe_(new DelayBasedBwe(event_log_, clock_)) {
+ delay_based_bwe_(new DelayBasedBwe(event_log_, clock_)),
+ alr_state_(rtc::MakeUnique<AlrState>()) {
delay_based_bwe_->SetMinBitrate(min_bitrate_bps_);
}
@@ -277,6 +281,12 @@ void SendSideCongestionController::OnTransportFeedback(
std::vector<PacketFeedback> feedback_vector = ReceivedPacketFeedbackVector(
transport_feedback_adapter_.GetTransportFeedbackVector());
SortPacketFeedbackVector(&feedback_vector);
+ if (alr_state_->ChangeWhenAlrStartTimeIs(
terelius 2017/07/13 10:46:01 I don't like this name. Is is unclear whether you
tschumi 2017/07/13 11:54:35 Done.
+ pacer_->GetApplicationLimitedRegionStartTime()) ==
+ AlrState::Change::kEnded) {
+ acknowledged_bitrate_estimator_->SetAlrEndedTimeMs(rtc::TimeMillis());
+ }
+
acknowledged_bitrate_estimator_->IncomingPacketFeedbackVector(
feedback_vector);
DelayBasedBwe::Result result;

Powered by Google App Engine
This is Rietveld 408576698