Add task queue to RtpRtcpInterface::Configuration.

Let ModuleRtpRtcpImpl2 use the configured value instead of
TaskQueueBase::Current().

Intention is to allow construction of RtpRtcpImpl2 on any thread.
If a task queue is provided (required for periodic rtt updates), the
destruction of the object must be done on that same task queue.

Also, delete ModuleRtpRtcpImpl2::Create, callers updated to use std::make_unique.

Bug: None
Change-Id: I412b7b1e1ce24722ffd23d16aa6c48a7214c9bcd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/199968
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32949}
This commit is contained in:
Niels Möller
2021-01-11 14:46:11 +01:00
committed by Commit Bot
parent 833e04e734
commit f23e2144e8
18 changed files with 33 additions and 39 deletions

View File

@ -176,7 +176,7 @@ class RtpSenderVideoTest : public ::testing::TestWithParam<bool> {
: field_trials_(GetParam()),
fake_clock_(kStartTime),
retransmission_rate_limiter_(&fake_clock_, 1000),
rtp_module_(ModuleRtpRtcpImpl2::Create([&] {
rtp_module_(std::make_unique<ModuleRtpRtcpImpl2>([&] {
RtpRtcpInterface::Configuration config;
config.clock = &fake_clock_;
config.outgoing_transport = &transport_;
@ -1167,7 +1167,7 @@ class RtpSenderVideoWithFrameTransformerTest : public ::testing::Test {
RtpSenderVideoWithFrameTransformerTest()
: fake_clock_(kStartTime),
retransmission_rate_limiter_(&fake_clock_, 1000),
rtp_module_(ModuleRtpRtcpImpl2::Create([&] {
rtp_module_(std::make_unique<ModuleRtpRtcpImpl2>([&] {
RtpRtcpInterface::Configuration config;
config.clock = &fake_clock_;
config.outgoing_transport = &transport_;