Rabbit-R1/original r1/java/sources/androidx/media3/decoder/CryptoInfo.java
2024-05-21 17:08:36 -04:00

80 lines
2.8 KiB
Java

package androidx.media3.decoder;
import android.media.MediaCodec;
import androidx.media3.common.util.Assertions;
import androidx.media3.common.util.Util;
/* loaded from: classes2.dex */
public final class CryptoInfo {
public int clearBlocks;
public int encryptedBlocks;
private final MediaCodec.CryptoInfo frameworkCryptoInfo;
public byte[] iv;
public byte[] key;
public int mode;
public int[] numBytesOfClearData;
public int[] numBytesOfEncryptedData;
public int numSubSamples;
private final PatternHolderV24 patternHolder;
public MediaCodec.CryptoInfo getFrameworkCryptoInfo() {
return this.frameworkCryptoInfo;
}
/* JADX WARN: Multi-variable type inference failed */
public CryptoInfo() {
MediaCodec.CryptoInfo cryptoInfo = new MediaCodec.CryptoInfo();
this.frameworkCryptoInfo = cryptoInfo;
this.patternHolder = Util.SDK_INT >= 24 ? new PatternHolderV24(cryptoInfo) : null;
}
public void set(int i, int[] iArr, int[] iArr2, byte[] bArr, byte[] bArr2, int i2, int i3, int i4) {
this.numSubSamples = i;
this.numBytesOfClearData = iArr;
this.numBytesOfEncryptedData = iArr2;
this.key = bArr;
this.iv = bArr2;
this.mode = i2;
this.encryptedBlocks = i3;
this.clearBlocks = i4;
this.frameworkCryptoInfo.numSubSamples = i;
this.frameworkCryptoInfo.numBytesOfClearData = iArr;
this.frameworkCryptoInfo.numBytesOfEncryptedData = iArr2;
this.frameworkCryptoInfo.key = bArr;
this.frameworkCryptoInfo.iv = bArr2;
this.frameworkCryptoInfo.mode = i2;
if (Util.SDK_INT >= 24) {
((PatternHolderV24) Assertions.checkNotNull(this.patternHolder)).set(i3, i4);
}
}
public void increaseClearDataFirstSubSampleBy(int i) {
if (i == 0) {
return;
}
if (this.numBytesOfClearData == null) {
int[] iArr = new int[1];
this.numBytesOfClearData = iArr;
this.frameworkCryptoInfo.numBytesOfClearData = iArr;
}
int[] iArr2 = this.numBytesOfClearData;
iArr2[0] = iArr2[0] + i;
}
/* loaded from: classes2.dex */
private static final class PatternHolderV24 {
private final MediaCodec.CryptoInfo frameworkCryptoInfo;
private final MediaCodec.CryptoInfo.Pattern pattern;
private PatternHolderV24(MediaCodec.CryptoInfo cryptoInfo) {
this.frameworkCryptoInfo = cryptoInfo;
this.pattern = new MediaCodec.CryptoInfo.Pattern(0, 0);
}
/* JADX INFO: Access modifiers changed from: private */
public void set(int i, int i2) {
this.pattern.set(i, i2);
this.frameworkCryptoInfo.setPattern(this.pattern);
}
}
}