Chromium Code Reviews| 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 354ccaaaa58e67052d79c9b34992c62fe6610fef..befee283ac9ffef58b7ce1ad45c7b139281683c8 100644 |
| --- a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc |
| +++ b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc |
| @@ -16,9 +16,11 @@ |
| #include "webrtc/base/checks.h" |
| #include "webrtc/base/logging.h" |
| +#include "webrtc/base/ptr_util.h" |
| #include "webrtc/base/rate_limiter.h" |
| #include "webrtc/base/socket.h" |
| #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| +#include "webrtc/modules/congestion_controller/incoming_bitrate_estimator.h" |
| #include "webrtc/modules/congestion_controller/probe_controller.h" |
| #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" |
| @@ -67,6 +69,7 @@ SendSideCongestionController::SendSideCongestionController( |
| pacer_(std::move(pacer)), |
| bitrate_controller_( |
| BitrateController::CreateBitrateController(clock_, event_log)), |
| + incoming_bitrate_estimator_(rtc::MakeUnique<IncomingBitrateEstimator>()), |
| probe_controller_(new ProbeController(pacer_.get(), clock_)), |
| retransmission_rate_limiter_( |
| new RateLimiter(clock, kRetransmitWindowSizeMs)), |
| @@ -76,7 +79,9 @@ 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_, |
| + incoming_bitrate_estimator_.get(), |
| + clock_)) { |
| delay_based_bwe_->SetMinBitrate(min_bitrate_bps_); |
| worker_thread_checker_.DetachFromThread(); |
| } |
| @@ -144,7 +149,8 @@ void SendSideCongestionController::OnNetworkRouteChanged( |
| { |
| rtc::CritScope cs(&bwe_lock_); |
| min_bitrate_bps_ = min_bitrate_bps; |
| - delay_based_bwe_.reset(new DelayBasedBwe(event_log_, clock_)); |
| + delay_based_bwe_.reset(new DelayBasedBwe( |
| + event_log_, incoming_bitrate_estimator_.get(), clock_)); |
|
terelius
2017/06/01 15:15:04
Could we pass the actual bitrate estimate to the d
tschumi
2017/06/02 11:48:44
Changed according offline discussions.
|
| delay_based_bwe_->SetStartBitrate(bitrate_bps); |
| delay_based_bwe_->SetMinBitrate(min_bitrate_bps); |
| } |