Index: webrtc/modules/bitrate_controller/bitrate_controller_impl.cc |
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc |
index 8a2464d09c3d5124c8585f6b4996ba141ed12ffd..c99bd53218698d21982294238d4321bfec90bada 100644 |
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc |
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc |
@@ -79,25 +79,20 @@ |
BitrateController* BitrateController::CreateBitrateController( |
Clock* clock, |
- BitrateObserver* observer, |
- RtcEventLog* event_log) { |
- return new BitrateControllerImpl(clock, observer, event_log); |
-} |
- |
-BitrateController* BitrateController::CreateBitrateController( |
- Clock* clock, |
- RtcEventLog* event_log) { |
- return CreateBitrateController(clock, nullptr, event_log); |
+ BitrateObserver* observer) { |
+ return new BitrateControllerImpl(clock, observer); |
+} |
+ |
+BitrateController* BitrateController::CreateBitrateController(Clock* clock) { |
+ return new BitrateControllerImpl(clock, nullptr); |
} |
BitrateControllerImpl::BitrateControllerImpl(Clock* clock, |
- BitrateObserver* observer, |
- RtcEventLog* event_log) |
+ BitrateObserver* observer) |
: clock_(clock), |
observer_(observer), |
last_bitrate_update_ms_(clock_->TimeInMilliseconds()), |
- event_log_(event_log), |
- bandwidth_estimation_(event_log), |
+ bandwidth_estimation_(), |
reserved_bitrate_bps_(0), |
last_bitrate_bps_(0), |
last_fraction_loss_(0), |
@@ -148,7 +143,7 @@ |
int max_bitrate_bps) { |
{ |
rtc::CritScope cs(&critsect_); |
- bandwidth_estimation_ = SendSideBandwidthEstimation(event_log_); |
+ bandwidth_estimation_ = SendSideBandwidthEstimation(); |
bandwidth_estimation_.SetBitrates(bitrate_bps, min_bitrate_bps, |
max_bitrate_bps); |
} |
@@ -161,6 +156,11 @@ |
reserved_bitrate_bps_ = reserved_bitrate_bps; |
} |
MaybeTriggerOnNetworkChanged(); |
+} |
+ |
+void BitrateControllerImpl::SetEventLog(RtcEventLog* event_log) { |
+ rtc::CritScope cs(&critsect_); |
+ bandwidth_estimation_.SetEventLog(event_log); |
} |
void BitrateControllerImpl::OnReceivedEstimatedBitrate(uint32_t bitrate) { |