diff options
author | Markus Handell <handellm@webrtc.org> | 2021-07-20 13:32:02 +0200 |
---|---|---|
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-07-22 12:11:13 +0000 |
commit | 0e62f7aa98c2668fd19175bbbb1009e4a5c1e8e5 (patch) | |
tree | dba6c2c027bf38080462f0a8f960825b3dbedc4c /call/call.cc | |
parent | 41e98bab1e587071383a3a521162fe473851b7a1 (diff) | |
download | webrtc-0e62f7aa98c2668fd19175bbbb1009e4a5c1e8e5.tar.gz |
NackModule2: coalesce repeating tasks.
NackModule2 creates repeating tasks, but as there are
many modules (one per receiver) these tasks execute out
of phase with each other, multipliying the amount of wakeups
caused.
Fix this by creating a single wakeup source that serves all
NackModule2 instances in a call.
Bug: webrtc:12989
Change-Id: Ia9c84307eb57349679e42b673474feb2cb43f08e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226464
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34527}
Diffstat (limited to 'call/call.cc')
-rw-r--r-- | call/call.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/call/call.cc b/call/call.cc index fb1d7cd3bc..a0c33ff756 100644 --- a/call/call.cc +++ b/call/call.cc @@ -376,6 +376,9 @@ class Call final : public webrtc::Call, // network thread. bool aggregate_network_up_ RTC_GUARDED_BY(worker_thread_); + // Schedules nack periodic processing on behalf of all streams. + NackPeriodicProcessor nack_periodic_processor_; + // Audio, Video, and FlexFEC receive streams are owned by the client that // creates them. // TODO(bugs.webrtc.org/11993): Move audio_receive_streams_, @@ -1124,7 +1127,8 @@ webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( VideoReceiveStream2* receive_stream = new VideoReceiveStream2( task_queue_factory_, this, num_cpu_cores_, transport_send_->packet_router(), std::move(configuration), - call_stats_.get(), clock_, new VCMTiming(clock_)); + call_stats_.get(), clock_, new VCMTiming(clock_), + &nack_periodic_processor_); // TODO(bugs.webrtc.org/11993): Set this up asynchronously on the network // thread. receive_stream->RegisterWithTransport(&video_receiver_controller_); |