128 lines
3.2 KiB
Java
128 lines
3.2 KiB
Java
package c.i.a.c.f2;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.google.android.exoplayer2.Format;
|
|
import com.google.android.exoplayer2.source.TrackGroup;
|
|
import java.util.Arrays;
|
|
import java.util.Objects;
|
|
/* compiled from: BaseTrackSelection */
|
|
public abstract class e implements g {
|
|
public final TrackGroup a;
|
|
public final int b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final int[] f855c;
|
|
public final Format[] d;
|
|
public int e;
|
|
|
|
public e(TrackGroup trackGroup, int... iArr) {
|
|
AnimatableValueParser.D(iArr.length > 0);
|
|
Objects.requireNonNull(trackGroup);
|
|
this.a = trackGroup;
|
|
int length = iArr.length;
|
|
this.b = length;
|
|
this.d = new Format[length];
|
|
for (int i = 0; i < iArr.length; i++) {
|
|
this.d[i] = trackGroup.j[iArr[i]];
|
|
}
|
|
Arrays.sort(this.d, a.i);
|
|
this.f855c = new int[this.b];
|
|
int i2 = 0;
|
|
while (true) {
|
|
int i3 = this.b;
|
|
if (i2 < i3) {
|
|
int[] iArr2 = this.f855c;
|
|
Format format = this.d[i2];
|
|
int i4 = 0;
|
|
while (true) {
|
|
Format[] formatArr = trackGroup.j;
|
|
if (i4 >= formatArr.length) {
|
|
i4 = -1;
|
|
break;
|
|
} else if (format == formatArr[i4]) {
|
|
break;
|
|
} else {
|
|
i4++;
|
|
}
|
|
}
|
|
iArr2[i2] = i4;
|
|
i2++;
|
|
} else {
|
|
long[] jArr = new long[i3];
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.j
|
|
public final TrackGroup a() {
|
|
return this.a;
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public /* synthetic */ void c(boolean z2) {
|
|
f.b(this, z2);
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.j
|
|
public final Format d(int i) {
|
|
return this.d[i];
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public void e() {
|
|
}
|
|
|
|
public boolean equals(@Nullable Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null || getClass() != obj.getClass()) {
|
|
return false;
|
|
}
|
|
e eVar = (e) obj;
|
|
return this.a == eVar.a && Arrays.equals(this.f855c, eVar.f855c);
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.j
|
|
public final int f(int i) {
|
|
return this.f855c[i];
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public void g() {
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public final Format h() {
|
|
return this.d[b()];
|
|
}
|
|
|
|
public int hashCode() {
|
|
if (this.e == 0) {
|
|
this.e = Arrays.hashCode(this.f855c) + (System.identityHashCode(this.a) * 31);
|
|
}
|
|
return this.e;
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public void i(float f) {
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public /* synthetic */ void j() {
|
|
f.a(this);
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.g
|
|
public /* synthetic */ void k() {
|
|
f.c(this);
|
|
}
|
|
|
|
@Override // c.i.a.c.f2.j
|
|
public final int length() {
|
|
return this.f855c.length;
|
|
}
|
|
}
|