Skip to content

Commit

Permalink
pure
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Dec 3, 2024
1 parent cb39b7b commit cff8169
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions webrtc-sys/include/livekit/video_encoder_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class VideoEncoderFactory : public webrtc::VideoEncoderFactory {
const webrtc::SdpVideoFormat& format,
absl::optional<std::string> scalability_mode) const override;

std::unique_ptr<webrtc::VideoEncoder> CreateVideoEncoder(
const webrtc::SdpVideoFormat& format) override;
std::unique_ptr<webrtc::VideoEncoder> Create(
const webrtc::Environment& env, const webrtc::SdpVideoFormat& format) override;

private:
std::vector<std::unique_ptr<webrtc::VideoEncoderFactory>> factories_;
Expand All @@ -48,7 +48,7 @@ class VideoEncoderFactory : public webrtc::VideoEncoderFactory {
absl::optional<std::string> scalability_mode) const override;

std::unique_ptr<webrtc::VideoEncoder> CreateVideoEncoder(
const webrtc::SdpVideoFormat& format) override;
const webrtc::SdpVideoFormat& format);

private:
std::unique_ptr<InternalFactory> internal_factory_;
Expand Down
6 changes: 3 additions & 3 deletions webrtc-sys/src/video_encoder_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ VideoEncoderFactory::InternalFactory::QueryCodecSupport(
}

std::unique_ptr<webrtc::VideoEncoder>
VideoEncoderFactory::InternalFactory::CreateVideoEncoder(
const webrtc::SdpVideoFormat& format) {
VideoEncoderFactory::InternalFactory::Create(
const webrtc::Environment& env, const webrtc::SdpVideoFormat& format) {
for (const auto& factory : factories_) {
for (const auto& supported_format : factory->GetSupportedFormats()) {
if (supported_format.IsSameCodec(format))
return factory->Create(webrtc::CreateEnvironment(), format);
return factory->Create(env, format);
}
}

Expand Down

0 comments on commit cff8169

Please sign in to comment.