Remove usage of rtc::TaskQueue in video replay tool

Bug: webrtc:14169
Change-Id: I4a522680f6ca6718b478bd755cdb0b36261a3f47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335101
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41560}
diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn
index df3c55f..6637d14 100644
--- a/rtc_tools/BUILD.gn
+++ b/rtc_tools/BUILD.gn
@@ -258,6 +258,7 @@
       "../api:rtp_parameters",
       "../api/environment",
       "../api/environment:environment_factory",
+      "../api/task_queue",
       "../api/test/video:function_video_factory",
       "../api/transport:field_trial_based_config",
       "../api/units:timestamp",
diff --git a/rtc_tools/video_replay.cc b/rtc_tools/video_replay.cc
index 52c8d68..243919c 100644
--- a/rtc_tools/video_replay.cc
+++ b/rtc_tools/video_replay.cc
@@ -20,6 +20,7 @@
 #include "api/environment/environment_factory.h"
 #include "api/field_trials.h"
 #include "api/media_types.h"
+#include "api/task_queue/task_queue_base.h"
 #include "api/test/video/function_video_decoder_factory.h"
 #include "api/transport/field_trial_based_config.h"
 #include "api/units/timestamp.h"
@@ -486,9 +487,8 @@
             time_sim_ ? time_sim_->GetTaskQueueFactory() : nullptr,
             time_sim_ ? time_sim_->GetClock() : nullptr)),
         rtp_reader_(CreateRtpReader(rtp_dump_path_)) {
-    worker_thread_ = std::make_unique<rtc::TaskQueue>(
-        env_.task_queue_factory().CreateTaskQueue(
-            "worker_thread", TaskQueueFactory::Priority::NORMAL));
+    worker_thread_ = env_.task_queue_factory().CreateTaskQueue(
+        "worker_thread", TaskQueueFactory::Priority::NORMAL);
     rtc::Event event;
     worker_thread_->PostTask([&]() {
       call_ = Call::Create(CallConfig(env_));
@@ -663,7 +663,7 @@
   const std::string rtp_dump_path_;
   std::unique_ptr<GlobalSimulatedTimeController> time_sim_;
   Environment env_;
-  std::unique_ptr<rtc::TaskQueue> worker_thread_;
+  std::unique_ptr<TaskQueueBase, TaskQueueDeleter> worker_thread_;
   std::unique_ptr<Call> call_;
   std::unique_ptr<test::RtpFileReader> rtp_reader_;
   std::unique_ptr<StreamState> stream_state_;