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

Unified Diff: webrtc/call/call.cc

Issue 1732863002: Break out pacer thread from CongestionController to increase testability. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . 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 | « 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 d538761f7b8bef818ead4c5b51e42a62ccad606e..f584a4af14d2a987ec647179f2af73ad15cf35cb 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -121,6 +121,7 @@ class Call : public webrtc::Call, public PacketReceiver,
const int num_cpu_cores_;
const rtc::scoped_ptr<ProcessThread> module_process_thread_;
+ const rtc::scoped_ptr<ProcessThread> pacer_thread_;
const rtc::scoped_ptr<CallStats> call_stats_;
const rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_;
Call::Config config_;
@@ -183,6 +184,7 @@ 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")),
call_stats_(new CallStats(clock_)),
bitrate_allocator_(new BitrateAllocator()),
config_(config),
@@ -217,6 +219,10 @@ 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();
pbos-webrtc 2016/02/24 14:52:13 Move to end of block so the controller settings ar
call_stats_->RegisterStatsObserver(congestion_controller_.get());
congestion_controller_->SetBweBitrates(
@@ -240,6 +246,10 @@ Call::~Call() {
RTC_CHECK(video_receive_streams_.empty());
call_stats_->DeregisterStatsObserver(congestion_controller_.get());
+ pacer_thread_->Stop();
+ pacer_thread_->DeRegisterModule(congestion_controller_->pacer());
+ pacer_thread_->DeRegisterModule(
+ congestion_controller_->GetRemoteBitrateEstimator(true));
module_process_thread_->DeRegisterModule(congestion_controller_.get());
module_process_thread_->DeRegisterModule(call_stats_.get());
module_process_thread_->Stop();
« 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