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

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: Respond 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..5328161e084896a89136f4d69e45bfd559158808 100644
--- a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
@@ -15,14 +15,16 @@
#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 {
@@ -99,7 +101,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_)),
+ was_in_alr_(0) {
delay_based_bwe_->SetMinBitrate(min_bitrate_bps_);
}
@@ -277,6 +280,14 @@ void SendSideCongestionController::OnTransportFeedback(
std::vector<PacketFeedback> feedback_vector = ReceivedPacketFeedbackVector(
transport_feedback_adapter_.GetTransportFeedbackVector());
SortPacketFeedbackVector(&feedback_vector);
+
+ bool currently_in_alr =
+ pacer_->GetApplicationLimitedRegionStartTime().has_value();
+ if (!currently_in_alr && was_in_alr_) {
+ acknowledged_bitrate_estimator_->SetAlrEndedTimeMs(rtc::TimeMillis());
+ }
+ was_in_alr_ = currently_in_alr;
+
acknowledged_bitrate_estimator_->IncomingPacketFeedbackVector(
feedback_vector);
DelayBasedBwe::Result result;
« no previous file with comments | « webrtc/modules/congestion_controller/include/send_side_congestion_controller.h ('k') | webrtc/modules/pacing/alr_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698