Always include the actual encoder implementation when RTCVideoEncoderAV1 is used.
Bug: webrtc:13573, b/236813931 Change-Id: I943ce51dac23bcbd6efe10413cfa9478f4ce6f55 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266485 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37352}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
ce80886bf2
commit
91c05abd9b
@ -14,29 +14,18 @@
|
||||
#import "RTCMacros.h"
|
||||
#import "RTCVideoEncoderAV1.h"
|
||||
#import "RTCWrappedNativeVideoEncoder.h"
|
||||
|
||||
#if defined(RTC_USE_LIBAOM_AV1_ENCODER)
|
||||
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h" // nogncheck
|
||||
#endif
|
||||
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h"
|
||||
|
||||
@implementation RTC_OBJC_TYPE (RTCVideoEncoderAV1)
|
||||
|
||||
+ (id<RTC_OBJC_TYPE(RTCVideoEncoder)>)av1Encoder {
|
||||
#if defined(RTC_USE_LIBAOM_AV1_ENCODER)
|
||||
std::unique_ptr<webrtc::VideoEncoder> nativeEncoder(webrtc::CreateLibaomAv1Encoder());
|
||||
return [[RTC_OBJC_TYPE(RTCWrappedNativeVideoEncoder) alloc]
|
||||
initWithNativeEncoder:std::move(nativeEncoder)];
|
||||
#else
|
||||
return nil;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (bool)isSupported {
|
||||
#if defined(RTC_USE_LIBAOM_AV1_ENCODER)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user