FlixOlé v4.4.0版本的 MD5 值为:50e7f767ca3e8715936523e9ef089581
以下内容为反编译后的 g.java 源代码,内容仅作参考
package i.d.a.b.s4.r0;
import android.util.Pair;
import android.util.SparseArray;
import android.util.SparseIntArray;
import i.d.a.b.a4;
import i.d.a.b.j4.t1;
import i.d.a.b.m4.b0;
import i.d.a.b.m4.z;
import i.d.a.b.s4.e0;
import i.d.a.b.s4.j0;
import i.d.a.b.s4.m0;
import i.d.a.b.s4.q;
import i.d.a.b.s4.q0.i;
import i.d.a.b.s4.r0.e;
import i.d.a.b.s4.r0.m;
import i.d.a.b.s4.t;
import i.d.a.b.s4.z;
import i.d.a.b.u4.v;
import i.d.a.b.w4.g0;
import i.d.a.b.w4.i0;
import i.d.a.b.w4.n0;
import i.d.a.b.x2;
import i.d.a.b.x4.p0;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public final class g implements z, j0.a<i.d.a.b.s4.q0.i<e>>, i.b<e> {
public static final Pattern L = Pattern.compile("CC([1-4])=(.+)");
public static final Pattern M = Pattern.compile("([1-4])=lang:(\\w+)(,.+)?");
public final e0.a B;
public final z.a C;
public final t1 D;
public z.a E;
public j0 H;
public i.d.a.b.s4.r0.n.c I;
public int J;
public List<i.d.a.b.s4.r0.n.f> K;
public final int f4857n;
public final e.a f4858o;
public final n0 f4859p;
public final b0 f4860q;
public final g0 r;
public final d s;
public final long t;
public final i0 u;
public final i.d.a.b.w4.i v;
public final i.d.a.b.s4.n0 w;
public final a[] x;
public final q y;
public final m z;
public i.d.a.b.s4.q0.i<e>[] F = D(0);
public l[] G = new l[0];
public final IdentityHashMap<i.d.a.b.s4.q0.i<e>, m.c> A = new IdentityHashMap<>();
public static final class a {
public final int[] a;
public final int b;
public final int c;
public final int d;
public final int e;
public final int f4861f;
public final int f4862g;
public a(int i2, int i3, int[] iArr, int i4, int i5, int i6, int i7) {
this.b = i2;
this.a = iArr;
this.c = i3;
this.e = i4;
this.f4861f = i5;
this.f4862g = i6;
this.d = i7;
}
public static a a(int[] iArr, int i2) {
return new a(3, 1, iArr, i2, -1, -1, -1);
}
public static a b(int[] iArr, int i2) {
return new a(5, 1, iArr, i2, -1, -1, -1);
}
public static a c(int i2) {
return new a(5, 2, new int[0], -1, -1, -1, i2);
}
public static a d(int i2, int[] iArr, int i3, int i4, int i5) {
return new a(i2, 0, iArr, i3, i4, i5, -1);
}
}
public g(int i2, i.d.a.b.s4.r0.n.c cVar, d dVar, int i3, e.a aVar, n0 n0Var, b0 b0Var, z.a aVar2, g0 g0Var, e0.a aVar3, long j2, i0 i0Var, i.d.a.b.w4.i iVar, q qVar, m.b bVar, t1 t1Var) {
this.f4857n = i2;
this.I = cVar;
this.s = dVar;
this.J = i3;
this.f4858o = aVar;
this.f4859p = n0Var;
this.f4860q = b0Var;
this.C = aVar2;
this.r = g0Var;
this.B = aVar3;
this.t = j2;
this.u = i0Var;
this.v = iVar;
this.y = qVar;
this.D = t1Var;
this.z = new m(cVar, bVar, iVar);
this.H = qVar.a(this.F);
i.d.a.b.s4.r0.n.g d = cVar.d(i3);
List<i.d.a.b.s4.r0.n.f> list = d.d;
this.K = list;
Pair<i.d.a.b.s4.n0, a[]> o2 = o(b0Var, d.c, list);
this.w = (i.d.a.b.s4.n0) o2.first;
this.x = (a[]) o2.second;
}
public static boolean B(List<i.d.a.b.s4.r0.n.a> list, int[] iArr) {
for (int i2 : iArr) {
List<i.d.a.b.s4.r0.n.j> list2 = list.get(i2).c;
for (int i3 = 0; i3 < list2.size(); i3++) {
if (!list2.get(i3).d.isEmpty()) {
return true;
}
}
}
return false;
}
public static int C(int i2, List<i.d.a.b.s4.r0.n.a> list, int[][] iArr, boolean[] zArr, x2[][] x2VarArr) {
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
if (B(list, iArr[i4])) {
zArr[i4] = true;
i3++;
}
x2VarArr[i4] = x(list, iArr[i4]);
if (x2VarArr[i4].length != 0) {
i3++;
}
}
return i3;
}
public static i.d.a.b.s4.q0.i<e>[] D(int i2) {
return new i.d.a.b.s4.q0.i[i2];
}
public static x2[] F(i.d.a.b.s4.r0.n.e eVar, Pattern pattern, x2 x2Var) {
String str = eVar.b;
if (str == null) {
return new x2[]{x2Var};
}
String[] G0 = p0.G0(str, ";");
x2[] x2VarArr = new x2[G0.length];
for (int i2 = 0; i2 < G0.length; i2++) {
Matcher matcher = pattern.matcher(G0[i2]);
if (!matcher.matches()) {
return new x2[]{x2Var};
}
int parseInt = Integer.parseInt(matcher.group(1));
x2.b a2 = x2Var.a();
a2.U(x2Var.f5355n + ":" + parseInt);
a2.H(parseInt);
a2.X(matcher.group(2));
x2VarArr[i2] = a2.G();
}
return x2VarArr;
}
public static void j(List<i.d.a.b.s4.r0.n.f> list, m0[] m0VarArr, a[] aVarArr, int i2) {
int i3 = 0;
while (i3 < list.size()) {
i.d.a.b.s4.r0.n.f fVar = list.get(i3);
x2.b bVar = new x2.b();
bVar.U(fVar.a());
bVar.g0("application/x-emsg");
x2 G = bVar.G();
m0VarArr[i2] = new m0(fVar.a() + ":" + i3, G);
aVarArr[i2] = a.c(i3);
i3++;
i2++;
}
}
public static int k(b0 b0Var, List<i.d.a.b.s4.r0.n.a> list, int[][] iArr, int i2, boolean[] zArr, x2[][] x2VarArr, m0[] m0VarArr, a[] aVarArr) {
int i3;
int i4;
int i5 = 0;
int i6 = 0;
while (i5 < i2) {
int[] iArr2 = iArr[i5];
ArrayList arrayList = new ArrayList();
for (int i7 : iArr2) {
arrayList.addAll(list.get(i7).c);
}
int size = arrayList.size();
x2[] x2VarArr2 = new x2[size];
for (int i8 = 0; i8 < size; i8++) {
x2 x2Var = ((i.d.a.b.s4.r0.n.j) arrayList.get(i8)).a;
x2VarArr2[i8] = x2Var.b(b0Var.c(x2Var));
}
i.d.a.b.s4.r0.n.a aVar = list.get(iArr2[0]);
int i9 = aVar.a;
String num = i9 != -1 ? Integer.toString(i9) : "unset:" + i5;
int i10 = i6 + 1;
if (zArr[i5]) {
i3 = i10 + 1;
} else {
i3 = i10;
i10 = -1;
}
if (x2VarArr[i5].length != 0) {
i4 = i3 + 1;
} else {
i4 = i3;
i3 = -1;
}
m0VarArr[i6] = new m0(num, x2VarArr2);
aVarArr[i6] = a.d(aVar.b, iArr2, i6, i10, i3);
if (i10 != -1) {
String str = num + ":emsg";
x2.b bVar = new x2.b();
bVar.U(str);
bVar.g0("application/x-emsg");
m0VarArr[i10] = new m0(str, bVar.G());
aVarArr[i10] = a.b(iArr2, i6);
}
if (i3 != -1) {
m0VarArr[i3] = new m0(num + ":cc", x2VarArr[i5]);
aVarArr[i3] = a.a(iArr2, i6);
}
i5++;
i6 = i4;
}
return i6;
}
public static Pair<i.d.a.b.s4.n0, a[]> o(b0 b0Var, List<i.d.a.b.s4.r0.n.a> list, List<i.d.a.b.s4.r0.n.f> list2) {
int[][] y = y(list);
int length = y.length;
boolean[] zArr = new boolean[length];
x2[][] x2VarArr = new x2[length];
int C = C(length, list, y, zArr, x2VarArr) + length + list2.size();
m0[] m0VarArr = new m0[C];
a[] aVarArr = new a[C];
j(list2, m0VarArr, aVarArr, k(b0Var, list, y, length, zArr, x2VarArr, m0VarArr, aVarArr));
return Pair.create(new i.d.a.b.s4.n0(m0VarArr), aVarArr);
}
public static i.d.a.b.s4.r0.n.e t(List<i.d.a.b.s4.r0.n.e> list) {
return v(list, "urn:mpeg:dash:adaptation-set-switching:2016");
}
public static i.d.a.b.s4.r0.n.e v(List<i.d.a.b.s4.r0.n.e> list, String str) {
for (int i2 = 0; i2 < list.size(); i2++) {
i.d.a.b.s4.r0.n.e eVar = list.get(i2);
if (str.equals(eVar.a)) {
return eVar;
}
}
return null;
}
public static i.d.a.b.s4.r0.n.e w(List<i.d.a.b.s4.r0.n.e> list) {
return v(list, "http://dashif.org/guidelines/trickmode");
}
public static x2[] x(List<i.d.a.b.s4.r0.n.a> list, int[] iArr) {
x2 G;
Pattern pattern;
for (int i2 : iArr) {
i.d.a.b.s4.r0.n.a aVar = list.get(i2);
List<i.d.a.b.s4.r0.n.e> list2 = list.get(i2).d;
for (int i3 = 0; i3 < list2.size(); i3++) {
i.d.a.b.s4.r0.n.e eVar = list2.get(i3);
if ("urn:scte:dash:cc:cea-608:2015".equals(eVar.a)) {
x2.b bVar = new x2.b();
bVar.g0("application/cea-608");
bVar.U(aVar.a + ":cea608");
G = bVar.G();
pattern = L;
} else if ("urn:scte:dash:cc:cea-708:2015".equals(eVar.a)) {
x2.b bVar2 = new x2.b();
bVar2.g0("application/cea-708");
bVar2.U(aVar.a + ":cea708");
G = bVar2.G();
pattern = M;
}
return F(eVar, pattern, G);
}
}
return new x2[0];
}
public static int[][] y(List<i.d.a.b.s4.r0.n.a> list) {
int i2;
i.d.a.b.s4.r0.n.e t;
int size = list.size();
SparseIntArray sparseIntArray = new SparseIntArray(size);
ArrayList arrayList = new ArrayList(size);
SparseArray sparseArray = new SparseArray(size);
for (int i3 = 0; i3 < size; i3++) {
sparseIntArray.put(list.get(i3).a, i3);
ArrayList arrayList2 = new ArrayList();
arrayList2.add(Integer.valueOf(i3));
arrayList.add(arrayList2);
sparseArray.put(i3, arrayList2);
}
for (int i4 = 0; i4 < size; i4++) {
i.d.a.b.s4.r0.n.a aVar = list.get(i4);
i.d.a.b.s4.r0.n.e w = w(aVar.e);
if (w == null) {
w = w(aVar.f4881f);
}
if (w == null || (i2 = sparseIntArray.get(Integer.parseInt(w.b), -1)) == -1) {
i2 = i4;
}
if (i2 == i4 && (t = t(aVar.f4881f)) != null) {
for (String str : p0.G0(t.b, ",")) {
int i5 = sparseIntArray.get(Integer.parseInt(str), -1);
if (i5 != -1) {
i2 = Math.min(i2, i5);
}
}
}
if (i2 != i4) {
List list2 = (List) sparseArray.get(i4);
List list3 = (List) sparseArray.get(i2);
list3.addAll(list2);
sparseArray.put(i4, list3);
arrayList.remove(list2);
}
}
int size2 = arrayList.size();
int[][] iArr = new int[size2];
for (int i6 = 0; i6 < size2; i6++) {
iArr[i6] = i.d.b.e.c.j((Collection) arrayList.get(i6));
Arrays.sort(iArr[i6]);
}
return iArr;
}
public final int[] A(v[] vVarArr) {
int[] iArr = new int[vVarArr.length];
for (int i2 = 0; i2 < vVarArr.length; i2++) {
if (vVarArr[i2] != null) {
iArr[i2] = this.w.b(vVarArr[i2].a());
} else {
iArr[i2] = -1;
}
}
return iArr;
}
@Override
public void b(i.d.a.b.s4.q0.i<e> iVar) {
this.E.b(this);
}
public void G() {
this.z.o();
for (i.d.a.b.s4.q0.i<e> iVar : this.F) {
iVar.P(this);
}
this.E = null;
}
public final void H(v[] vVarArr, boolean[] zArr, i.d.a.b.s4.i0[] i0VarArr) {
for (int i2 = 0; i2 < vVarArr.length; i2++) {
if (vVarArr[i2] == null || !zArr[i2]) {
if (i0VarArr[i2] instanceof i.d.a.b.s4.q0.i) {
((i.d.a.b.s4.q0.i) i0VarArr[i2]).P(this);
} else if (i0VarArr[i2] instanceof i.a) {
((i.a) i0VarArr[i2]).d();
}
i0VarArr[i2] = null;
}
}
}
public final void I(v[] vVarArr, i.d.a.b.s4.i0[] i0VarArr, int[] iArr) {
for (int i2 = 0; i2 < vVarArr.length; i2++) {
if ((i0VarArr[i2] instanceof t) || (i0VarArr[i2] instanceof i.a)) {
int z = z(i2, iArr);
if (!(z == -1 ? i0VarArr[i2] instanceof t : (i0VarArr[i2] instanceof i.a) && ((i.a) i0VarArr[i2]).f4839n == i0VarArr[z])) {
if (i0VarArr[i2] instanceof i.a) {
((i.a) i0VarArr[i2]).d();
}
i0VarArr[i2] = null;
}
}
}
}
public final void J(v[] vVarArr, i.d.a.b.s4.i0[] i0VarArr, boolean[] zArr, long j2, int[] iArr) {
for (int i2 = 0; i2 < vVarArr.length; i2++) {
v vVar = vVarArr[i2];
if (vVar != null) {
if (i0VarArr[i2] == null) {
zArr[i2] = true;
a aVar = this.x[iArr[i2]];
int i3 = aVar.c;
if (i3 == 0) {
i0VarArr[i2] = l(aVar, vVar, j2);
} else if (i3 == 2) {
i0VarArr[i2] = new l(this.K.get(aVar.d), vVar.a().a(0), this.I.d);
}
} else if (i0VarArr[i2] instanceof i.d.a.b.s4.q0.i) {
((e) ((i.d.a.b.s4.q0.i) i0VarArr[i2]).E()).g(vVar);
}
}
}
for (int i4 = 0; i4 < vVarArr.length; i4++) {
if (i0VarArr[i4] == null && vVarArr[i4] != null) {
a aVar2 = this.x[iArr[i4]];
if (aVar2.c == 1) {
int z = z(i4, iArr);
if (z == -1) {
i0VarArr[i4] = new t();
} else {
i0VarArr[i4] = ((i.d.a.b.s4.q0.i) i0VarArr[z]).S(j2, aVar2.b);
}
}
}
}
}
public void K(i.d.a.b.s4.r0.n.c cVar, int i2) {
l[] lVarArr;
this.I = cVar;
this.J = i2;
this.z.q(cVar);
i.d.a.b.s4.q0.i<e>[] iVarArr = this.F;
if (iVarArr != null) {
for (i.d.a.b.s4.q0.i<e> iVar : iVarArr) {
iVar.E().d(cVar, i2);
}
this.E.b(this);
}
this.K = cVar.d(i2).d;
for (l lVar : this.G) {
Iterator<i.d.a.b.s4.r0.n.f> it = this.K.iterator();
while (true) {
if (it.hasNext()) {
i.d.a.b.s4.r0.n.f next = it.next();
if (next.a().equals(lVar.a())) {
boolean z = true;
lVar.e(next, (cVar.d && i2 == cVar.e() - 1) ? false : false);
}
}
}
}
}
@Override
public long a() {
return this.H.a();
}
@Override
public synchronized void c(i.d.a.b.s4.q0.i<e> iVar) {
m.c remove = this.A.remove(iVar);
if (remove != null) {
remove.n();
}
}
@Override
public boolean d(long j2) {
return this.H.d(j2);
}
@Override
public boolean e() {
return this.H.e();
}
@Override
public long f(long j2, a4 a4Var) {
i.d.a.b.s4.q0.i<e>[] iVarArr;
for (i.d.a.b.s4.q0.i<e> iVar : this.F) {
if (iVar.f4835n == 2) {
return iVar.f(j2, a4Var);
}
}
return j2;
}
@Override
public long g() {
return this.H.g();
}
@Override
public void h(long j2) {
this.H.h(j2);
}
public final i.d.a.b.s4.q0.i<e> l(a aVar, v vVar, long j2) {
m0 m0Var;
int i2;
m0 m0Var2;
int i3;
int i4 = aVar.f4861f;
boolean z = i4 != -1;
m.c cVar = null;
if (z) {
m0Var = this.w.a(i4);
i2 = 1;
} else {
m0Var = null;
i2 = 0;
}
int i5 = aVar.f4862g;
boolean z2 = i5 != -1;
if (z2) {
m0Var2 = this.w.a(i5);
i2 += m0Var2.f4792n;
} else {
m0Var2 = null;
}
x2[] x2VarArr = new x2[i2];
int[] iArr = new int[i2];
if (z) {
x2VarArr[0] = m0Var.a(0);
iArr[0] = 5;
i3 = 1;
} else {
i3 = 0;
}
ArrayList arrayList = new ArrayList();
if (z2) {
for (int i6 = 0; i6 < m0Var2.f4792n; i6++) {
x2VarArr[i3] = m0Var2.a(i6);
iArr[i3] = 3;
arrayList.add(x2VarArr[i3]);
i3++;
}
}
if (this.I.d && z) {
cVar = this.z.k();
}
m.c cVar2 = cVar;
i.d.a.b.s4.q0.i<e> iVar = new i.d.a.b.s4.q0.i<>(aVar.b, iArr, x2VarArr, this.f4858o.a(this.u, this.I, this.s, this.J, aVar.a, vVar, aVar.b, this.t, z, arrayList, cVar2, this.f4859p, this.D), this, this.v, j2, this.f4860q, this.C, this.r, this.B);
synchronized (this) {
this.A.put(iVar, cVar2);
}
return iVar;
}
@Override
public void m() throws IOException {
this.u.b();
}
@Override
public long n(long j2) {
for (i.d.a.b.s4.q0.i<e> iVar : this.F) {
iVar.R(j2);
}
for (l lVar : this.G) {
lVar.d(j2);
}
return j2;
}
@Override
public long p() {
return -9223372036854775807L;
}
@Override
public void q(z.a aVar, long j2) {
this.E = aVar;
aVar.i(this);
}
@Override
public long r(v[] vVarArr, boolean[] zArr, i.d.a.b.s4.i0[] i0VarArr, boolean[] zArr2, long j2) {
int[] A = A(vVarArr);
H(vVarArr, zArr, i0VarArr);
I(vVarArr, i0VarArr, A);
J(vVarArr, i0VarArr, zArr2, j2, A);
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (i.d.a.b.s4.i0 i0Var : i0VarArr) {
if (i0Var instanceof i.d.a.b.s4.q0.i) {
arrayList.add((i.d.a.b.s4.q0.i) i0Var);
} else if (i0Var instanceof l) {
arrayList2.add((l) i0Var);
}
}
i.d.a.b.s4.q0.i<e>[] D = D(arrayList.size());
this.F = D;
arrayList.toArray(D);
l[] lVarArr = new l[arrayList2.size()];
this.G = lVarArr;
arrayList2.toArray(lVarArr);
this.H = this.y.a(this.F);
return j2;
}
@Override
public i.d.a.b.s4.n0 s() {
return this.w;
}
@Override
public void u(long j2, boolean z) {
for (i.d.a.b.s4.q0.i<e> iVar : this.F) {
iVar.u(j2, z);
}
}
public final int z(int i2, int[] iArr) {
int i3 = iArr[i2];
if (i3 == -1) {
return -1;
}
int i4 = this.x[i3].e;
for (int i5 = 0; i5 < iArr.length; i5++) {
int i6 = iArr[i5];
if (i6 == i4 && this.x[i6].c == 0) {
return i5;
}
}
return -1;
}
}