From 09280e13189478e4a12c7abd8e085afd1b430c92 Mon Sep 17 00:00:00 2001 From: aoife cassidy Date: Tue, 3 Dec 2024 16:05:08 +0200 Subject: [PATCH] environment --- webrtc-sys/src/video_encoder_factory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webrtc-sys/src/video_encoder_factory.cpp b/webrtc-sys/src/video_encoder_factory.cpp index b2005867..0011d6fc 100644 --- a/webrtc-sys/src/video_encoder_factory.cpp +++ b/webrtc-sys/src/video_encoder_factory.cpp @@ -16,6 +16,7 @@ #include "livekit/video_encoder_factory.h" +#include "api/environment/environment_factory.h" #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_encoder.h" #include "api/video_codecs/video_encoder_factory_template.h" @@ -89,7 +90,7 @@ VideoEncoderFactory::InternalFactory::CreateVideoEncoder( for (const auto& factory : factories_) { for (const auto& supported_format : factory->GetSupportedFormats()) { if (supported_format.IsSameCodec(format)) - return factory->CreateVideoEncoder(format); + return factory->Create(webrtc::CreateEnvironment(), format); } } @@ -124,7 +125,7 @@ std::unique_ptr VideoEncoderFactory::CreateVideoEncoder( std::unique_ptr encoder; if (format.IsCodecInList(internal_factory_->GetSupportedFormats())) { encoder = std::make_unique( - internal_factory_.get(), format); + webrtc::CreateEnvironment(), internal_factory_.get(), NULL, format); } return encoder;