diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java')
-rw-r--r-- | third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java b/third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java index 2ac42e834e..1b1cd44a92 100644 --- a/third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java +++ b/third_party/libwebrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java @@ -11,7 +11,6 @@ package org.webrtc; import androidx.annotation.Nullable; -import java.util.Arrays; import java.util.List; public class SoftwareVideoDecoderFactory implements VideoDecoderFactory { @@ -26,16 +25,14 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory { @Nullable @Override public VideoDecoder createDecoder(VideoCodecInfo info) { - long nativeDecoder = nativeCreateDecoder(nativeFactory, info); - if (nativeDecoder == 0) { + if (!nativeIsSupported(nativeFactory, info)) { Logging.w(TAG, "Trying to create decoder for unsupported format. " + info); return null; } - return new WrappedNativeVideoDecoder() { @Override - public long createNativeVideoDecoder() { - return nativeDecoder; + public long createNative(long webrtcEnvRef) { + return nativeCreate(nativeFactory, webrtcEnvRef, info); } }; } @@ -47,7 +44,10 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory { private static native long nativeCreateFactory(); - private static native long nativeCreateDecoder(long factory, VideoCodecInfo videoCodecInfo); + private static native boolean nativeIsSupported(long factory, VideoCodecInfo info); + + private static native long nativeCreate( + long factory, long webrtcEnvRef, VideoCodecInfo info); private static native List<VideoCodecInfo> nativeGetSupportedCodecs(long factory); } |