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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Another rebase and accompanying changes. 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 c99bd53218698d21982294238d4321bfec90bada..8a2464d09c3d5124c8585f6b4996ba141ed12ffd 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
@@ -79,20 +79,25 @@ class BitrateControllerImpl::RtcpBandwidthObserverImpl
BitrateController* BitrateController::CreateBitrateController(
Clock* clock,
- BitrateObserver* observer) {
- return new BitrateControllerImpl(clock, observer);
+ BitrateObserver* observer,
+ RtcEventLog* event_log) {
+ return new BitrateControllerImpl(clock, observer, event_log);
}
-BitrateController* BitrateController::CreateBitrateController(Clock* clock) {
- return new BitrateControllerImpl(clock, nullptr);
+BitrateController* BitrateController::CreateBitrateController(
+ Clock* clock,
+ RtcEventLog* event_log) {
+ return CreateBitrateController(clock, nullptr, event_log);
}
BitrateControllerImpl::BitrateControllerImpl(Clock* clock,
- BitrateObserver* observer)
+ BitrateObserver* observer,
+ RtcEventLog* event_log)
: clock_(clock),
observer_(observer),
last_bitrate_update_ms_(clock_->TimeInMilliseconds()),
- bandwidth_estimation_(),
+ event_log_(event_log),
+ bandwidth_estimation_(event_log),
reserved_bitrate_bps_(0),
last_bitrate_bps_(0),
last_fraction_loss_(0),
@@ -143,7 +148,7 @@ void BitrateControllerImpl::ResetBitrates(int bitrate_bps,
int max_bitrate_bps) {
{
rtc::CritScope cs(&critsect_);
- bandwidth_estimation_ = SendSideBandwidthEstimation();
+ bandwidth_estimation_ = SendSideBandwidthEstimation(event_log_);
bandwidth_estimation_.SetBitrates(bitrate_bps, min_bitrate_bps,
max_bitrate_bps);
}
@@ -158,11 +163,6 @@ void BitrateControllerImpl::SetReservedBitrate(uint32_t 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) {
{
rtc::CritScope cs(&critsect_);

Powered by Google App Engine
This is Rietveld 408576698