Reland "Expose AV1 encoder&decoder from Android SDK."

This is a reland of fedd5029c584e9dc1352434b62a30cd8af2889d8

Original change's description:
> Expose AV1 encoder&decoder from Android SDK.
>
> Bug: None
> Change-Id: Ie32be36da498d4bed2a3cf51aa6abc8838e42da1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212024
> Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
> Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#33743}

Bug: None
Change-Id: Ibfc7b860bd2314cf997444c7ab0d94d2b186e576
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215586
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33882}
This commit is contained in:
Yura Yaroshevich
2021-04-12 15:41:21 +03:00
committed by WebRTC LUCI CQ
parent 0365c99474
commit 3fb51d2783
16 changed files with 190 additions and 20 deletions

View File

@ -32,6 +32,9 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
if (codecType.getName().equalsIgnoreCase("VP9") && LibvpxVp9Decoder.nativeIsSupported()) {
return new LibvpxVp9Decoder();
}
if (codecType.getName().equalsIgnoreCase("AV1") && LibaomAv1Decoder.nativeIsSupported()) {
return new LibaomAv1Decoder();
}
return null;
}
@ -48,6 +51,9 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
if (LibvpxVp9Decoder.nativeIsSupported()) {
codecs.add(new VideoCodecInfo("VP9", new HashMap<>()));
}
if (LibaomAv1Decoder.nativeIsSupported()) {
codecs.add(new VideoCodecInfo("AV1", new HashMap<>()));
}
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
}