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

Unified Diff: webrtc/call/call.cc

Issue 1704983002: Simplify CongestionController. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 4 years, 10 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
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/call/congestion_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index 78372a3532a4ee18ff05b84b597c71b744a2c5b8..f7cdd827a2f71b40d15150d079d5c7291413fcc0 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -199,12 +199,7 @@ Call::Call(const Call::Config& config)
pacer_bitrate_sum_kbits_(0),
num_bitrate_updates_(0),
remb_(clock_),
- congestion_controller_(
- new CongestionController(clock_,
- module_process_thread_.get(),
- call_stats_.get(),
- this,
- &remb_)) {
+ congestion_controller_(new CongestionController(clock_, this, &remb_)) {
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
@@ -221,6 +216,8 @@ Call::Call(const Call::Config& config)
Trace::CreateTrace();
module_process_thread_->Start();
module_process_thread_->RegisterModule(call_stats_.get());
+ module_process_thread_->RegisterModule(congestion_controller_.get());
+ call_stats_->RegisterStatsObserver(congestion_controller_.get());
congestion_controller_->SetBweBitrates(
config_.bitrate_config.min_bitrate_bps,
@@ -242,6 +239,8 @@ Call::~Call() {
RTC_CHECK(video_receive_ssrcs_.empty());
RTC_CHECK(video_receive_streams_.empty());
+ call_stats_->DeregisterStatsObserver(congestion_controller_.get());
+ module_process_thread_->DeRegisterModule(congestion_controller_.get());
module_process_thread_->DeRegisterModule(call_stats_.get());
module_process_thread_->Stop();
Trace::ReturnTrace();
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/call/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698