mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-06 20:39:26 +01:00
80 lines
2.9 KiB
Java
80 lines
2.9 KiB
Java
package com.google.android.exoplayer2.source;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes7.dex */
|
|
public class CompositeSequenceableLoader implements SequenceableLoader {
|
|
protected final SequenceableLoader[] loaders;
|
|
|
|
public CompositeSequenceableLoader(SequenceableLoader[] sequenceableLoaderArr) {
|
|
this.loaders = sequenceableLoaderArr;
|
|
}
|
|
|
|
@Override // com.google.android.exoplayer2.source.SequenceableLoader
|
|
public boolean continueLoading(long j) {
|
|
boolean z;
|
|
boolean z2 = false;
|
|
do {
|
|
long nextLoadPositionUs = getNextLoadPositionUs();
|
|
if (nextLoadPositionUs == Long.MIN_VALUE) {
|
|
return z2;
|
|
}
|
|
z = false;
|
|
for (SequenceableLoader sequenceableLoader : this.loaders) {
|
|
long nextLoadPositionUs2 = sequenceableLoader.getNextLoadPositionUs();
|
|
boolean z3 = nextLoadPositionUs2 != Long.MIN_VALUE && nextLoadPositionUs2 <= j;
|
|
if (nextLoadPositionUs2 == nextLoadPositionUs || z3) {
|
|
z |= sequenceableLoader.continueLoading(j);
|
|
}
|
|
}
|
|
z2 |= z;
|
|
} while (z);
|
|
return z2;
|
|
}
|
|
|
|
@Override // com.google.android.exoplayer2.source.SequenceableLoader
|
|
public final long getBufferedPositionUs() {
|
|
long j = Long.MAX_VALUE;
|
|
for (SequenceableLoader sequenceableLoader : this.loaders) {
|
|
long bufferedPositionUs = sequenceableLoader.getBufferedPositionUs();
|
|
if (bufferedPositionUs != Long.MIN_VALUE) {
|
|
j = Math.min(j, bufferedPositionUs);
|
|
}
|
|
}
|
|
if (j == Long.MAX_VALUE) {
|
|
return Long.MIN_VALUE;
|
|
}
|
|
return j;
|
|
}
|
|
|
|
@Override // com.google.android.exoplayer2.source.SequenceableLoader
|
|
public final long getNextLoadPositionUs() {
|
|
long j = Long.MAX_VALUE;
|
|
for (SequenceableLoader sequenceableLoader : this.loaders) {
|
|
long nextLoadPositionUs = sequenceableLoader.getNextLoadPositionUs();
|
|
if (nextLoadPositionUs != Long.MIN_VALUE) {
|
|
j = Math.min(j, nextLoadPositionUs);
|
|
}
|
|
}
|
|
if (j == Long.MAX_VALUE) {
|
|
return Long.MIN_VALUE;
|
|
}
|
|
return j;
|
|
}
|
|
|
|
@Override // com.google.android.exoplayer2.source.SequenceableLoader
|
|
public boolean isLoading() {
|
|
for (SequenceableLoader sequenceableLoader : this.loaders) {
|
|
if (sequenceableLoader.isLoading()) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override // com.google.android.exoplayer2.source.SequenceableLoader
|
|
public final void reevaluateBuffer(long j) {
|
|
for (SequenceableLoader sequenceableLoader : this.loaders) {
|
|
sequenceableLoader.reevaluateBuffer(j);
|
|
}
|
|
}
|
|
}
|