- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
84 lines
2.9 KiB
Java
84 lines
2.9 KiB
Java
package com.mbridge.msdk.playercommon.exoplayer2.decoder;
|
|
|
|
import android.annotation.TargetApi;
|
|
import android.media.MediaCodec;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.util.Util;
|
|
|
|
/* loaded from: classes4.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;
|
|
|
|
@TargetApi(16)
|
|
public final MediaCodec.CryptoInfo getFrameworkCryptoInfoV16() {
|
|
return this.frameworkCryptoInfo;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public CryptoInfo() {
|
|
int i = Util.SDK_INT;
|
|
Object[] objArr = 0;
|
|
MediaCodec.CryptoInfo newFrameworkCryptoInfoV16 = i >= 16 ? newFrameworkCryptoInfoV16() : null;
|
|
this.frameworkCryptoInfo = newFrameworkCryptoInfoV16;
|
|
this.patternHolder = i >= 24 ? new PatternHolderV24(newFrameworkCryptoInfoV16) : null;
|
|
}
|
|
|
|
public final 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;
|
|
if (Util.SDK_INT >= 16) {
|
|
updateFrameworkCryptoInfoV16();
|
|
}
|
|
}
|
|
|
|
@TargetApi(16)
|
|
private MediaCodec.CryptoInfo newFrameworkCryptoInfoV16() {
|
|
return new MediaCodec.CryptoInfo();
|
|
}
|
|
|
|
@TargetApi(16)
|
|
private void updateFrameworkCryptoInfoV16() {
|
|
MediaCodec.CryptoInfo cryptoInfo = this.frameworkCryptoInfo;
|
|
cryptoInfo.numSubSamples = this.numSubSamples;
|
|
cryptoInfo.numBytesOfClearData = this.numBytesOfClearData;
|
|
cryptoInfo.numBytesOfEncryptedData = this.numBytesOfEncryptedData;
|
|
cryptoInfo.key = this.key;
|
|
cryptoInfo.iv = this.iv;
|
|
cryptoInfo.mode = this.mode;
|
|
if (Util.SDK_INT >= 24) {
|
|
this.patternHolder.set(this.encryptedBlocks, this.clearBlocks);
|
|
}
|
|
}
|
|
|
|
@TargetApi(24)
|
|
public 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);
|
|
}
|
|
}
|
|
}
|