Support injecting custom native codecs from Java.
This CL extends our support for injecting native codecs such that
downstream users can create Java codecs that are backed by custom
native codecs.
After this CL, the Java codec interfaces expose
createNativeVideo{En,Decoder}() methods that may return a value
representing a pointer to the backing native codec. Previously,
a similar mechanism was used for the special case of non-public
Java codecs extending from the internal
WrappedNativeVideo{En,De}coder classes.
Tested: AppRTCMobile on Pixel XL and Pixel 2.
Bug: webrtc:9495
Change-Id: I079ff744afc7bf9873ff983e775c136a6667266d
Reviewed-on: https://webrtc-review.googlesource.com/87264
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23883}
diff --git a/sdk/android/api/org/webrtc/VideoEncoderFallback.java b/sdk/android/api/org/webrtc/VideoEncoderFallback.java
index cd45eb7..fa36b7c 100644
--- a/sdk/android/api/org/webrtc/VideoEncoderFallback.java
+++ b/sdk/android/api/org/webrtc/VideoEncoderFallback.java
@@ -23,13 +23,13 @@
}
@Override
- long createNativeEncoder() {
+ public long createNativeVideoEncoder() {
return nativeCreateEncoder(fallback, primary);
}
@Override
- boolean isSoftwareEncoder() {
- return isWrappedSoftwareEncoder(primary);
+ public boolean isHardwareEncoder() {
+ return primary.isHardwareEncoder();
}
private static native long nativeCreateEncoder(VideoEncoder fallback, VideoEncoder primary);