diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc')
-rw-r--r-- | third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc b/third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc index e50c125876..0c6d3e3a48 100644 --- a/third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc +++ b/third_party/libwebrtc/rtc_tools/rtp_generator/rtp_generator.cc @@ -14,7 +14,7 @@ #include <memory> #include <utility> -#include "api/task_queue/default_task_queue_factory.h" +#include "api/environment/environment_factory.h" #include "api/test/create_frame_generator.h" #include "api/video_codecs/video_decoder_factory_template.h" #include "api/video_codecs/video_decoder_factory_template_dav1d_adapter.h" @@ -171,6 +171,7 @@ absl::optional<RtpGeneratorOptions> ParseRtpGeneratorOptionsFromFile( RtpGenerator::RtpGenerator(const RtpGeneratorOptions& options) : options_(options), + env_(CreateEnvironment()), video_encoder_factory_( std::make_unique<webrtc::VideoEncoderFactoryTemplate< webrtc::LibvpxVp8EncoderTemplateAdapter, @@ -183,9 +184,7 @@ RtpGenerator::RtpGenerator(const RtpGeneratorOptions& options) webrtc::Dav1dDecoderTemplateAdapter>>()), video_bitrate_allocator_factory_( CreateBuiltinVideoBitrateAllocatorFactory()), - event_log_(std::make_unique<RtcEventLogNull>()), - call_(Call::Create(CallConfig(event_log_.get()))), - task_queue_(CreateDefaultTaskQueueFactory()) { + call_(Call::Create(CallConfig(env_))) { constexpr int kMinBitrateBps = 30000; // 30 Kbps constexpr int kMaxBitrateBps = 2500000; // 2.5 Mbps @@ -246,11 +245,11 @@ RtpGenerator::RtpGenerator(const RtpGeneratorOptions& options) // Setup the fake video stream for this. std::unique_ptr<test::FrameGeneratorCapturer> frame_generator = std::make_unique<test::FrameGeneratorCapturer>( - Clock::GetRealTimeClock(), + &env_.clock(), test::CreateSquareFrameGenerator(send_config.video_width, send_config.video_height, absl::nullopt, absl::nullopt), - send_config.video_fps, *task_queue_); + send_config.video_fps, env_.task_queue_factory()); frame_generator->Init(); VideoSendStream* video_send_stream = call_->CreateVideoSendStream( |