From 401c14aaf65c51f2de6d67e7c3cd23d63f26ccbb Mon Sep 17 00:00:00 2001 From: Per K Date: Tue, 11 Apr 2023 09:53:48 +0200 Subject: [PATCH] [WebRTC-SendPacketsOnWorkerThread] Cleanup TaskQueuePacedSender MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This remove use of MaybeWorkerThread from TaskQueuePacedSender. Instead, the TaskQueue used when creating the TaskQueuePacedSender is used for pacing. That is, the "worker thread". Bug: webrtc:14502 Change-Id: I504f8e634653af6493e609db6e42b07d488fd699 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300820 Reviewed-by: Erik Språng Commit-Queue: Per Kjellander Cr-Commit-Position: refs/heads/main@{#39813} --- call/rtp_transport_controller_send.cc | 1 - modules/pacing/task_queue_paced_sender.cc | 120 +++++++----------- modules/pacing/task_queue_paced_sender.h | 11 +- .../task_queue_paced_sender_unittest.cc | 104 ++++++--------- 4 files changed, 91 insertions(+), 145 deletions(-) diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc index 2d871ceacd..1225e58462 100644 --- a/call/rtp_transport_controller_send.cc +++ b/call/rtp_transport_controller_send.cc @@ -81,7 +81,6 @@ RtpTransportControllerSend::RtpTransportControllerSend( pacer_(clock, &packet_router_, *config.trials, - config.task_queue_factory, TimeDelta::Millis(5), 3, config.pacer_burst_interval), diff --git a/modules/pacing/task_queue_paced_sender.cc b/modules/pacing/task_queue_paced_sender.cc index 2747760eff..b5dfdd466a 100644 --- a/modules/pacing/task_queue_paced_sender.cc +++ b/modules/pacing/task_queue_paced_sender.cc @@ -40,7 +40,6 @@ TaskQueuePacedSender::TaskQueuePacedSender( Clock* clock, PacingController::PacketSender* packet_sender, const FieldTrialsView& field_trials, - TaskQueueFactory* task_queue_factory, TimeDelta max_hold_back_window, int max_hold_back_window_in_packets, absl::optional burst_interval) @@ -54,7 +53,7 @@ TaskQueuePacedSender::TaskQueuePacedSender( is_shutdown_(false), packet_size_(/*alpha=*/0.95), include_overhead_(false), - task_queue_(field_trials, "TaskQueuePacedSender", task_queue_factory) { + task_queue_(TaskQueueBase::Current()) { RTC_DCHECK_GE(max_hold_back_window_, PacingController::kMinSleepTime); // There are multiple field trials that can affect burst. If multiple bursts // are specified we pick the largest of the values. @@ -70,70 +69,52 @@ TaskQueuePacedSender::TaskQueuePacedSender( } TaskQueuePacedSender::~TaskQueuePacedSender() { - // Post an immediate task to mark the queue as shutting down. - // The rtc::TaskQueue destructor will wait for pending tasks to - // complete before continuing. - task_queue_.RunOrPost([&]() { - RTC_DCHECK_RUN_ON(&task_queue_); - is_shutdown_ = true; - }); + RTC_DCHECK_RUN_ON(task_queue_); + is_shutdown_ = true; } void TaskQueuePacedSender::EnsureStarted() { - task_queue_.RunOrPost([this]() { - RTC_DCHECK_RUN_ON(&task_queue_); - is_started_ = true; - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + is_started_ = true; + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::CreateProbeClusters( std::vector probe_cluster_configs) { - task_queue_.RunOrPost( - [this, probe_cluster_configs = std::move(probe_cluster_configs)]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.CreateProbeClusters(probe_cluster_configs); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.CreateProbeClusters(probe_cluster_configs); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::Pause() { - task_queue_.RunOrPost([this]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.Pause(); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.Pause(); } void TaskQueuePacedSender::Resume() { - task_queue_.RunOrPost([this]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.Resume(); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.Resume(); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::SetCongested(bool congested) { - task_queue_.RunOrPost([this, congested]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.SetCongested(congested); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.SetCongested(congested); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::SetPacingRates(DataRate pacing_rate, DataRate padding_rate) { - task_queue_.RunOrPost([this, pacing_rate, padding_rate]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.SetPacingRates(pacing_rate, padding_rate); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.SetPacingRates(pacing_rate, padding_rate); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::EnqueuePackets( std::vector> packets) { - task_queue_.TaskQueueForPost()->PostTask(task_queue_.MaybeSafeTask( - safety_.flag(), [this, packets = std::move(packets)]() mutable { - RTC_DCHECK_RUN_ON(&task_queue_); + task_queue_->PostTask( + SafeTask(safety_.flag(), [this, packets = std::move(packets)]() mutable { + RTC_DCHECK_RUN_ON(task_queue_); TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("webrtc"), "TaskQueuePacedSender::EnqueuePackets"); for (auto& packet : packets) { @@ -155,45 +136,36 @@ void TaskQueuePacedSender::EnqueuePackets( } void TaskQueuePacedSender::RemovePacketsForSsrc(uint32_t ssrc) { - task_queue_.TaskQueueForPost()->PostTask( - task_queue_.MaybeSafeTask(safety_.flag(), [this, ssrc] { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.RemovePacketsForSsrc(ssrc); - MaybeProcessPackets(Timestamp::MinusInfinity()); - })); + task_queue_->PostTask(SafeTask(safety_.flag(), [this, ssrc] { + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.RemovePacketsForSsrc(ssrc); + MaybeProcessPackets(Timestamp::MinusInfinity()); + })); } void TaskQueuePacedSender::SetAccountForAudioPackets(bool account_for_audio) { - task_queue_.RunOrPost([this, account_for_audio]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.SetAccountForAudioPackets(account_for_audio); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.SetAccountForAudioPackets(account_for_audio); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::SetIncludeOverhead() { - task_queue_.RunOrPost([this]() { - RTC_DCHECK_RUN_ON(&task_queue_); - include_overhead_ = true; - pacing_controller_.SetIncludeOverhead(); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + include_overhead_ = true; + pacing_controller_.SetIncludeOverhead(); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::SetTransportOverhead(DataSize overhead_per_packet) { - task_queue_.RunOrPost([this, overhead_per_packet]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.SetTransportOverhead(overhead_per_packet); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.SetTransportOverhead(overhead_per_packet); + MaybeProcessPackets(Timestamp::MinusInfinity()); } void TaskQueuePacedSender::SetQueueTimeLimit(TimeDelta limit) { - task_queue_.RunOrPost([this, limit]() { - RTC_DCHECK_RUN_ON(&task_queue_); - pacing_controller_.SetQueueTimeLimit(limit); - MaybeProcessPackets(Timestamp::MinusInfinity()); - }); + RTC_DCHECK_RUN_ON(task_queue_); + pacing_controller_.SetQueueTimeLimit(limit); + MaybeProcessPackets(Timestamp::MinusInfinity()); } TimeDelta TaskQueuePacedSender::ExpectedQueueTime() const { @@ -224,13 +196,13 @@ TimeDelta TaskQueuePacedSender::OldestPacketWaitTime() const { } void TaskQueuePacedSender::OnStatsUpdated(const Stats& stats) { - MutexLock lock(&stats_mutex_); + RTC_DCHECK_RUN_ON(task_queue_); current_stats_ = stats; } void TaskQueuePacedSender::MaybeProcessPackets( Timestamp scheduled_process_time) { - RTC_DCHECK_RUN_ON(&task_queue_); + RTC_DCHECK_RUN_ON(task_queue_); TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("webrtc"), "TaskQueuePacedSender::MaybeProcessPackets"); @@ -294,8 +266,8 @@ void TaskQueuePacedSender::MaybeProcessPackets( if (next_process_time_.IsMinusInfinity() || next_process_time_ > next_send_time) { // Prefer low precision if allowed and not probing. - task_queue_.TaskQueueForDelayedTasks()->PostDelayedHighPrecisionTask( - task_queue_.MaybeSafeTask( + task_queue_->PostDelayedHighPrecisionTask( + SafeTask( safety_.flag(), [this, next_send_time]() { MaybeProcessPackets(next_send_time); }), time_to_next_process.RoundUpTo(TimeDelta::Millis(1))); @@ -314,7 +286,7 @@ void TaskQueuePacedSender::UpdateStats() { } TaskQueuePacedSender::Stats TaskQueuePacedSender::GetStats() const { - MutexLock lock(&stats_mutex_); + RTC_DCHECK_RUN_ON(task_queue_); return current_stats_; } diff --git a/modules/pacing/task_queue_paced_sender.h b/modules/pacing/task_queue_paced_sender.h index 4d5169561e..b8e7d78ecd 100644 --- a/modules/pacing/task_queue_paced_sender.h +++ b/modules/pacing/task_queue_paced_sender.h @@ -50,11 +50,13 @@ class TaskQueuePacedSender : public RtpPacketPacer, public RtpPacketSender { // a packet "debt" that correspond to approximately the send rate during the // specified interval. This greatly reduced wake ups by not pacing packets // within the allowed burst budget. + // + // The taskqueue used when constructing a TaskQueuePacedSender will also be + // used for pacing. TaskQueuePacedSender( Clock* clock, PacingController::PacketSender* packet_sender, const FieldTrialsView& field_trials, - TaskQueueFactory* task_queue_factory, TimeDelta max_hold_back_window, int max_hold_back_window_in_packets, absl::optional burst_interval = absl::nullopt); @@ -178,13 +180,10 @@ class TaskQueuePacedSender : public RtpPacketPacer, public RtpPacketSender { rtc::ExpFilter packet_size_ RTC_GUARDED_BY(task_queue_); bool include_overhead_ RTC_GUARDED_BY(task_queue_); - // TODO(webrtc:14502): Remove stats_mutex_ when pacer runs on the worker - // thread. - mutable Mutex stats_mutex_; - Stats current_stats_ RTC_GUARDED_BY(stats_mutex_); + Stats current_stats_ RTC_GUARDED_BY(task_queue_); ScopedTaskSafety safety_; - MaybeWorkerThread task_queue_; + TaskQueueBase* task_queue_; }; } // namespace webrtc #endif // MODULES_PACING_TASK_QUEUE_PACED_SENDER_H_ diff --git a/modules/pacing/task_queue_paced_sender_unittest.cc b/modules/pacing/task_queue_paced_sender_unittest.cc index a8a7b65ef4..54347493e7 100644 --- a/modules/pacing/task_queue_paced_sender_unittest.cc +++ b/modules/pacing/task_queue_paced_sender_unittest.cc @@ -118,35 +118,11 @@ std::vector> GeneratePackets( return packets; } -constexpr char kSendPacketOnWorkerThreadFieldTrialDisabled[] = - "WebRTC-SendPacketsOnWorkerThread/Disabled/"; - -std::vector ParameterizedFieldTrials() { - return {{""}, {kSendPacketOnWorkerThreadFieldTrialDisabled}}; -} - -bool UsingWorkerThread(absl::string_view field_trials) { - return field_trials.find(kSendPacketOnWorkerThreadFieldTrialDisabled) == - std::string::npos; -} - -class TaskQueuePacedSenderTest - : public ::testing::TestWithParam {}; - -INSTANTIATE_TEST_SUITE_P(TaskQueuePacedSenderTest, - TaskQueuePacedSenderTest, - testing::ValuesIn(ParameterizedFieldTrials()), - [](const testing::TestParamInfo& info) { - return UsingWorkerThread(info.param) ? "UsingWt" - : "OwnedTQ"; - }); - -TEST_P(TaskQueuePacedSenderTest, PacesPackets) { +TEST(TaskQueuePacedSenderTest, PacesPackets) { GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -170,7 +146,7 @@ TEST_P(TaskQueuePacedSenderTest, PacesPackets) { if (packets_sent == kPacketsToSend) { end_time = time_controller.GetClock()->CurrentTime(); } - EXPECT_EQ(sequence_checker.IsCurrent(), UsingWorkerThread(GetParam())); + EXPECT_TRUE(sequence_checker.IsCurrent()); }); const Timestamp start_time = time_controller.GetClock()->CurrentTime(); @@ -184,12 +160,12 @@ TEST_P(TaskQueuePacedSenderTest, PacesPackets) { } // Same test as above, but with 0.5s of burst applied. -TEST_P(TaskQueuePacedSenderTest, PacesPacketsWithBurst) { +TEST(TaskQueuePacedSenderTest, PacesPacketsWithBurst) { GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback, // Half a second of bursting. @@ -215,7 +191,7 @@ TEST_P(TaskQueuePacedSenderTest, PacesPacketsWithBurst) { if (packets_sent == kPacketsToSend) { end_time = time_controller.GetClock()->CurrentTime(); } - EXPECT_EQ(sequence_checker.IsCurrent(), UsingWorkerThread(GetParam())); + EXPECT_TRUE(sequence_checker.IsCurrent()); }); const Timestamp start_time = time_controller.GetClock()->CurrentTime(); @@ -230,12 +206,12 @@ TEST_P(TaskQueuePacedSenderTest, PacesPacketsWithBurst) { EXPECT_NEAR((end_time - start_time).ms(), 500.0, 50.0); } -TEST_P(TaskQueuePacedSenderTest, ReschedulesProcessOnRateChange) { +TEST(TaskQueuePacedSenderTest, ReschedulesProcessOnRateChange) { GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -284,12 +260,12 @@ TEST_P(TaskQueuePacedSenderTest, ReschedulesProcessOnRateChange) { 1.0); } -TEST_P(TaskQueuePacedSenderTest, SendsAudioImmediately) { +TEST(TaskQueuePacedSenderTest, SendsAudioImmediately) { GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -316,13 +292,13 @@ TEST_P(TaskQueuePacedSenderTest, SendsAudioImmediately) { ::testing::Mock::VerifyAndClearExpectations(&packet_router); } -TEST_P(TaskQueuePacedSenderTest, SleepsDuringCoalscingWindow) { +TEST(TaskQueuePacedSenderTest, SleepsDuringCoalscingWindow) { const TimeDelta kCoalescingWindow = TimeDelta::Millis(5); GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + kCoalescingWindow, TaskQueuePacedSender::kNoPacketHoldback); @@ -353,13 +329,13 @@ TEST_P(TaskQueuePacedSenderTest, SleepsDuringCoalscingWindow) { ::testing::Mock::VerifyAndClearExpectations(&packet_router); } -TEST_P(TaskQueuePacedSenderTest, ProbingOverridesCoalescingWindow) { +TEST(TaskQueuePacedSenderTest, ProbingOverridesCoalescingWindow) { const TimeDelta kCoalescingWindow = TimeDelta::Millis(5); GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + kCoalescingWindow, TaskQueuePacedSender::kNoPacketHoldback); @@ -390,13 +366,13 @@ TEST_P(TaskQueuePacedSenderTest, ProbingOverridesCoalescingWindow) { time_controller.AdvanceTime(kCoalescingWindow - TimeDelta::Millis(1)); } -TEST_P(TaskQueuePacedSenderTest, SchedulesProbeAtSentTime) { +TEST(TaskQueuePacedSenderTest, SchedulesProbeAtSentTime) { ScopedKeyValueConfig trials( - GetParam() + "WebRTC-Bwe-ProbingBehavior/min_probe_delta:1ms/"); + "WebRTC-Bwe-ProbingBehavior/min_probe_delta:1ms/"); GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -461,15 +437,15 @@ TEST_P(TaskQueuePacedSenderTest, SchedulesProbeAtSentTime) { time_controller.AdvanceTime(TimeDelta::Millis(2)); } -TEST_P(TaskQueuePacedSenderTest, NoMinSleepTimeWhenProbing) { +TEST(TaskQueuePacedSenderTest, NoMinSleepTimeWhenProbing) { // Set min_probe_delta to be less than kMinSleepTime (1ms). const TimeDelta kMinProbeDelta = TimeDelta::Micros(200); ScopedKeyValueConfig trials( - GetParam() + "WebRTC-Bwe-ProbingBehavior/min_probe_delta:200us/"); + "WebRTC-Bwe-ProbingBehavior/min_probe_delta:200us/"); GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -523,15 +499,15 @@ TEST_P(TaskQueuePacedSenderTest, NoMinSleepTimeWhenProbing) { EXPECT_EQ(data_sent, DataSize::Bytes(1) + kPacketSize + 4 * kMinProbeSize); } -TEST_P(TaskQueuePacedSenderTest, PacketBasedCoalescing) { +TEST(TaskQueuePacedSenderTest, PacketBasedCoalescing) { const TimeDelta kFixedCoalescingWindow = TimeDelta::Millis(10); const int kPacketBasedHoldback = 5; GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + kFixedCoalescingWindow, kPacketBasedHoldback); // Set rates so one packet adds one ms of buffer level. @@ -573,15 +549,15 @@ TEST_P(TaskQueuePacedSenderTest, PacketBasedCoalescing) { time_controller.AdvanceTime(TimeDelta::Millis(1)); } -TEST_P(TaskQueuePacedSenderTest, FixedHoldBackHasPriorityOverPackets) { +TEST(TaskQueuePacedSenderTest, FixedHoldBackHasPriorityOverPackets) { const TimeDelta kFixedCoalescingWindow = TimeDelta::Millis(2); const int kPacketBasedHoldback = 5; GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + kFixedCoalescingWindow, kPacketBasedHoldback); // Set rates so one packet adds one ms of buffer level. @@ -620,15 +596,15 @@ TEST_P(TaskQueuePacedSenderTest, FixedHoldBackHasPriorityOverPackets) { time_controller.AdvanceTime(kFixedCoalescingWindow); } -TEST_P(TaskQueuePacedSenderTest, ProbingStopDuringSendLoop) { +TEST(TaskQueuePacedSenderTest, ProbingStopDuringSendLoop) { // Set a low `min_probe_delta` to let probing finish during send loop. ScopedKeyValueConfig trials( - GetParam() + "WebRTC-Bwe-ProbingBehavior/min_probe_delta:100us/"); + "WebRTC-Bwe-ProbingBehavior/min_probe_delta:100us/"); GlobalSimulatedTimeController time_controller(Timestamp::Millis(1234)); MockPacketRouter packet_router; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -670,13 +646,13 @@ TEST_P(TaskQueuePacedSenderTest, ProbingStopDuringSendLoop) { time_controller.AdvanceTime(kPacketsPacedTime + TimeDelta::Millis(1)); } -TEST_P(TaskQueuePacedSenderTest, PostedPacketsNotSendFromRemovePacketsForSsrc) { +TEST(TaskQueuePacedSenderTest, PostedPacketsNotSendFromRemovePacketsForSsrc) { static constexpr Timestamp kStartTime = Timestamp::Millis(1234); GlobalSimulatedTimeController time_controller(kStartTime); - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; MockPacketRouter packet_router; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback); @@ -712,13 +688,13 @@ TEST_P(TaskQueuePacedSenderTest, PostedPacketsNotSendFromRemovePacketsForSsrc) { EXPECT_EQ(pacer.ExpectedQueueTime(), TimeDelta::Zero()); } -TEST_P(TaskQueuePacedSenderTest, Stats) { +TEST(TaskQueuePacedSenderTest, Stats) { static constexpr Timestamp kStartTime = Timestamp::Millis(1234); GlobalSimulatedTimeController time_controller(kStartTime); MockPacketRouter packet_router; - ScopedKeyValueConfig trials(GetParam()); + ScopedKeyValueConfig trials; TaskQueuePacedSender pacer(time_controller.GetClock(), &packet_router, trials, - time_controller.GetTaskQueueFactory(), + PacingController::kMinSleepTime, TaskQueuePacedSender::kNoPacketHoldback);