正在查看: All File Recovery v1.0.2 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: All File Recovery v1.0.2 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package k2;
import C2.r;
import S.w;
import X1.C0587k;
import X1.C0613q;
import X1.C0635z;
import X1.M;
import X1.W;
import X1.Z;
import a2.C0672D;
import a2.C0679a;
import a2.i0;
import a2.j0;
import a2.u0;
import a2.v0;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
import android.util.Xml;
import androidx.annotation.Nullable;
import h2.G1;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.RoundingMode;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import k2.k;
import org.xml.sax.helpers.DefaultHandler;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xmlpull.v1.XmlSerializer;
import r1.C1608a;
import s8.Q;
import v8.M2;
import v8.y3;
@i0
public class d extends DefaultHandler implements r.a<c> {
public static final String f27705b = "MpdParser";
public static final Pattern f27706c = Pattern.compile("(\\d+)(?:/(\\d+))?");
public static final Pattern f27707d = Pattern.compile("CC([1-4])=.*");
public static final Pattern f27708e = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");
public static final int[] f27709f = {2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2};
public static final int[] f27710g = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};
public final XmlPullParserFactory f27711a;
public static final class a {
public final C0635z f27712a;
public final M2<C1330b> f27713b;
public final k f27714c;
@Nullable
public final String f27715d;
public final ArrayList<C0613q.b> f27716e;
public final ArrayList<e> f27717f;
public final long f27718g;
public final List<e> f27719h;
public final List<e> f27720i;
public a(C0635z c0635z, List<C1330b> list, k kVar, @Nullable String str, ArrayList<C0613q.b> arrayList, ArrayList<e> arrayList2, List<e> list2, List<e> list3, long j4) {
this.f27712a = c0635z;
this.f27713b = M2.o(list);
this.f27714c = kVar;
this.f27715d = str;
this.f27716e = arrayList;
this.f27717f = arrayList2;
this.f27719h = list2;
this.f27720i = list3;
this.f27718g = j4;
}
}
public d() {
try {
this.f27711a = XmlPullParserFactory.newInstance();
} catch (XmlPullParserException e4) {
throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e4);
}
}
public static int C(List<e> list) {
String str;
for (int i4 = 0; i4 < list.size(); i4++) {
e eVar = list.get(i4);
if ("urn:scte:dash:cc:cea-608:2015".equals(eVar.f27721a) && (str = eVar.f27722b) != null) {
Matcher matcher = f27707d.matcher(str);
if (matcher.matches()) {
return Integer.parseInt(matcher.group(1));
}
C0672D.n(f27705b, "Unable to parse CEA-608 channel number from: " + eVar.f27722b);
}
}
return -1;
}
public static int D(List<e> list) {
String str;
for (int i4 = 0; i4 < list.size(); i4++) {
e eVar = list.get(i4);
if ("urn:scte:dash:cc:cea-708:2015".equals(eVar.f27721a) && (str = eVar.f27722b) != null) {
Matcher matcher = f27708e.matcher(str);
if (matcher.matches()) {
return Integer.parseInt(matcher.group(1));
}
C0672D.n(f27705b, "Unable to parse CEA-708 service block number from: " + eVar.f27722b);
}
}
return -1;
}
public static long G(XmlPullParser xmlPullParser, String str, long j4) throws Z {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j4 : u0.M1(attributeValue);
}
public static e H(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
String t02 = t0(xmlPullParser, "schemeIdUri", "");
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue == null) {
attributeValue = null;
}
String attributeValue2 = xmlPullParser.getAttributeValue(null, "id");
String str2 = attributeValue2 != null ? attributeValue2 : null;
do {
xmlPullParser.next();
} while (!v0.d(xmlPullParser, str));
return new e(t02, attributeValue, str2);
}
public static int I(XmlPullParser xmlPullParser, String str) {
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue == null || attributeValue.length() != 6) {
return -1;
}
int parseInt = Integer.parseInt(attributeValue, 16);
return (8388608 & parseInt) != 0 ? K(str) : J(parseInt);
}
public static int J(int i4) {
int i5 = 0;
int i7 = 0;
while (true) {
int[] iArr = f27709f;
if (i5 >= iArr.length) {
break;
}
i7 += ((i4 >> i5) & 1) * iArr[i5];
i5++;
}
if (i7 == 0) {
return -1;
}
return i7;
}
public static int K(String str) {
String[] n22 = u0.n2(str);
if (n22.length == 0) {
return -1;
}
List o4 = Q.h('.').o(s8.c.g(n22[0].trim()));
if (o4.size() != 4 || !((String) o4.get(0)).equals("ac-4")) {
return -1;
}
String str2 = (String) o4.get(3);
str2.getClass();
if (str2.equals("03")) {
return 18;
}
return !str2.equals("04") ? -1 : 21;
}
public static int L(XmlPullParser xmlPullParser) {
char c4;
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue == null) {
return -1;
}
String g4 = s8.c.g(attributeValue);
g4.getClass();
switch (g4.hashCode()) {
case 1596796:
if (g4.equals("4000")) {
c4 = 0;
break;
}
c4 = 65535;
break;
case 2937391:
if (g4.equals("a000")) {
c4 = 1;
break;
}
c4 = 65535;
break;
case 3094034:
if (g4.equals("f800")) {
c4 = 2;
break;
}
c4 = 65535;
break;
case 3094035:
if (g4.equals("f801")) {
c4 = 3;
break;
}
c4 = 65535;
break;
case 3133436:
if (g4.equals("fa01")) {
c4 = 4;
break;
}
c4 = 65535;
break;
default:
c4 = 65535;
break;
}
switch (c4) {
}
return -1;
}
public static int M(XmlPullParser xmlPullParser) {
int W3 = W(xmlPullParser, "value", -1);
if (W3 <= 0 || W3 >= 33) {
return -1;
}
return W3;
}
public static int N(XmlPullParser xmlPullParser) {
int bitCount;
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue == null || (bitCount = Integer.bitCount(Integer.parseInt(attributeValue, 16))) == 0) {
return -1;
}
return bitCount;
}
public static long O(XmlPullParser xmlPullParser, String str, long j4) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j4 : u0.N1(attributeValue);
}
public static String P(List<e> list) {
for (int i4 = 0; i4 < list.size(); i4++) {
e eVar = list.get(i4);
String str = eVar.f27721a;
if ("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str) && "JOC".equals(eVar.f27722b)) {
return W.f8638U;
}
if ("tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str) && W.f8664e1.equals(eVar.f27722b)) {
return W.f8638U;
}
}
return W.f8636T;
}
public static float T(XmlPullParser xmlPullParser, String str, float f4) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? f4 : Float.parseFloat(attributeValue);
}
public static float U(XmlPullParser xmlPullParser, float f4) {
String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
if (attributeValue != null) {
Matcher matcher = f27706c.matcher(attributeValue);
if (matcher.matches()) {
int parseInt = Integer.parseInt(matcher.group(1));
return !TextUtils.isEmpty(matcher.group(2)) ? parseInt / Integer.parseInt(r2) : parseInt;
}
}
return f4;
}
public static int W(XmlPullParser xmlPullParser, String str, int i4) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? i4 : Integer.parseInt(attributeValue);
}
public static long Y(List<e> list) {
for (int i4 = 0; i4 < list.size(); i4++) {
e eVar = list.get(i4);
if (s8.c.a("http://dashif.org/guidelines/last-segment-number", eVar.f27721a)) {
return Long.parseLong(eVar.f27722b);
}
}
return -1L;
}
public static long Z(XmlPullParser xmlPullParser, String str, long j4) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j4 : Long.parseLong(attributeValue);
}
public static int b0(XmlPullParser xmlPullParser) {
int W3 = W(xmlPullParser, "value", -1);
if (W3 >= 0) {
int[] iArr = f27710g;
if (W3 < iArr.length) {
return iArr[W3];
}
}
return -1;
}
public static int o(int i4, int i5) {
if (i4 == -1) {
return i5;
}
if (i5 == -1) {
return i4;
}
C0679a.i(i4 == i5);
return i4;
}
@Nullable
public static String p(@Nullable String str, @Nullable String str2) {
if (str == null) {
return str2;
}
if (str2 == null) {
return str;
}
C0679a.i(str.equals(str2));
return str;
}
public static void q(ArrayList<C0613q.b> arrayList) {
String str;
int i4 = 0;
while (true) {
if (i4 >= arrayList.size()) {
str = null;
break;
}
C0613q.b bVar = arrayList.get(i4);
if (C0587k.f9208m2.equals(bVar.f9325b) && (str = bVar.f9326c) != null) {
arrayList.remove(i4);
break;
}
i4++;
}
if (str == null) {
return;
}
for (int i5 = 0; i5 < arrayList.size(); i5++) {
C0613q.b bVar2 = arrayList.get(i5);
if (C0587k.f9203l2.equals(bVar2.f9325b) && bVar2.f9326c == null) {
arrayList.set(i5, new C0613q.b(C0587k.f9208m2, str, bVar2.f9327d, bVar2.f9328e));
}
}
}
public static void r(ArrayList<C0613q.b> arrayList) {
for (int size = arrayList.size() - 1; size >= 0; size--) {
C0613q.b bVar = arrayList.get(size);
if (!bVar.c()) {
int i4 = 0;
while (true) {
if (i4 >= arrayList.size()) {
break;
}
if (arrayList.get(i4).a(bVar)) {
arrayList.remove(size);
break;
}
i4++;
}
}
}
}
public static long s(long j4, long j5) {
if (j5 != C0587k.f9150b) {
j4 = j5;
}
return j4 == Long.MAX_VALUE ? C0587k.f9150b : j4;
}
@Nullable
public static String t(@Nullable String str, @Nullable String str2) {
if (W.q(str)) {
return W.c(str2);
}
if (W.v(str)) {
return W.p(str2);
}
if (W.u(str) || W.s(str)) {
return str;
}
if (!W.f8694s0.equals(str)) {
return null;
}
String g4 = W.g(str2);
return W.f8688p0.equals(g4) ? W.f8607E0 : g4;
}
public static String t0(XmlPullParser xmlPullParser, String str, String str2) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? str2 : attributeValue;
}
public static String u0(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
String str2 = "";
do {
xmlPullParser.next();
if (xmlPullParser.getEventType() == 4) {
str2 = xmlPullParser.getText();
} else {
v(xmlPullParser);
}
} while (!v0.d(xmlPullParser, str));
return str2;
}
public static void v(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
if (v0.e(xmlPullParser)) {
int i4 = 1;
while (i4 != 0) {
xmlPullParser.next();
if (xmlPullParser.getEventType() == 2) {
i4++;
} else if (xmlPullParser.getEventType() == 3) {
i4--;
}
}
}
}
public long A(XmlPullParser xmlPullParser, long j4) {
String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset");
if (attributeValue == null) {
return j4;
}
if ("INF".equals(attributeValue)) {
return Long.MAX_VALUE;
}
return (long) (Float.parseFloat(attributeValue) * 1000000.0f);
}
public List<C1330b> B(XmlPullParser xmlPullParser, List<C1330b> list, boolean z3) throws XmlPullParserException, IOException {
String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority");
int parseInt = attributeValue != null ? Integer.parseInt(attributeValue) : z3 ? 1 : Integer.MIN_VALUE;
String attributeValue2 = xmlPullParser.getAttributeValue(null, "dvb:weight");
int parseInt2 = attributeValue2 != null ? Integer.parseInt(attributeValue2) : 1;
String attributeValue3 = xmlPullParser.getAttributeValue(null, "serviceLocation");
String u02 = u0(xmlPullParser, "BaseURL");
if (j0.c(u02)) {
if (attributeValue3 == null) {
attributeValue3 = u02;
}
return y3.t(new C1330b[]{new C1330b(u02, attributeValue3, parseInt, parseInt2)});
}
ArrayList arrayList = new ArrayList();
for (int i4 = 0; i4 < list.size(); i4++) {
C1330b c1330b = list.get(i4);
String f4 = j0.f(c1330b.f27688a, u02);
String str = attributeValue3 == null ? f4 : attributeValue3;
if (z3) {
parseInt = c1330b.f27690c;
parseInt2 = c1330b.f27691d;
str = c1330b.f27689b;
}
arrayList.add(new C1330b(f4, str, parseInt, parseInt2));
}
return arrayList;
}
public android.util.Pair<java.lang.String, X1.C0613q.b> E(org.xmlpull.v1.XmlPullParser r12) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: k2.d.E(org.xmlpull.v1.XmlPullParser):android.util.Pair");
}
public int F(XmlPullParser xmlPullParser) {
String attributeValue = xmlPullParser.getAttributeValue(null, "contentType");
if (TextUtils.isEmpty(attributeValue)) {
return -1;
}
if (W.f8653b.equals(attributeValue)) {
return 1;
}
if ("video".equals(attributeValue)) {
return 2;
}
if ("text".equals(attributeValue)) {
return 3;
}
return "image".equals(attributeValue) ? 4 : -1;
}
public Pair<Long, S2.a> Q(XmlPullParser xmlPullParser, String str, String str2, long j4, long j5, ByteArrayOutputStream byteArrayOutputStream) throws IOException, XmlPullParserException {
ByteArrayOutputStream byteArrayOutputStream2;
d dVar;
long Z3 = Z(xmlPullParser, "id", 0L);
String str3 = null;
String attributeValue = xmlPullParser.getAttributeValue(null, "duration");
long parseLong = attributeValue == null ? C0587k.f9150b : Long.parseLong(attributeValue);
String attributeValue2 = xmlPullParser.getAttributeValue(null, "presentationTime");
long parseLong2 = attributeValue2 != null ? Long.parseLong(attributeValue2) : 0L;
long X12 = u0.X1(parseLong, 1000L, j4);
long a22 = u0.a2(parseLong2 - j5, 1000000L, j4, RoundingMode.DOWN);
String attributeValue3 = xmlPullParser.getAttributeValue(null, "messageData");
if (attributeValue3 == null) {
dVar = this;
byteArrayOutputStream2 = byteArrayOutputStream;
} else {
str3 = attributeValue3;
byteArrayOutputStream2 = byteArrayOutputStream;
dVar = this;
}
byte[] R3 = dVar.R(xmlPullParser, byteArrayOutputStream2);
Long valueOf = Long.valueOf(a22);
if (str3 != null) {
R3 = str3.getBytes(StandardCharsets.UTF_8);
}
return Pair.create(valueOf, dVar.c(str, str2, Z3, X12, R3));
}
public byte[] R(XmlPullParser xmlPullParser, ByteArrayOutputStream byteArrayOutputStream) throws XmlPullParserException, IOException {
byteArrayOutputStream.reset();
XmlSerializer newSerializer = Xml.newSerializer();
newSerializer.setOutput(byteArrayOutputStream, StandardCharsets.UTF_8.name());
xmlPullParser.nextToken();
while (!v0.d(xmlPullParser, "Event")) {
switch (xmlPullParser.getEventType()) {
case 0:
newSerializer.startDocument(null, Boolean.FALSE);
break;
case 1:
newSerializer.endDocument();
break;
case 2:
newSerializer.startTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
for (int i4 = 0; i4 < xmlPullParser.getAttributeCount(); i4++) {
newSerializer.attribute(xmlPullParser.getAttributeNamespace(i4), xmlPullParser.getAttributeName(i4), xmlPullParser.getAttributeValue(i4));
}
break;
case 3:
newSerializer.endTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
break;
case 4:
newSerializer.text(xmlPullParser.getText());
break;
case 5:
newSerializer.cdsect(xmlPullParser.getText());
break;
case 6:
newSerializer.entityRef(xmlPullParser.getText());
break;
case 7:
newSerializer.ignorableWhitespace(xmlPullParser.getText());
break;
case 8:
newSerializer.processingInstruction(xmlPullParser.getText());
break;
case 9:
newSerializer.comment(xmlPullParser.getText());
break;
case 10:
newSerializer.docdecl(xmlPullParser.getText());
break;
}
xmlPullParser.nextToken();
}
newSerializer.flush();
return byteArrayOutputStream.toByteArray();
}
public f S(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
long j4;
String str;
String str2;
XmlPullParser xmlPullParser2;
String t02 = t0(xmlPullParser, "schemeIdUri", "");
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
String str3 = attributeValue == null ? "" : attributeValue;
String attributeValue2 = xmlPullParser.getAttributeValue(null, "timescale");
long parseLong = attributeValue2 == null ? 1L : Long.parseLong(attributeValue2);
String attributeValue3 = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
long parseLong2 = attributeValue3 == null ? 0L : Long.parseLong(attributeValue3);
ArrayList arrayList = new ArrayList();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(512);
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Event")) {
j4 = parseLong;
str = str3;
str2 = t02;
xmlPullParser2 = xmlPullParser;
arrayList.add(Q(xmlPullParser2, str2, str, j4, parseLong2, byteArrayOutputStream));
} else {
j4 = parseLong;
str = str3;
str2 = t02;
xmlPullParser2 = xmlPullParser;
v(xmlPullParser2);
}
if (v0.d(xmlPullParser2, "EventStream")) {
break;
}
xmlPullParser = xmlPullParser2;
t02 = str2;
str3 = str;
parseLong = j4;
}
long[] jArr = new long[arrayList.size()];
S2.a[] aVarArr = new S2.a[arrayList.size()];
for (int i4 = 0; i4 < arrayList.size(); i4++) {
Pair pair = (Pair) arrayList.get(i4);
jArr[i4] = ((Long) pair.first).longValue();
aVarArr[i4] = (S2.a) pair.second;
}
return d(str2, str, j4, jArr, aVarArr);
}
public i V(XmlPullParser xmlPullParser) {
return f0(xmlPullParser, "sourceURL", "range");
}
public M X(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
return new M(xmlPullParser.getAttributeValue(null, n3.f.f30447u), u0(xmlPullParser, "Label"));
}
public final long a(List<k.d> list, long j4, long j5, int i4, long j7) {
int r3 = i4 >= 0 ? i4 + 1 : (int) u0.r(j7 - j4, j5);
for (int i5 = 0; i5 < r3; i5++) {
list.add(l(j4, j5));
j4 += j5;
}
return j4;
}
public k2.c a0(org.xmlpull.v1.XmlPullParser r40, android.net.Uri r41) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: k2.d.a0(org.xmlpull.v1.XmlPullParser, android.net.Uri):k2.c");
}
public C1329a b(long j4, int i4, List<j> list, List<e> list2, List<e> list3, List<e> list4) {
return new C1329a(j4, i4, list, list2, list3, list4);
}
public S2.a c(String str, String str2, long j4, long j5, byte[] bArr) {
return new S2.a(str, str2, j5, j4, bArr);
}
public android.util.Pair<k2.g, java.lang.Long> c0(org.xmlpull.v1.XmlPullParser r33, java.util.List<k2.C1330b> r34, long r35, long r37, long r39, long r41, boolean r43) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: k2.d.c0(org.xmlpull.v1.XmlPullParser, java.util.List, long, long, long, long, boolean):android.util.Pair");
}
public f d(String str, String str2, long j4, long[] jArr, S2.a[] aVarArr) {
return new f(str, str2, j4, jArr, aVarArr);
}
public String[] d0(XmlPullParser xmlPullParser, String str, String[] strArr) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? strArr : attributeValue.split(",");
}
public C0635z e(@Nullable String str, @Nullable String str2, int i4, int i5, float f4, int i7, int i8, int i9, @Nullable String str3, List<e> list, List<e> list2, @Nullable String str4, @Nullable String str5, @Nullable String str6, List<e> list3, List<e> list4) {
String str7 = str5;
String str8 = str4;
String t3 = t(str2, str8);
if (W.f8636T.equals(t3)) {
t3 = P(list4);
if (W.f8638U.equals(t3)) {
str8 = W.f8664e1;
}
}
if (W.r(str8, str7)) {
if (str7 == null) {
str7 = str8;
}
t3 = W.f8703x;
str8 = str7;
}
int r02 = r0(list);
int k02 = k0(list) | h0(list2) | j0(list3) | j0(list4);
Pair<Integer, Integer> v02 = v0(list3);
C0635z.b bVar = new C0635z.b();
bVar.f9647a = str;
bVar.f9659m = W.w(str2);
bVar.f9660n = W.w(t3);
bVar.f9656j = str8;
bVar.f9655i = i9;
bVar.f9651e = r02;
bVar.f9652f = k02;
bVar.f9650d = str3;
int i10 = -1;
bVar.f9644K = v02 != null ? ((Integer) v02.first).intValue() : -1;
bVar.f9645L = v02 != null ? ((Integer) v02.second).intValue() : -1;
if (W.v(t3)) {
bVar.f9667u = i4;
bVar.f9668v = i5;
bVar.f9669w = f4;
} else if (W.q(t3)) {
bVar.f9637D = i7;
bVar.f9638E = i8;
} else if (W.u(t3)) {
if (W.f8708z0.equals(t3)) {
i10 = C(list2);
} else if (W.f8599A0.equals(t3)) {
i10 = D(list2);
}
bVar.f9642I = i10;
} else if (W.s(t3)) {
bVar.f9667u = i4;
bVar.f9668v = i5;
}
return new C0635z(bVar);
}
public h e0(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
String str = null;
String t02 = t0(xmlPullParser, "moreInformationURL", null);
String attributeValue = xmlPullParser.getAttributeValue(null, n3.f.f30447u);
String str2 = attributeValue == null ? null : attributeValue;
String str3 = null;
String str4 = null;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Title")) {
str = xmlPullParser.nextText();
} else if (v0.f(xmlPullParser, "Source")) {
str3 = xmlPullParser.nextText();
} else if (v0.f(xmlPullParser, C1608a.f32348a0)) {
str4 = xmlPullParser.nextText();
} else {
v(xmlPullParser);
}
String str5 = str3;
String str6 = str;
String str7 = str4;
if (v0.d(xmlPullParser, "ProgramInformation")) {
return new h(str6, str5, str7, t02, str2);
}
str = str6;
str3 = str5;
str4 = str7;
}
}
public c f(long j4, long j5, long j7, boolean z3, long j8, long j9, long j10, long j11, @Nullable h hVar, @Nullable o oVar, @Nullable l lVar, @Nullable Uri uri, List<g> list) {
return new c(j4, j5, j7, z3, j8, j9, j10, j11, hVar, oVar, lVar, uri, list);
}
public i f0(XmlPullParser xmlPullParser, String str, String str2) {
long j4;
String attributeValue = xmlPullParser.getAttributeValue(null, str);
String attributeValue2 = xmlPullParser.getAttributeValue(null, str2);
long j5 = -1;
if (attributeValue2 != null) {
String[] split = attributeValue2.split("-");
j4 = Long.parseLong(split[0]);
if (split.length == 2) {
j5 = (Long.parseLong(split[1]) - j4) + 1;
}
} else {
j4 = 0;
}
return h(attributeValue, j4, j5);
}
public g g(@Nullable String str, long j4, List<C1329a> list, List<f> list2, @Nullable e eVar) {
return new g(str, j4, list, list2, eVar);
}
public k2.d.a g0(org.xmlpull.v1.XmlPullParser r35, java.util.List<k2.C1330b> r36, @androidx.annotation.Nullable java.lang.String r37, @androidx.annotation.Nullable java.lang.String r38, @androidx.annotation.Nullable java.lang.String r39, @androidx.annotation.Nullable java.lang.String r40, int r41, int r42, float r43, int r44, int r45, @androidx.annotation.Nullable java.lang.String r46, java.util.List<k2.e> r47, java.util.List<k2.e> r48, java.util.List<k2.e> r49, java.util.List<k2.e> r50, @androidx.annotation.Nullable k2.k r51, long r52, long r54, long r56, long r58, long r60, boolean r62) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: k2.d.g0(org.xmlpull.v1.XmlPullParser, java.util.List, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int, float, int, int, java.lang.String, java.util.List, java.util.List, java.util.List, java.util.List, k2.k, long, long, long, long, long, boolean):k2.d$a");
}
public i h(String str, long j4, long j5) {
return new i(str, j4, j5);
}
public int h0(List<e> list) {
int w02;
int i4 = 0;
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = list.get(i5);
if (s8.c.a("urn:mpeg:dash:role:2011", eVar.f27721a)) {
w02 = i0(eVar.f27722b);
} else if (s8.c.a("urn:tva:metadata:cs:AudioPurposeCS:2007", eVar.f27721a)) {
w02 = w0(eVar.f27722b);
}
i4 |= w02;
}
return i4;
}
public j i(a aVar, @Nullable String str, List<M> list, @Nullable String str2, ArrayList<C0613q.b> arrayList, ArrayList<e> arrayList2) {
C0635z c0635z = aVar.f27712a;
C0635z.b a4 = G1.a(c0635z, c0635z);
if (str == null || !list.isEmpty()) {
a4.i0(list);
} else {
a4.f9648b = str;
}
String str3 = aVar.f27715d;
if (str3 == null) {
str3 = str2;
}
ArrayList<C0613q.b> arrayList3 = aVar.f27716e;
arrayList3.addAll(arrayList);
if (!arrayList3.isEmpty()) {
q(arrayList3);
r(arrayList3);
a4.f9664r = new C0613q(str3, arrayList3);
}
ArrayList<e> arrayList4 = aVar.f27717f;
arrayList4.addAll(arrayList2);
return j.o(aVar.f27718g, new C0635z(a4), aVar.f27713b, aVar.f27714c, arrayList4, aVar.f27719h, aVar.f27720i, null);
}
public int i0(@Nullable String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
public k.b j(i iVar, long j4, long j5, long j7, long j8, @Nullable List<k.d> list, long j9, @Nullable List<i> list2, long j10, long j11) {
return new k.b(iVar, j4, j5, j7, j8, list, j9, list2, u0.D1(j10), u0.D1(j11));
}
public int j0(List<e> list) {
int i4 = 0;
for (int i5 = 0; i5 < list.size(); i5++) {
if (s8.c.a("http://dashif.org/guidelines/trickmode", list.get(i5).f27721a)) {
i4 = 16384;
}
}
return i4;
}
public k.c k(i iVar, long j4, long j5, long j7, long j8, long j9, List<k.d> list, long j10, @Nullable n nVar, @Nullable n nVar2, long j11, long j12) {
return new k.c(iVar, j4, j5, j7, j8, j9, list, j10, nVar, nVar2, u0.D1(j11), u0.D1(j12));
}
public int k0(List<e> list) {
int i4 = 0;
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = list.get(i5);
if (s8.c.a("urn:mpeg:dash:role:2011", eVar.f27721a)) {
i4 |= i0(eVar.f27722b);
}
}
return i4;
}
public k.d l(long j4, long j5) {
return new k.d(j4, j5);
}
public k.e l0(XmlPullParser xmlPullParser, @Nullable k.e eVar) throws XmlPullParserException, IOException {
long Z3 = Z(xmlPullParser, "timescale", eVar != null ? eVar.f27759b : 1L);
long j4 = eVar != null ? eVar.f27760c : 0L;
String attributeValue = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
if (attributeValue != null) {
j4 = Long.parseLong(attributeValue);
}
long j5 = eVar != null ? eVar.f27773d : 0L;
long j7 = eVar != null ? eVar.f27774e : 0L;
String attributeValue2 = xmlPullParser.getAttributeValue(null, "indexRange");
if (attributeValue2 != null) {
String[] split = attributeValue2.split("-");
j5 = Long.parseLong(split[0]);
j7 = (Long.parseLong(split[1]) - j5) + 1;
}
long j8 = j7;
long j9 = j5;
i iVar = eVar != null ? eVar.f27758a : null;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Initialization")) {
iVar = V(xmlPullParser);
} else {
v(xmlPullParser);
}
i iVar2 = iVar;
if (v0.d(xmlPullParser, "SegmentBase")) {
return m(iVar2, Z3, j4, j9, j8);
}
iVar = iVar2;
}
}
public k.e m(i iVar, long j4, long j5, long j7, long j8) {
return new k.e(iVar, j4, j5, j7, j8);
}
public k.b m0(XmlPullParser xmlPullParser, @Nullable k.b bVar, long j4, long j5, long j7, long j8, long j9) throws XmlPullParserException, IOException {
long j10;
long Z3 = Z(xmlPullParser, "timescale", bVar != null ? bVar.f27759b : 1L);
long j11 = bVar != null ? bVar.f27760c : 0L;
List<i> list = null;
String attributeValue = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
if (attributeValue != null) {
j11 = Long.parseLong(attributeValue);
}
long j12 = j11;
long j13 = bVar != null ? bVar.f27762e : C0587k.f9150b;
String attributeValue2 = xmlPullParser.getAttributeValue(null, "duration");
if (attributeValue2 != null) {
j13 = Long.parseLong(attributeValue2);
}
long j14 = j13;
long j15 = bVar != null ? bVar.f27761d : 1L;
String attributeValue3 = xmlPullParser.getAttributeValue(null, "startNumber");
if (attributeValue3 != null) {
j15 = Long.parseLong(attributeValue3);
}
long j16 = j15;
long s3 = s(j7, j8);
i iVar = null;
List<k.d> list2 = null;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Initialization")) {
iVar = V(xmlPullParser);
j10 = Z3;
} else if (v0.f(xmlPullParser, "SegmentTimeline")) {
j10 = Z3;
list2 = o0(xmlPullParser, j10, j5);
} else {
j10 = Z3;
if (v0.f(xmlPullParser, "SegmentURL")) {
if (list == null) {
list = new ArrayList<>();
}
list.add(p0(xmlPullParser));
} else {
v(xmlPullParser);
}
}
if (v0.d(xmlPullParser, "SegmentList")) {
break;
}
Z3 = j10;
}
if (bVar != null) {
if (iVar == null) {
iVar = bVar.f27758a;
}
if (list2 == null) {
list2 = bVar.f27763f;
}
if (list == null) {
list = bVar.f27767j;
}
}
return j(iVar, j10, j12, j16, j14, list2, s3, list, j9, j4);
}
public o n(String str, String str2) {
return new o(str, str2);
}
public k.c n0(XmlPullParser xmlPullParser, @Nullable k.c cVar, List<e> list, long j4, long j5, long j7, long j8, long j9) throws XmlPullParserException, IOException {
long j10;
d dVar = this;
long Z3 = Z(xmlPullParser, "timescale", cVar != null ? cVar.f27759b : 1L);
long j11 = cVar != null ? cVar.f27760c : 0L;
i iVar = null;
String attributeValue = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
if (attributeValue != null) {
j11 = Long.parseLong(attributeValue);
}
long j12 = cVar != null ? cVar.f27762e : C0587k.f9150b;
String attributeValue2 = xmlPullParser.getAttributeValue(null, "duration");
if (attributeValue2 != null) {
j12 = Long.parseLong(attributeValue2);
}
long j13 = cVar != null ? cVar.f27761d : 1L;
String attributeValue3 = xmlPullParser.getAttributeValue(null, "startNumber");
if (attributeValue3 != null) {
j13 = Long.parseLong(attributeValue3);
}
long j14 = j13;
long Y3 = Y(list);
long s3 = s(j7, j8);
n x02 = dVar.x0(xmlPullParser, j6.e.f27555h, cVar != null ? cVar.f27769k : null);
n x03 = dVar.x0(xmlPullParser, "initialization", cVar != null ? cVar.f27768j : null);
List<k.d> list2 = null;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Initialization")) {
iVar = V(xmlPullParser);
j10 = Z3;
} else if (v0.f(xmlPullParser, "SegmentTimeline")) {
j10 = Z3;
list2 = dVar.o0(xmlPullParser, j10, j5);
} else {
j10 = Z3;
v(xmlPullParser);
}
if (v0.d(xmlPullParser, "SegmentTemplate")) {
break;
}
dVar = this;
Y3 = Y3;
j14 = j14;
Z3 = j10;
}
if (cVar != null) {
if (iVar == null) {
iVar = cVar.f27758a;
}
if (list2 == null) {
list2 = cVar.f27763f;
}
}
return k(iVar, j10, j11, j14, Y3, j12, list2, s3, x03, x02, j9, j4);
}
public List<k.d> o0(XmlPullParser xmlPullParser, long j4, long j5) throws XmlPullParserException, IOException {
ArrayList arrayList = new ArrayList();
long j7 = 0;
long j8 = -9223372036854775807L;
boolean z3 = false;
int i4 = 0;
do {
xmlPullParser.next();
if (v0.f(xmlPullParser, C1608a.R4)) {
String attributeValue = xmlPullParser.getAttributeValue(null, "t");
long parseLong = attributeValue == null ? -9223372036854775807L : Long.parseLong(attributeValue);
if (z3) {
ArrayList arrayList2 = arrayList;
j7 = a(arrayList2, j7, j8, i4, parseLong);
arrayList = arrayList2;
}
if (parseLong != C0587k.f9150b) {
j7 = parseLong;
}
String attributeValue2 = xmlPullParser.getAttributeValue(null, "d");
j8 = attributeValue2 == null ? -9223372036854775807L : Long.parseLong(attributeValue2);
String attributeValue3 = xmlPullParser.getAttributeValue(null, "r");
i4 = attributeValue3 == null ? 0 : Integer.parseInt(attributeValue3);
z3 = true;
} else {
v(xmlPullParser);
}
} while (!v0.d(xmlPullParser, "SegmentTimeline"));
if (z3) {
a(arrayList, j7, j8, i4, u0.X1(j5, j4, 1000L));
}
return arrayList;
}
public i p0(XmlPullParser xmlPullParser) {
return f0(xmlPullParser, j6.e.f27555h, "mediaRange");
}
public int q0(@Nullable String str) {
if (str == null) {
return 0;
}
return (str.equals("forced_subtitle") || str.equals("forced-subtitle")) ? 2 : 0;
}
public int r0(List<e> list) {
int i4 = 0;
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = list.get(i5);
if (s8.c.a("urn:mpeg:dash:role:2011", eVar.f27721a)) {
i4 |= q0(eVar.f27722b);
}
}
return i4;
}
public l s0(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
long j4 = -9223372036854775807L;
long j5 = -9223372036854775807L;
long j7 = -9223372036854775807L;
float f4 = -3.4028235E38f;
float f5 = -3.4028235E38f;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Latency")) {
String attributeValue = xmlPullParser.getAttributeValue(null, w.a.f6092M);
j4 = attributeValue == null ? -9223372036854775807L : Long.parseLong(attributeValue);
String attributeValue2 = xmlPullParser.getAttributeValue(null, "min");
j5 = attributeValue2 == null ? -9223372036854775807L : Long.parseLong(attributeValue2);
String attributeValue3 = xmlPullParser.getAttributeValue(null, "max");
j7 = attributeValue3 == null ? -9223372036854775807L : Long.parseLong(attributeValue3);
} else if (v0.f(xmlPullParser, "PlaybackRate")) {
String attributeValue4 = xmlPullParser.getAttributeValue(null, "min");
f4 = attributeValue4 == null ? -3.4028235E38f : Float.parseFloat(attributeValue4);
String attributeValue5 = xmlPullParser.getAttributeValue(null, "max");
f5 = attributeValue5 == null ? -3.4028235E38f : Float.parseFloat(attributeValue5);
}
long j8 = j4;
long j9 = j5;
long j10 = j7;
float f7 = f4;
float f8 = f5;
if (v0.d(xmlPullParser, "ServiceDescription")) {
return new l(j8, j9, j10, f7, f8);
}
j4 = j8;
j5 = j9;
j7 = j10;
f4 = f7;
f5 = f8;
}
}
public final boolean u(String[] strArr) {
for (String str : strArr) {
if (str.startsWith("urn:dvb:dash:profile:dvb-dash:")) {
return true;
}
}
return false;
}
@Nullable
public Pair<Integer, Integer> v0(List<e> list) {
String str;
for (int i4 = 0; i4 < list.size(); i4++) {
e eVar = list.get(i4);
if ((s8.c.a("http://dashif.org/thumbnail_tile", eVar.f27721a) || s8.c.a("http://dashif.org/guidelines/thumbnail_tile", eVar.f27721a)) && (str = eVar.f27722b) != null) {
String[] l22 = u0.l2(str, "x");
if (l22.length != 2) {
continue;
} else {
try {
return Pair.create(Integer.valueOf(Integer.parseInt(l22[0])), Integer.valueOf(Integer.parseInt(l22[1])));
} catch (NumberFormatException unused) {
continue;
}
}
}
}
return null;
}
@Override
public c parse(Uri uri, InputStream inputStream) throws IOException {
try {
XmlPullParser newPullParser = this.f27711a.newPullParser();
newPullParser.setInput(inputStream, null);
if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
return a0(newPullParser, uri);
}
throw Z.c("inputStream does not contain a valid media presentation description", null);
} catch (XmlPullParserException e4) {
throw Z.c(null, e4);
}
}
public int w0(@Nullable String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
public k2.C1329a x(org.xmlpull.v1.XmlPullParser r46, java.util.List<k2.C1330b> r47, @androidx.annotation.Nullable k2.k r48, long r49, long r51, long r53, long r55, long r57, boolean r59) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: k2.d.x(org.xmlpull.v1.XmlPullParser, java.util.List, k2.k, long, long, long, long, long, boolean):k2.a");
}
@Nullable
public n x0(XmlPullParser xmlPullParser, String str, @Nullable n nVar) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue != null ? n.b(attributeValue) : nVar;
}
public void y(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
v(xmlPullParser);
}
public o y0(XmlPullParser xmlPullParser) {
return n(xmlPullParser.getAttributeValue(null, "schemeIdUri"), xmlPullParser.getAttributeValue(null, "value"));
}
public int z(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
char c4;
String t02 = t0(xmlPullParser, "schemeIdUri", null);
t02.getClass();
int i4 = -1;
switch (t02.hashCode()) {
case -2128649360:
if (t02.equals("urn:dts:dash:audio_channel_configuration:2012")) {
c4 = 0;
break;
}
c4 = 65535;
break;
case -2060825028:
if (t02.equals("tag:dolby.com,2015:dash:audio_channel_configuration:2015")) {
c4 = 1;
break;
}
c4 = 65535;
break;
case -1352850286:
if (t02.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011")) {
c4 = 2;
break;
}
c4 = 65535;
break;
case -1138141449:
if (t02.equals("tag:dolby.com,2014:dash:audio_channel_configuration:2011")) {
c4 = 3;
break;
}
c4 = 65535;
break;
case -986633423:
if (t02.equals("urn:mpeg:mpegB:cicp:ChannelConfiguration")) {
c4 = 4;
break;
}
c4 = 65535;
break;
case -79006963:
if (t02.equals("tag:dts.com,2014:dash:audio_channel_configuration:2012")) {
c4 = 5;
break;
}
c4 = 65535;
break;
case 312179081:
if (t02.equals("tag:dts.com,2018:uhd:audio_channel_configuration")) {
c4 = 6;
break;
}
c4 = 65535;
break;
case 2036691300:
if (t02.equals("urn:dolby:dash:audio_channel_configuration:2011")) {
c4 = 7;
break;
}
c4 = 65535;
break;
default:
c4 = 65535;
break;
}
switch (c4) {
case 0:
case 5:
i4 = M(xmlPullParser);
break;
case 1:
i4 = I(xmlPullParser, str);
break;
case 2:
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue != null) {
i4 = Integer.parseInt(attributeValue);
break;
}
break;
case 3:
case 7:
i4 = L(xmlPullParser);
break;
case 4:
i4 = b0(xmlPullParser);
break;
case 6:
i4 = N(xmlPullParser);
break;
}
do {
xmlPullParser.next();
} while (!v0.d(xmlPullParser, "AudioChannelConfiguration"));
return i4;
}
}