Rabbit-R1/android (non root)/java/sources/androidx/media3/extractor/mp4/TrackFragment.java
2024-05-21 17:08:36 -04:00

78 lines
2.9 KiB
Java

package androidx.media3.extractor.mp4;
import androidx.media3.common.util.ParsableByteArray;
import androidx.media3.extractor.ExtractorInput;
import java.io.IOException;
/* loaded from: classes2.dex */
final class TrackFragment {
public long atomPosition;
public long auxiliaryDataPosition;
public long dataPosition;
public boolean definesEncryptionData;
public DefaultSampleValues header;
public long nextFragmentDecodeTime;
public boolean nextFragmentDecodeTimeIncludesMoov;
public int sampleCount;
public boolean sampleEncryptionDataNeedsFill;
public TrackEncryptionBox trackEncryptionBox;
public int trunCount;
public long[] trunDataPosition = new long[0];
public int[] trunLength = new int[0];
public int[] sampleSizeTable = new int[0];
public long[] samplePresentationTimesUs = new long[0];
public boolean[] sampleIsSyncFrameTable = new boolean[0];
public boolean[] sampleHasSubsampleEncryptionTable = new boolean[0];
public final ParsableByteArray sampleEncryptionData = new ParsableByteArray();
public void reset() {
this.trunCount = 0;
this.nextFragmentDecodeTime = 0L;
this.nextFragmentDecodeTimeIncludesMoov = false;
this.definesEncryptionData = false;
this.sampleEncryptionDataNeedsFill = false;
this.trackEncryptionBox = null;
}
public void initTables(int i, int i2) {
this.trunCount = i;
this.sampleCount = i2;
if (this.trunLength.length < i) {
this.trunDataPosition = new long[i];
this.trunLength = new int[i];
}
if (this.sampleSizeTable.length < i2) {
int i3 = (i2 * 125) / 100;
this.sampleSizeTable = new int[i3];
this.samplePresentationTimesUs = new long[i3];
this.sampleIsSyncFrameTable = new boolean[i3];
this.sampleHasSubsampleEncryptionTable = new boolean[i3];
}
}
public void initEncryptionData(int i) {
this.sampleEncryptionData.reset(i);
this.definesEncryptionData = true;
this.sampleEncryptionDataNeedsFill = true;
}
public void fillEncryptionData(ExtractorInput extractorInput) throws IOException {
extractorInput.readFully(this.sampleEncryptionData.getData(), 0, this.sampleEncryptionData.limit());
this.sampleEncryptionData.setPosition(0);
this.sampleEncryptionDataNeedsFill = false;
}
public void fillEncryptionData(ParsableByteArray parsableByteArray) {
parsableByteArray.readBytes(this.sampleEncryptionData.getData(), 0, this.sampleEncryptionData.limit());
this.sampleEncryptionData.setPosition(0);
this.sampleEncryptionDataNeedsFill = false;
}
public long getSamplePresentationTimeUs(int i) {
return this.samplePresentationTimesUs[i];
}
public boolean sampleHasSubsampleEncryptionTable(int i) {
return this.definesEncryptionData && this.sampleHasSubsampleEncryptionTable[i];
}
}