2021-06-27 20:44:35 +00:00
|
|
|
package org.webrtc;
|
|
|
|
|
|
|
|
import androidx.annotation.Nullable;
|
2021-12-21 23:37:30 +00:00
|
|
|
import b.d.b.a.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
import org.webrtc.EncodedImage;
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public interface VideoEncoder {
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class BitrateAllocation {
|
|
|
|
public final int[][] bitratesBbs;
|
|
|
|
|
|
|
|
@CalledByNative("BitrateAllocation")
|
|
|
|
public BitrateAllocation(int[][] iArr) {
|
|
|
|
this.bitratesBbs = iArr;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getSum() {
|
2022-03-02 20:59:20 +00:00
|
|
|
int[][] iArr;
|
2021-06-27 20:44:35 +00:00
|
|
|
int i = 0;
|
2022-03-02 20:59:20 +00:00
|
|
|
for (int[] iArr2 : this.bitratesBbs) {
|
2021-06-27 20:44:35 +00:00
|
|
|
for (int i2 : iArr2) {
|
|
|
|
i += i2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public interface Callback {
|
|
|
|
void onEncodedFrame(EncodedImage encodedImage, CodecSpecificInfo codecSpecificInfo);
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class Capabilities {
|
|
|
|
public final boolean lossNotification;
|
|
|
|
|
|
|
|
@CalledByNative("Capabilities")
|
|
|
|
public Capabilities(boolean z2) {
|
|
|
|
this.lossNotification = z2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class CodecSpecificInfo {
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class CodecSpecificInfoH264 extends CodecSpecificInfo {
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class CodecSpecificInfoVP8 extends CodecSpecificInfo {
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class CodecSpecificInfoVP9 extends CodecSpecificInfo {
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class EncodeInfo {
|
|
|
|
public final EncodedImage.FrameType[] frameTypes;
|
|
|
|
|
|
|
|
@CalledByNative("EncodeInfo")
|
|
|
|
public EncodeInfo(EncodedImage.FrameType[] frameTypeArr) {
|
|
|
|
this.frameTypes = frameTypeArr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class ResolutionBitrateLimits {
|
|
|
|
public final int frameSizePixels;
|
|
|
|
public final int maxBitrateBps;
|
|
|
|
public final int minBitrateBps;
|
|
|
|
public final int minStartBitrateBps;
|
|
|
|
|
|
|
|
public ResolutionBitrateLimits(int i, int i2, int i3, int i4) {
|
|
|
|
this.frameSizePixels = i;
|
|
|
|
this.minStartBitrateBps = i2;
|
|
|
|
this.minBitrateBps = i3;
|
|
|
|
this.maxBitrateBps = i4;
|
|
|
|
}
|
|
|
|
|
|
|
|
@CalledByNative("ResolutionBitrateLimits")
|
|
|
|
public int getFrameSizePixels() {
|
|
|
|
return this.frameSizePixels;
|
|
|
|
}
|
|
|
|
|
|
|
|
@CalledByNative("ResolutionBitrateLimits")
|
|
|
|
public int getMaxBitrateBps() {
|
|
|
|
return this.maxBitrateBps;
|
|
|
|
}
|
|
|
|
|
|
|
|
@CalledByNative("ResolutionBitrateLimits")
|
|
|
|
public int getMinBitrateBps() {
|
|
|
|
return this.minBitrateBps;
|
|
|
|
}
|
|
|
|
|
|
|
|
@CalledByNative("ResolutionBitrateLimits")
|
|
|
|
public int getMinStartBitrateBps() {
|
|
|
|
return this.minStartBitrateBps;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class ScalingSettings {
|
|
|
|
public static final ScalingSettings OFF = new ScalingSettings();
|
|
|
|
@Nullable
|
|
|
|
public final Integer high;
|
|
|
|
@Nullable
|
|
|
|
public final Integer low;
|
|
|
|
public final boolean on;
|
|
|
|
|
|
|
|
private ScalingSettings() {
|
|
|
|
this.on = false;
|
|
|
|
this.low = null;
|
|
|
|
this.high = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ScalingSettings(int i, int i2) {
|
|
|
|
this.on = true;
|
|
|
|
this.low = Integer.valueOf(i);
|
|
|
|
this.high = Integer.valueOf(i2);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Deprecated
|
|
|
|
public ScalingSettings(boolean z2) {
|
|
|
|
this.on = z2;
|
|
|
|
this.low = null;
|
|
|
|
this.high = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Deprecated
|
|
|
|
public ScalingSettings(boolean z2, int i, int i2) {
|
|
|
|
this.on = z2;
|
|
|
|
this.low = Integer.valueOf(i);
|
|
|
|
this.high = Integer.valueOf(i2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
|
|
|
if (!this.on) {
|
|
|
|
return "OFF";
|
|
|
|
}
|
2022-03-30 16:43:10 +00:00
|
|
|
StringBuilder R = a.R("[ ");
|
|
|
|
R.append(this.low);
|
|
|
|
R.append(", ");
|
|
|
|
return a.E(R, this.high, " ]");
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static class Settings {
|
|
|
|
public final boolean automaticResizeOn;
|
|
|
|
public final Capabilities capabilities;
|
|
|
|
public final int height;
|
|
|
|
public final int maxFramerate;
|
|
|
|
public final int numberOfCores;
|
|
|
|
public final int numberOfSimulcastStreams;
|
|
|
|
public final int startBitrate;
|
|
|
|
public final int width;
|
|
|
|
|
|
|
|
@Deprecated
|
|
|
|
public Settings(int i, int i2, int i3, int i4, int i5, int i6, boolean z2) {
|
|
|
|
this(i, i2, i3, i4, i5, i6, z2, new Capabilities(false));
|
|
|
|
}
|
|
|
|
|
|
|
|
@CalledByNative("Settings")
|
|
|
|
public Settings(int i, int i2, int i3, int i4, int i5, int i6, boolean z2, Capabilities capabilities) {
|
|
|
|
this.numberOfCores = i;
|
|
|
|
this.width = i2;
|
|
|
|
this.height = i3;
|
|
|
|
this.startBitrate = i4;
|
|
|
|
this.maxFramerate = i5;
|
|
|
|
this.numberOfSimulcastStreams = i6;
|
|
|
|
this.automaticResizeOn = z2;
|
|
|
|
this.capabilities = capabilities;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
long createNativeVideoEncoder();
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
VideoCodecStatus encode(VideoFrame videoFrame, EncodeInfo encodeInfo);
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
String getImplementationName();
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
ResolutionBitrateLimits[] getResolutionBitrateLimits();
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
ScalingSettings getScalingSettings();
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
VideoCodecStatus initEncode(Settings settings, Callback callback);
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
boolean isHardwareEncoder();
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
VideoCodecStatus release();
|
|
|
|
|
|
|
|
@CalledByNative
|
|
|
|
VideoCodecStatus setRateAllocation(BitrateAllocation bitrateAllocation, int i);
|
|
|
|
}
|