Update rtc_tools/rtp_generator to compile

This is a trivial CL, updating rtp_generator.cc according to changes in
APIs in other places.

Bug: webrtc:10807
Change-Id: Ie85c6283f2d78dcf742979378db0b4fb0914c96c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145209
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28526}
diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn
index 75b29f3..63a8b69 100644
--- a/rtc_tools/BUILD.gn
+++ b/rtc_tools/BUILD.gn
@@ -156,6 +156,8 @@
     deps = [
       "../api:libjingle_peerconnection_api",
       "../api:transport_api",
+      "../api/task_queue:default_task_queue_factory",
+      "../api/task_queue:task_queue",
       "../api/video:builtin_video_bitrate_allocator_factory",
       "../api/video_codecs:builtin_video_decoder_factory",
       "../api/video_codecs:builtin_video_encoder_factory",
@@ -180,6 +182,7 @@
       "../test:video_test_common",
       "//third_party/abseil-cpp/absl/flags:flag",
       "//third_party/abseil-cpp/absl/flags:parse",
+      "//third_party/abseil-cpp/absl/memory",
       "//third_party/abseil-cpp/absl/strings",
     ]
   }
diff --git a/rtc_tools/rtp_generator/rtp_generator.cc b/rtc_tools/rtp_generator/rtp_generator.cc
index 3c9e22e..24528e8 100644
--- a/rtc_tools/rtp_generator/rtp_generator.cc
+++ b/rtc_tools/rtp_generator/rtp_generator.cc
@@ -13,6 +13,8 @@
 #include <algorithm>
 #include <utility>
 
+#include "absl/memory/memory.h"
+#include "api/task_queue/default_task_queue_factory.h"
 #include "api/video_codecs/builtin_video_decoder_factory.h"
 #include "api/video_codecs/builtin_video_encoder_factory.h"
 #include "api/video_codecs/video_encoder.h"
@@ -159,8 +161,9 @@
       video_decoder_factory_(CreateBuiltinVideoDecoderFactory()),
       video_bitrate_allocator_factory_(
           CreateBuiltinVideoBitrateAllocatorFactory()),
-      event_log_(webrtc::RtcEventLog::CreateNull()),
-      call_(Call::Create(CallConfig(event_log_.get()))) {
+      event_log_(absl::make_unique<RtcEventLogNull>()),
+      call_(Call::Create(CallConfig(event_log_.get()))),
+      task_queue_(CreateDefaultTaskQueueFactory()) {
   constexpr int kMinBitrateBps = 30000;    // 30 Kbps
   constexpr int kMaxBitrateBps = 2500000;  // 2.5 Mbps
 
@@ -219,10 +222,13 @@
             /*screenshare enabled*/ false);
 
     // Setup the fake video stream for this.
-    std::unique_ptr<test::FrameGeneratorCapturer> frame_generator(
-        test::FrameGeneratorCapturer::Create(
-            send_config.video_width, send_config.video_height, absl::nullopt,
-            absl::nullopt, send_config.video_fps, Clock::GetRealTimeClock()));
+    std::unique_ptr<test::FrameGeneratorCapturer> frame_generator =
+        absl::make_unique<test::FrameGeneratorCapturer>(
+            Clock::GetRealTimeClock(),
+            test::FrameGenerator::CreateSquareGenerator(
+                send_config.video_width, send_config.video_height,
+                absl::nullopt, absl::nullopt),
+            send_config.video_fps, *task_queue_);
     frame_generator->Init();
 
     VideoSendStream* video_send_stream = call_->CreateVideoSendStream(
diff --git a/rtc_tools/rtp_generator/rtp_generator.h b/rtc_tools/rtp_generator/rtp_generator.h
index 34bc2e9..0a1a9f3 100644
--- a/rtc_tools/rtp_generator/rtp_generator.h
+++ b/rtc_tools/rtp_generator/rtp_generator.h
@@ -17,6 +17,7 @@
 
 #include "api/call/transport.h"
 #include "api/media_types.h"
+#include "api/task_queue/task_queue_factory.h"
 #include "api/video/builtin_video_bitrate_allocator_factory.h"
 #include "api/video_codecs/video_decoder_factory.h"
 #include "api/video_codecs/video_encoder_config.h"
@@ -112,6 +113,7 @@
   std::vector<VideoSendStream*> video_send_streams_;
   std::vector<uint32_t> durations_ms_;
   uint32_t start_ms_ = 0;
+  std::unique_ptr<TaskQueueFactory> task_queue_;
 
   // This object cannot be copied.
   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpGenerator);