Add AV1 encoder&decoder wrappers for iOS SDK.

It is now possible to use AV1 encoder and decoder on iOS and test
them in apps like AppRTCMobile.

Bug: None
Change-Id: Ifae221020e5abf3809010676862eecd9ffeec5e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208400
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33378}
This commit is contained in:
Yura Yaroshevich
2021-03-03 12:29:42 +03:00
committed by Commit Bot
parent 662d4c328f
commit 8cfb287735
13 changed files with 224 additions and 36 deletions

View File

@ -20,8 +20,20 @@
@implementation RTC_OBJC_TYPE (RTCVideoDecoderVP9)
+ (id<RTC_OBJC_TYPE(RTCVideoDecoder)>)vp9Decoder {
std::unique_ptr<webrtc::VideoDecoder> nativeDecoder(webrtc::VP9Decoder::Create());
if (nativeDecoder == nullptr) {
return nil;
}
return [[RTC_OBJC_TYPE(RTCWrappedNativeVideoDecoder) alloc]
initWithNativeDecoder:std::unique_ptr<webrtc::VideoDecoder>(webrtc::VP9Decoder::Create())];
initWithNativeDecoder:std::move(nativeDecoder)];
}
+ (bool)isSupported {
#if defined(RTC_ENABLE_VP9)
return true;
#else
return false;
#endif
}
@end