我们前面说了Call中有两个跟线程有关的成员module_process_thread_和pacer_thread_,我们看在Call构造函数中,跟这两个成员相关的代码:
Call::Call()
{
//...
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();
}
结合前面的分析,我们推出,在module_process_thread_的线程中,会执行的任务为:
CallStats::Process();
CongestionController::Process();
在pacer_thread_线程中运行的任务为:
PacedSender::Process();
RemoteEstimatorProxy::Process();