Skip to content

Commit

Permalink
macos intel fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Renoir committed Mar 10, 2022
1 parent 4f3f402 commit eabf739
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tgcalls/platform/darwin/objc_video_encoder_factory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,15 @@ void OnCurrentEncoder(const SdpVideoFormat &format) override {
}

std::unique_ptr<VideoEncoder> SimulcastVideoEncoderFactory::CreateVideoEncoder(const SdpVideoFormat& format) {
return std::make_unique<webrtc::CustomSimulcastEncoderAdapter>(_softwareFactory.get(), _hardwareFactory.get(), format);
#ifndef __aarch64__
#ifdef WEBRTC_MAC
return std::make_unique<webrtc::CustomSimulcastEncoderAdapter>(_softwareFactory.get(), _softwareFactory.get(), format);
#else
return std::make_unique<webrtc::CustomSimulcastEncoderAdapter>(_hardwareFactory.get(), _hardwareFactory.get(), format);
#endif //WEBRTC_MAC
#else
return std::make_unique<webrtc::CustomSimulcastEncoderAdapter>(_hardwareFactory.get(), _hardwareFactory.get(), format);
#endif //__aarch64__
}

std::unique_ptr<VideoEncoderFactory::EncoderSelectorInterface> SimulcastVideoEncoderFactory::GetEncoderSelector() const {
Expand Down

0 comments on commit eabf739

Please sign in to comment.