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

Unified Diff: webrtc/call/call.cc

Issue 2637783003: Move congestion controller processing to the pacer thread. (Closed)
Patch Set: Reorder calls in CongestionController::Process. Created 3 years, 11 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 | « no previous file | webrtc/modules/congestion_controller/congestion_controller.cc » ('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 c7998b2cd8a79026aa532a3a3d91265c8bbd3956..31ed39b874cdbb248e036f9861c9957c40c55a38 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -173,7 +173,7 @@ class Call : public webrtc::Call,
const int num_cpu_cores_;
const std::unique_ptr<ProcessThread> module_process_thread_;
- const std::unique_ptr<ProcessThread> pacer_thread_;
+ const std::unique_ptr<ProcessThread> congestion_controller_thread_;
const std::unique_ptr<CallStats> call_stats_;
const std::unique_ptr<BitrateAllocator> bitrate_allocator_;
Call::Config config_;
@@ -277,7 +277,8 @@ Call::Call(const Call::Config& config)
: clock_(Clock::GetRealTimeClock()),
num_cpu_cores_(CpuInfo::DetectNumberOfCores()),
module_process_thread_(ProcessThread::Create("ModuleProcessThread")),
- pacer_thread_(ProcessThread::Create("PacerThread")),
+ congestion_controller_thread_(
+ ProcessThread::Create("CongestionControllerThread")),
call_stats_(new CallStats(clock_)),
bitrate_allocator_(new BitrateAllocator(this)),
config_(config),
@@ -324,11 +325,8 @@ Call::Call(const Call::Config& config)
module_process_thread_->Start();
module_process_thread_->RegisterModule(call_stats_.get());
- module_process_thread_->RegisterModule(congestion_controller_.get());
- pacer_thread_->RegisterModule(congestion_controller_->pacer());
- pacer_thread_->RegisterModule(
- congestion_controller_->GetRemoteBitrateEstimator(true));
- pacer_thread_->Start();
+ congestion_controller_thread_->RegisterModule(congestion_controller_.get());
+ congestion_controller_thread_->Start();
}
Call::~Call() {
@@ -342,11 +340,8 @@ Call::~Call() {
RTC_CHECK(video_receive_ssrcs_.empty());
RTC_CHECK(video_receive_streams_.empty());
- pacer_thread_->Stop();
- pacer_thread_->DeRegisterModule(congestion_controller_->pacer());
- pacer_thread_->DeRegisterModule(
- congestion_controller_->GetRemoteBitrateEstimator(true));
- module_process_thread_->DeRegisterModule(congestion_controller_.get());
+ congestion_controller_thread_->Stop();
+ congestion_controller_thread_->DeRegisterModule(congestion_controller_.get());
module_process_thread_->DeRegisterModule(call_stats_.get());
module_process_thread_->Stop();
call_stats_->DeregisterStatsObserver(congestion_controller_.get());
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/congestion_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698