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

Unified Diff: webrtc/modules/bitrate_controller/bitrate_controller_impl.cc

Issue 2111813002: Revert of Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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/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) {

Powered by Google App Engine
This is Rietveld 408576698