Skip to content

Commit

Permalink
environment
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Dec 3, 2024
1 parent a85ce9d commit 09280e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webrtc-sys/src/video_encoder_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -124,7 +125,7 @@ std::unique_ptr<webrtc::VideoEncoder> VideoEncoderFactory::CreateVideoEncoder(
std::unique_ptr<webrtc::VideoEncoder> encoder;
if (format.IsCodecInList(internal_factory_->GetSupportedFormats())) {
encoder = std::make_unique<webrtc::SimulcastEncoderAdapter>(
internal_factory_.get(), format);
webrtc::CreateEnvironment(), internal_factory_.get(), NULL, format);
}

return encoder;
Expand Down

0 comments on commit 09280e1

Please sign in to comment.