正在查看: Cantique de Louanges v12 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package g1;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
import android.util.Xml;
import androidx.core.app.NotificationCompat;
import androidx.media3.common.DrmInitData;
import androidx.media3.common.h;
import androidx.media3.extractor.metadata.emsg.EventMessage;
import com.applovin.mediation.MaxReward;
import com.applovin.sdk.AppLovinMediationProvider;
import com.google.common.collect.c0;
import com.google.common.collect.u;
import g1.k;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
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 u0.j0;
import u0.k0;
import w1.p;
import x0.q;
import x0.s0;
import x0.t0;
public class d extends DefaultHandler implements p.a {
private static final Pattern f12621b = Pattern.compile("(\\d+)(?:/(\\d+))?");
private static final Pattern f12622c = Pattern.compile("CC([1-4])=.*");
private static final Pattern f12623d = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");
private static final int[] f12624e = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};
private final XmlPullParserFactory f12625a;
protected static final class a {
public final androidx.media3.common.h f12626a;
public final u f12627b;
public final k f12628c;
public final String f12629d;
public final ArrayList f12630e;
public final ArrayList f12631f;
public final long f12632g;
public final List f12633h;
public final List f12634i;
public a(androidx.media3.common.h hVar, List list, k kVar, String str, ArrayList arrayList, ArrayList arrayList2, List list2, List list3, long j5) {
this.f12626a = hVar;
this.f12627b = u.o(list);
this.f12628c = kVar;
this.f12629d = str;
this.f12630e = arrayList;
this.f12631f = arrayList2;
this.f12633h = list2;
this.f12634i = list3;
this.f12632g = j5;
}
}
public d() {
try {
this.f12625a = XmlPullParserFactory.newInstance();
} catch (XmlPullParserException e5) {
throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e5);
}
}
protected static int C(List list) {
String str;
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = (e) list.get(i5);
if ("urn:scte:dash:cc:cea-608:2015".equals(eVar.f12635a) && (str = eVar.f12636b) != null) {
Matcher matcher = f12622c.matcher(str);
if (matcher.matches()) {
return Integer.parseInt(matcher.group(1));
}
q.i("MpdParser", "Unable to parse CEA-608 channel number from: " + eVar.f12636b);
}
}
return -1;
}
protected static int D(List list) {
String str;
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = (e) list.get(i5);
if ("urn:scte:dash:cc:cea-708:2015".equals(eVar.f12635a) && (str = eVar.f12636b) != null) {
Matcher matcher = f12623d.matcher(str);
if (matcher.matches()) {
return Integer.parseInt(matcher.group(1));
}
q.i("MpdParser", "Unable to parse CEA-708 service block number from: " + eVar.f12636b);
}
}
return -1;
}
protected static long G(XmlPullParser xmlPullParser, String str, long j5) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j5 : s0.Q0(attributeValue);
}
protected static e H(XmlPullParser xmlPullParser, String str) {
String q02 = q0(xmlPullParser, "schemeIdUri", MaxReward.DEFAULT_LABEL);
String q03 = q0(xmlPullParser, "value", null);
String q04 = q0(xmlPullParser, "id", null);
do {
xmlPullParser.next();
} while (!t0.d(xmlPullParser, str));
return new e(q02, q03, q04);
}
protected static int I(XmlPullParser xmlPullParser) {
char c5;
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue == null) {
return -1;
}
String e5 = x7.b.e(attributeValue);
e5.hashCode();
switch (e5.hashCode()) {
case 1596796:
if (e5.equals("4000")) {
c5 = 0;
break;
}
c5 = 65535;
break;
case 2937391:
if (e5.equals("a000")) {
c5 = 1;
break;
}
c5 = 65535;
break;
case 3094035:
if (e5.equals("f801")) {
c5 = 2;
break;
}
c5 = 65535;
break;
case 3133436:
if (e5.equals("fa01")) {
c5 = 3;
break;
}
c5 = 65535;
break;
default:
c5 = 65535;
break;
}
switch (c5) {
}
return -1;
}
protected static int J(XmlPullParser xmlPullParser) {
int T = T(xmlPullParser, "value", -1);
if (T <= 0 || T >= 33) {
return -1;
}
return T;
}
protected static int K(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;
}
protected static long L(XmlPullParser xmlPullParser, String str, long j5) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j5 : s0.R0(attributeValue);
}
protected static String M(List list) {
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = (e) list.get(i5);
String str = eVar.f12635a;
if ("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str) && "JOC".equals(eVar.f12636b)) {
return "audio/eac3-joc";
}
if ("tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str) && "ec+3".equals(eVar.f12636b)) {
return "audio/eac3-joc";
}
}
return "audio/eac3";
}
protected static float Q(XmlPullParser xmlPullParser, String str, float f5) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? f5 : Float.parseFloat(attributeValue);
}
protected static float R(XmlPullParser xmlPullParser, float f5) {
String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
if (attributeValue == null) {
return f5;
}
Matcher matcher = f12621b.matcher(attributeValue);
if (!matcher.matches()) {
return f5;
}
int parseInt = Integer.parseInt(matcher.group(1));
return !TextUtils.isEmpty(matcher.group(2)) ? parseInt / Integer.parseInt(r2) : parseInt;
}
protected static int T(XmlPullParser xmlPullParser, String str, int i5) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? i5 : Integer.parseInt(attributeValue);
}
protected static long V(List list) {
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = (e) list.get(i5);
if (x7.b.a("http://dashif.org/guidelines/last-segment-number", eVar.f12635a)) {
return Long.parseLong(eVar.f12636b);
}
}
return -1L;
}
protected static long W(XmlPullParser xmlPullParser, String str, long j5) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j5 : Long.parseLong(attributeValue);
}
protected static int Y(XmlPullParser xmlPullParser) {
int T = T(xmlPullParser, "value", -1);
if (T < 0) {
return -1;
}
int[] iArr = f12624e;
if (T < iArr.length) {
return iArr[T];
}
return -1;
}
private long a(List list, long j5, long j6, int i5, long j7) {
int m4 = i5 >= 0 ? i5 + 1 : (int) s0.m(j7 - j5, j6);
for (int i6 = 0; i6 < m4; i6++) {
list.add(l(j5, j6));
j5 += j6;
}
return j5;
}
private static int o(int i5, int i6) {
if (i5 == -1) {
return i6;
}
if (i6 == -1) {
return i5;
}
x0.a.g(i5 == i6);
return i5;
}
private static String p(String str, String str2) {
if (str == null) {
return str2;
}
if (str2 == null) {
return str;
}
x0.a.g(str.equals(str2));
return str;
}
private static void q(ArrayList arrayList) {
String str;
int i5 = 0;
while (true) {
if (i5 >= arrayList.size()) {
str = null;
break;
}
DrmInitData.SchemeData schemeData = (DrmInitData.SchemeData) arrayList.get(i5);
if (u0.j.f15500c.equals(schemeData.f4256b) && (str = schemeData.f4257c) != null) {
arrayList.remove(i5);
break;
}
i5++;
}
if (str == null) {
return;
}
for (int i6 = 0; i6 < arrayList.size(); i6++) {
DrmInitData.SchemeData schemeData2 = (DrmInitData.SchemeData) arrayList.get(i6);
if (u0.j.f15499b.equals(schemeData2.f4256b) && schemeData2.f4257c == null) {
arrayList.set(i6, new DrmInitData.SchemeData(u0.j.f15500c, str, schemeData2.f4258d, schemeData2.f4259e));
}
}
}
protected static String q0(XmlPullParser xmlPullParser, String str, String str2) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? str2 : attributeValue;
}
private static void r(ArrayList arrayList) {
for (int size = arrayList.size() - 1; size >= 0; size--) {
DrmInitData.SchemeData schemeData = (DrmInitData.SchemeData) arrayList.get(size);
if (!schemeData.q()) {
int i5 = 0;
while (true) {
if (i5 >= arrayList.size()) {
break;
}
if (((DrmInitData.SchemeData) arrayList.get(i5)).a(schemeData)) {
arrayList.remove(size);
break;
}
i5++;
}
}
}
}
protected static String r0(XmlPullParser xmlPullParser, String str) {
String str2 = MaxReward.DEFAULT_LABEL;
do {
xmlPullParser.next();
if (xmlPullParser.getEventType() == 4) {
str2 = xmlPullParser.getText();
} else {
v(xmlPullParser);
}
} while (!t0.d(xmlPullParser, str));
return str2;
}
private static long s(long j5, long j6) {
if (j6 != -9223372036854775807L) {
j5 = j6;
}
if (j5 == Long.MAX_VALUE) {
return -9223372036854775807L;
}
return j5;
}
private static String t(String str, String str2) {
if (j0.o(str)) {
return j0.c(str2);
}
if (j0.s(str)) {
return j0.n(str2);
}
if (j0.r(str)) {
return str;
}
if (j0.p(str)) {
return str;
}
if (!"application/mp4".equals(str)) {
return null;
}
String g5 = j0.g(str2);
return "text/vtt".equals(g5) ? "application/x-mp4-vtt" : g5;
}
private boolean u(String[] strArr) {
for (String str : strArr) {
if (str.startsWith("urn:dvb:dash:profile:dvb-dash:")) {
return true;
}
}
return false;
}
public static void v(XmlPullParser xmlPullParser) {
if (t0.e(xmlPullParser)) {
int i5 = 1;
while (i5 != 0) {
xmlPullParser.next();
if (t0.e(xmlPullParser)) {
i5++;
} else if (t0.c(xmlPullParser)) {
i5--;
}
}
}
}
protected long A(XmlPullParser xmlPullParser, long j5) {
String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset");
if (attributeValue == null) {
return j5;
}
if ("INF".equals(attributeValue)) {
return Long.MAX_VALUE;
}
return (long) (Float.parseFloat(attributeValue) * 1000000.0f);
}
protected List B(XmlPullParser xmlPullParser, List list, boolean z4) {
String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority");
int parseInt = attributeValue != null ? Integer.parseInt(attributeValue) : z4 ? 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 r02 = r0(xmlPullParser, "BaseURL");
if (x0.j0.b(r02)) {
if (attributeValue3 == null) {
attributeValue3 = r02;
}
return c0.j(new b[]{new b(r02, attributeValue3, parseInt, parseInt2)});
}
ArrayList arrayList = new ArrayList();
for (int i5 = 0; i5 < list.size(); i5++) {
b bVar = (b) list.get(i5);
String d5 = x0.j0.d(bVar.f12604a, r02);
String str = attributeValue3 == null ? d5 : attributeValue3;
if (z4) {
parseInt = bVar.f12606c;
parseInt2 = bVar.f12607d;
str = bVar.f12605b;
}
arrayList.add(new b(d5, str, parseInt, parseInt2));
}
return arrayList;
}
protected android.util.Pair E(org.xmlpull.v1.XmlPullParser r11) {
throw new UnsupportedOperationException("Method not decompiled: g1.d.E(org.xmlpull.v1.XmlPullParser):android.util.Pair");
}
protected int F(XmlPullParser xmlPullParser) {
String attributeValue = xmlPullParser.getAttributeValue(null, "contentType");
if (TextUtils.isEmpty(attributeValue)) {
return -1;
}
if ("audio".equals(attributeValue)) {
return 1;
}
if ("video".equals(attributeValue)) {
return 2;
}
if ("text".equals(attributeValue)) {
return 3;
}
return "image".equals(attributeValue) ? 4 : -1;
}
protected Pair N(XmlPullParser xmlPullParser, String str, String str2, long j5, long j6, ByteArrayOutputStream byteArrayOutputStream) {
long W = W(xmlPullParser, "id", 0L);
long W2 = W(xmlPullParser, "duration", -9223372036854775807L);
long W3 = W(xmlPullParser, "presentationTime", 0L);
long W0 = s0.W0(W2, 1000L, j5);
long W02 = s0.W0(W3 - j6, 1000000L, j5);
String q02 = q0(xmlPullParser, "messageData", null);
byte[] O = O(xmlPullParser, byteArrayOutputStream);
Long valueOf = Long.valueOf(W02);
if (q02 != null) {
O = s0.r0(q02);
}
return Pair.create(valueOf, c(str, str2, W, W0, O));
}
protected byte[] O(XmlPullParser xmlPullParser, ByteArrayOutputStream byteArrayOutputStream) {
byteArrayOutputStream.reset();
XmlSerializer newSerializer = Xml.newSerializer();
newSerializer.setOutput(byteArrayOutputStream, x7.d.c.name());
xmlPullParser.nextToken();
while (!t0.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 i5 = 0; i5 < xmlPullParser.getAttributeCount(); i5++) {
newSerializer.attribute(xmlPullParser.getAttributeNamespace(i5), xmlPullParser.getAttributeName(i5), xmlPullParser.getAttributeValue(i5));
}
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();
}
protected f P(XmlPullParser xmlPullParser) {
ByteArrayOutputStream byteArrayOutputStream;
long j5;
ArrayList arrayList;
String q02 = q0(xmlPullParser, "schemeIdUri", MaxReward.DEFAULT_LABEL);
String q03 = q0(xmlPullParser, "value", MaxReward.DEFAULT_LABEL);
long W = W(xmlPullParser, "timescale", 1L);
long W2 = W(xmlPullParser, "presentationTimeOffset", 0L);
ArrayList arrayList2 = new ArrayList();
ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(NotificationCompat.FLAG_GROUP_SUMMARY);
while (true) {
xmlPullParser.next();
if (t0.f(xmlPullParser, "Event")) {
byteArrayOutputStream = byteArrayOutputStream2;
long j6 = W2;
j5 = W2;
arrayList = arrayList2;
arrayList.add(N(xmlPullParser, q02, q03, W, j6, byteArrayOutputStream));
} else {
byteArrayOutputStream = byteArrayOutputStream2;
j5 = W2;
arrayList = arrayList2;
v(xmlPullParser);
}
if (t0.d(xmlPullParser, "EventStream")) {
break;
}
arrayList2 = arrayList;
byteArrayOutputStream2 = byteArrayOutputStream;
W2 = j5;
}
long[] jArr = new long[arrayList.size()];
EventMessage[] eventMessageArr = new EventMessage[arrayList.size()];
for (int i5 = 0; i5 < arrayList.size(); i5++) {
Pair pair = (Pair) arrayList.get(i5);
jArr[i5] = ((Long) pair.first).longValue();
eventMessageArr[i5] = (EventMessage) pair.second;
}
return d(q02, q03, W, jArr, eventMessageArr);
}
protected i S(XmlPullParser xmlPullParser) {
return c0(xmlPullParser, "sourceURL", "range");
}
protected String U(XmlPullParser xmlPullParser) {
return r0(xmlPullParser, "Label");
}
protected g1.c X(org.xmlpull.v1.XmlPullParser r47, android.net.Uri r48) {
throw new UnsupportedOperationException("Method not decompiled: g1.d.X(org.xmlpull.v1.XmlPullParser, android.net.Uri):g1.c");
}
protected Pair Z(XmlPullParser xmlPullParser, List list, long j5, long j6, long j7, long j8, boolean z4) {
long j9;
ArrayList arrayList;
ArrayList arrayList2;
ArrayList arrayList3;
Object obj;
long j10;
k k02;
d dVar = this;
XmlPullParser xmlPullParser2 = xmlPullParser;
Object obj2 = null;
String attributeValue = xmlPullParser2.getAttributeValue(null, "id");
long L = L(xmlPullParser2, "start", j5);
long j11 = -9223372036854775807L;
long j12 = j7 != -9223372036854775807L ? j7 + L : -9223372036854775807L;
long L2 = L(xmlPullParser2, "duration", -9223372036854775807L);
ArrayList arrayList4 = new ArrayList();
ArrayList arrayList5 = new ArrayList();
ArrayList arrayList6 = new ArrayList();
long j13 = j6;
long j14 = -9223372036854775807L;
k kVar = null;
e eVar = null;
boolean z5 = false;
while (true) {
xmlPullParser.next();
if (t0.f(xmlPullParser2, "BaseURL")) {
if (!z5) {
j13 = dVar.A(xmlPullParser2, j13);
z5 = true;
}
arrayList6.addAll(dVar.B(xmlPullParser2, list, z4));
arrayList3 = arrayList5;
arrayList = arrayList6;
j10 = j11;
obj = obj2;
arrayList2 = arrayList4;
} else {
if (t0.f(xmlPullParser2, "AdaptationSet")) {
j9 = j13;
arrayList = arrayList6;
arrayList2 = arrayList4;
arrayList2.add(x(xmlPullParser, !arrayList6.isEmpty() ? arrayList6 : list, kVar, L2, j13, j14, j12, j8, z4));
xmlPullParser2 = xmlPullParser;
arrayList3 = arrayList5;
} else {
j9 = j13;
ArrayList arrayList7 = arrayList5;
arrayList = arrayList6;
arrayList2 = arrayList4;
xmlPullParser2 = xmlPullParser;
if (t0.f(xmlPullParser2, "EventStream")) {
arrayList7.add(P(xmlPullParser));
arrayList3 = arrayList7;
} else if (t0.f(xmlPullParser2, "SegmentBase")) {
arrayList3 = arrayList7;
kVar = i0(xmlPullParser2, null);
obj = null;
j13 = j9;
j10 = -9223372036854775807L;
} else {
arrayList3 = arrayList7;
if (t0.f(xmlPullParser2, "SegmentList")) {
long A = A(xmlPullParser2, -9223372036854775807L);
obj = null;
k02 = j0(xmlPullParser, null, j12, L2, j9, A, j8);
j14 = A;
j13 = j9;
j10 = -9223372036854775807L;
} else {
obj = null;
if (t0.f(xmlPullParser2, "SegmentTemplate")) {
long A2 = A(xmlPullParser2, -9223372036854775807L);
j10 = -9223372036854775807L;
k02 = k0(xmlPullParser, null, u.t(), j12, L2, j9, A2, j8);
j14 = A2;
j13 = j9;
} else {
j10 = -9223372036854775807L;
if (t0.f(xmlPullParser2, "AssetIdentifier")) {
eVar = H(xmlPullParser2, "AssetIdentifier");
} else {
v(xmlPullParser);
}
j13 = j9;
}
}
kVar = k02;
}
}
obj = null;
j10 = -9223372036854775807L;
j13 = j9;
}
if (t0.d(xmlPullParser2, "Period")) {
return Pair.create(g(attributeValue, L, arrayList2, arrayList3, eVar), Long.valueOf(L2));
}
arrayList4 = arrayList2;
arrayList6 = arrayList;
obj2 = obj;
arrayList5 = arrayList3;
j11 = j10;
dVar = this;
}
}
protected String[] a0(XmlPullParser xmlPullParser, String str, String[] strArr) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? strArr : attributeValue.split(",");
}
protected g1.a b(long j5, int i5, List list, List list2, List list3, List list4) {
return new g1.a(j5, i5, list, list2, list3, list4);
}
protected h b0(XmlPullParser xmlPullParser) {
String str = null;
String q02 = q0(xmlPullParser, "moreInformationURL", null);
String q03 = q0(xmlPullParser, "lang", null);
String str2 = null;
String str3 = null;
while (true) {
xmlPullParser.next();
if (t0.f(xmlPullParser, "Title")) {
str = xmlPullParser.nextText();
} else if (t0.f(xmlPullParser, "Source")) {
str2 = xmlPullParser.nextText();
} else if (t0.f(xmlPullParser, "Copyright")) {
str3 = xmlPullParser.nextText();
} else {
v(xmlPullParser);
}
String str4 = str3;
if (t0.d(xmlPullParser, "ProgramInformation")) {
return new h(str, str2, str4, q02, q03);
}
str3 = str4;
}
}
protected EventMessage c(String str, String str2, long j5, long j6, byte[] bArr) {
return new EventMessage(str, str2, j6, j5, bArr);
}
protected i c0(XmlPullParser xmlPullParser, String str, String str2) {
long j5;
long j6;
String attributeValue = xmlPullParser.getAttributeValue(null, str);
String attributeValue2 = xmlPullParser.getAttributeValue(null, str2);
if (attributeValue2 != null) {
String[] split = attributeValue2.split("-");
j5 = Long.parseLong(split[0]);
if (split.length == 2) {
j6 = (Long.parseLong(split[1]) - j5) + 1;
return h(attributeValue, j5, j6);
}
} else {
j5 = 0;
}
j6 = -1;
return h(attributeValue, j5, j6);
}
protected f d(String str, String str2, long j5, long[] jArr, EventMessage[] eventMessageArr) {
return new f(str, str2, j5, jArr, eventMessageArr);
}
protected g1.d.a d0(org.xmlpull.v1.XmlPullParser r36, java.util.List r37, java.lang.String r38, java.lang.String r39, int r40, int r41, float r42, int r43, int r44, java.lang.String r45, java.util.List r46, java.util.List r47, java.util.List r48, java.util.List r49, g1.k r50, long r51, long r53, long r55, long r57, long r59, boolean r61) {
throw new UnsupportedOperationException("Method not decompiled: g1.d.d0(org.xmlpull.v1.XmlPullParser, java.util.List, 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, g1.k, long, long, long, long, long, boolean):g1.d$a");
}
protected androidx.media3.common.h e(String str, String str2, int i5, int i6, float f5, int i7, int i8, int i9, String str3, List list, List list2, String str4, List list3, List list4) {
String str5 = str4;
String t4 = t(str2, str5);
if ("audio/eac3".equals(t4)) {
t4 = M(list4);
if ("audio/eac3-joc".equals(t4)) {
str5 = "ec+3";
}
}
int o02 = o0(list);
int h02 = h0(list) | e0(list2) | g0(list3) | g0(list4);
Pair s02 = s0(list3);
h.b X = new h.b().U(str).M(str2).g0(t4).K(str5).b0(i9).i0(o02).e0(h02).X(str3);
int i10 = -1;
h.b m02 = X.l0(s02 != null ? ((Integer) s02.first).intValue() : -1).m0(s02 != null ? ((Integer) s02.second).intValue() : -1);
if (j0.s(t4)) {
m02.n0(i5).S(i6).R(f5);
} else if (j0.o(t4)) {
m02.J(i7).h0(i8);
} else if (j0.r(t4)) {
if ("application/cea-608".equals(t4)) {
i10 = C(list2);
} else if ("application/cea-708".equals(t4)) {
i10 = D(list2);
}
m02.H(i10);
} else if (j0.p(t4)) {
m02.n0(i5).S(i6);
}
return m02.G();
}
protected int e0(List list) {
int t02;
int i5 = 0;
for (int i6 = 0; i6 < list.size(); i6++) {
e eVar = (e) list.get(i6);
if (x7.b.a("urn:mpeg:dash:role:2011", eVar.f12635a)) {
t02 = f0(eVar.f12636b);
} else if (x7.b.a("urn:tva:metadata:cs:AudioPurposeCS:2007", eVar.f12635a)) {
t02 = t0(eVar.f12636b);
}
i5 |= t02;
}
return i5;
}
protected c f(long j5, long j6, long j7, boolean z4, long j8, long j9, long j10, long j11, h hVar, o oVar, l lVar, Uri uri, List list) {
return new c(j5, j6, j7, z4, j8, j9, j10, j11, hVar, oVar, lVar, uri, list);
}
protected int f0(String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
protected g g(String str, long j5, List list, List list2, e eVar) {
return new g(str, j5, list, list2, eVar);
}
protected int g0(List list) {
int i5 = 0;
for (int i6 = 0; i6 < list.size(); i6++) {
if (x7.b.a("http://dashif.org/guidelines/trickmode", ((e) list.get(i6)).f12635a)) {
i5 |= 16384;
}
}
return i5;
}
protected i h(String str, long j5, long j6) {
return new i(str, j5, j6);
}
protected int h0(List list) {
int i5 = 0;
for (int i6 = 0; i6 < list.size(); i6++) {
e eVar = (e) list.get(i6);
if (x7.b.a("urn:mpeg:dash:role:2011", eVar.f12635a)) {
i5 |= f0(eVar.f12636b);
}
}
return i5;
}
protected j i(a aVar, String str, String str2, ArrayList arrayList, ArrayList arrayList2) {
h.b b5 = aVar.f12626a.b();
if (str != null) {
b5.W(str);
}
String str3 = aVar.f12629d;
if (str3 != null) {
str2 = str3;
}
ArrayList arrayList3 = aVar.f12630e;
arrayList3.addAll(arrayList);
if (!arrayList3.isEmpty()) {
q(arrayList3);
r(arrayList3);
b5.O(new DrmInitData(str2, arrayList3));
}
ArrayList arrayList4 = aVar.f12631f;
arrayList4.addAll(arrayList2);
return j.n(aVar.f12632g, b5.G(), aVar.f12627b, aVar.f12628c, arrayList4, aVar.f12633h, aVar.f12634i, null);
}
protected k.e i0(XmlPullParser xmlPullParser, k.e eVar) {
long j5;
long j6;
long W = W(xmlPullParser, "timescale", eVar != null ? eVar.f12672b : 1L);
long W2 = W(xmlPullParser, "presentationTimeOffset", eVar != null ? eVar.f12673c : 0L);
long j7 = eVar != null ? eVar.f12686d : 0L;
long j8 = eVar != null ? eVar.f12687e : 0L;
String attributeValue = xmlPullParser.getAttributeValue(null, "indexRange");
if (attributeValue != null) {
String[] split = attributeValue.split("-");
j6 = Long.parseLong(split[0]);
j5 = (Long.parseLong(split[1]) - j6) + 1;
} else {
j5 = j8;
j6 = j7;
}
i iVar = eVar != null ? eVar.f12671a : null;
do {
xmlPullParser.next();
if (t0.f(xmlPullParser, "Initialization")) {
iVar = S(xmlPullParser);
} else {
v(xmlPullParser);
}
} while (!t0.d(xmlPullParser, "SegmentBase"));
return m(iVar, W, W2, j6, j5);
}
protected k.b j(i iVar, long j5, long j6, long j7, long j8, List list, long j9, List list2, long j10, long j11) {
return new k.b(iVar, j5, j6, j7, j8, list, j9, list2, s0.J0(j10), s0.J0(j11));
}
protected k.b j0(XmlPullParser xmlPullParser, k.b bVar, long j5, long j6, long j7, long j8, long j9) {
long W = W(xmlPullParser, "timescale", bVar != null ? bVar.f12672b : 1L);
long W2 = W(xmlPullParser, "presentationTimeOffset", bVar != null ? bVar.f12673c : 0L);
long W3 = W(xmlPullParser, "duration", bVar != null ? bVar.f12675e : -9223372036854775807L);
long W4 = W(xmlPullParser, "startNumber", bVar != null ? bVar.f12674d : 1L);
long s4 = s(j7, j8);
List list = null;
List list2 = null;
i iVar = null;
do {
xmlPullParser.next();
if (t0.f(xmlPullParser, "Initialization")) {
iVar = S(xmlPullParser);
} else if (t0.f(xmlPullParser, "SegmentTimeline")) {
list = l0(xmlPullParser, W, j6);
} else if (t0.f(xmlPullParser, "SegmentURL")) {
if (list2 == null) {
list2 = new ArrayList();
}
list2.add(m0(xmlPullParser));
} else {
v(xmlPullParser);
}
} while (!t0.d(xmlPullParser, "SegmentList"));
if (bVar != null) {
if (iVar == null) {
iVar = bVar.f12671a;
}
if (list == null) {
list = bVar.f12676f;
}
if (list2 == null) {
list2 = bVar.f12680j;
}
}
return j(iVar, W, W2, W4, W3, list, s4, list2, j9, j5);
}
protected k.c k(i iVar, long j5, long j6, long j7, long j8, long j9, List list, long j10, n nVar, n nVar2, long j11, long j12) {
return new k.c(iVar, j5, j6, j7, j8, j9, list, j10, nVar, nVar2, s0.J0(j11), s0.J0(j12));
}
protected k.c k0(XmlPullParser xmlPullParser, k.c cVar, List list, long j5, long j6, long j7, long j8, long j9) {
long W = W(xmlPullParser, "timescale", cVar != null ? cVar.f12672b : 1L);
long W2 = W(xmlPullParser, "presentationTimeOffset", cVar != null ? cVar.f12673c : 0L);
long W3 = W(xmlPullParser, "duration", cVar != null ? cVar.f12675e : -9223372036854775807L);
long W4 = W(xmlPullParser, "startNumber", cVar != null ? cVar.f12674d : 1L);
long V = V(list);
long s4 = s(j7, j8);
List list2 = null;
n u02 = u0(xmlPullParser, "media", cVar != null ? cVar.f12682k : null);
n u03 = u0(xmlPullParser, "initialization", cVar != null ? cVar.f12681j : null);
i iVar = null;
do {
xmlPullParser.next();
if (t0.f(xmlPullParser, "Initialization")) {
iVar = S(xmlPullParser);
} else if (t0.f(xmlPullParser, "SegmentTimeline")) {
list2 = l0(xmlPullParser, W, j6);
} else {
v(xmlPullParser);
}
} while (!t0.d(xmlPullParser, "SegmentTemplate"));
if (cVar != null) {
if (iVar == null) {
iVar = cVar.f12671a;
}
if (list2 == null) {
list2 = cVar.f12676f;
}
}
return k(iVar, W, W2, W4, V, W3, list2, s4, u03, u02, j9, j5);
}
protected k.d l(long j5, long j6) {
return new k.d(j5, j6);
}
protected List l0(XmlPullParser xmlPullParser, long j5, long j6) {
ArrayList arrayList = new ArrayList();
long j7 = 0;
long j8 = -9223372036854775807L;
boolean z4 = false;
int i5 = 0;
do {
xmlPullParser.next();
if (t0.f(xmlPullParser, "S")) {
long W = W(xmlPullParser, "t", -9223372036854775807L);
if (z4) {
j7 = a(arrayList, j7, j8, i5, W);
}
if (W == -9223372036854775807L) {
W = j7;
}
j8 = W(xmlPullParser, "d", -9223372036854775807L);
i5 = T(xmlPullParser, "r", 0);
j7 = W;
z4 = true;
} else {
v(xmlPullParser);
}
} while (!t0.d(xmlPullParser, "SegmentTimeline"));
if (z4) {
a(arrayList, j7, j8, i5, s0.W0(j6, j5, 1000L));
}
return arrayList;
}
protected k.e m(i iVar, long j5, long j6, long j7, long j8) {
return new k.e(iVar, j5, j6, j7, j8);
}
protected i m0(XmlPullParser xmlPullParser) {
return c0(xmlPullParser, "media", "mediaRange");
}
protected o n(String str, String str2) {
return new o(str, str2);
}
protected int n0(String str) {
if (str == null) {
return 0;
}
return (str.equals("forced_subtitle") || str.equals("forced-subtitle")) ? 2 : 0;
}
protected int o0(List list) {
int i5 = 0;
for (int i6 = 0; i6 < list.size(); i6++) {
e eVar = (e) list.get(i6);
if (x7.b.a("urn:mpeg:dash:role:2011", eVar.f12635a)) {
i5 |= n0(eVar.f12636b);
}
}
return i5;
}
protected l p0(XmlPullParser xmlPullParser) {
long j5 = -9223372036854775807L;
long j6 = -9223372036854775807L;
long j7 = -9223372036854775807L;
float f5 = -3.4028235E38f;
float f6 = -3.4028235E38f;
while (true) {
xmlPullParser.next();
if (t0.f(xmlPullParser, "Latency")) {
j5 = W(xmlPullParser, "target", -9223372036854775807L);
j6 = W(xmlPullParser, "min", -9223372036854775807L);
j7 = W(xmlPullParser, AppLovinMediationProvider.MAX, -9223372036854775807L);
} else if (t0.f(xmlPullParser, "PlaybackRate")) {
f5 = Q(xmlPullParser, "min", -3.4028235E38f);
f6 = Q(xmlPullParser, AppLovinMediationProvider.MAX, -3.4028235E38f);
}
long j8 = j5;
long j9 = j6;
long j10 = j7;
float f7 = f5;
float f8 = f6;
if (t0.d(xmlPullParser, "ServiceDescription")) {
return new l(j8, j9, j10, f7, f8);
}
j5 = j8;
j6 = j9;
j7 = j10;
f5 = f7;
f6 = f8;
}
}
protected Pair s0(List list) {
String str;
for (int i5 = 0; i5 < list.size(); i5++) {
e eVar = (e) list.get(i5);
if ((x7.b.a("http://dashif.org/thumbnail_tile", eVar.f12635a) || x7.b.a("http://dashif.org/guidelines/thumbnail_tile", eVar.f12635a)) && (str = eVar.f12636b) != null) {
String[] a12 = s0.a1(str, "x");
if (a12.length != 2) {
continue;
} else {
try {
return Pair.create(Integer.valueOf(Integer.parseInt(a12[0])), Integer.valueOf(Integer.parseInt(a12[1])));
} catch (NumberFormatException unused) {
continue;
}
}
}
}
return null;
}
protected int t0(String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
protected n u0(XmlPullParser xmlPullParser, String str, n nVar) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue != null ? n.b(attributeValue) : nVar;
}
protected o v0(XmlPullParser xmlPullParser) {
return n(xmlPullParser.getAttributeValue(null, "schemeIdUri"), xmlPullParser.getAttributeValue(null, "value"));
}
@Override
public c parse(Uri uri, InputStream inputStream) {
try {
XmlPullParser newPullParser = this.f12625a.newPullParser();
newPullParser.setInput(inputStream, null);
if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
return X(newPullParser, uri);
}
throw k0.c("inputStream does not contain a valid media presentation description", null);
} catch (XmlPullParserException e5) {
throw k0.c(null, e5);
}
}
protected g1.a x(org.xmlpull.v1.XmlPullParser r56, java.util.List r57, g1.k r58, long r59, long r61, long r63, long r65, long r67, boolean r69) {
throw new UnsupportedOperationException("Method not decompiled: g1.d.x(org.xmlpull.v1.XmlPullParser, java.util.List, g1.k, long, long, long, long, long, boolean):g1.a");
}
protected void y(XmlPullParser xmlPullParser) {
v(xmlPullParser);
}
protected int z(XmlPullParser xmlPullParser) {
char c5;
String q02 = q0(xmlPullParser, "schemeIdUri", null);
q02.hashCode();
int i5 = -1;
switch (q02.hashCode()) {
case -2128649360:
if (q02.equals("urn:dts:dash:audio_channel_configuration:2012")) {
c5 = 0;
break;
}
c5 = 65535;
break;
case -1352850286:
if (q02.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011")) {
c5 = 1;
break;
}
c5 = 65535;
break;
case -1138141449:
if (q02.equals("tag:dolby.com,2014:dash:audio_channel_configuration:2011")) {
c5 = 2;
break;
}
c5 = 65535;
break;
case -986633423:
if (q02.equals("urn:mpeg:mpegB:cicp:ChannelConfiguration")) {
c5 = 3;
break;
}
c5 = 65535;
break;
case -79006963:
if (q02.equals("tag:dts.com,2014:dash:audio_channel_configuration:2012")) {
c5 = 4;
break;
}
c5 = 65535;
break;
case 312179081:
if (q02.equals("tag:dts.com,2018:uhd:audio_channel_configuration")) {
c5 = 5;
break;
}
c5 = 65535;
break;
case 2036691300:
if (q02.equals("urn:dolby:dash:audio_channel_configuration:2011")) {
c5 = 6;
break;
}
c5 = 65535;
break;
default:
c5 = 65535;
break;
}
switch (c5) {
case 0:
case 4:
i5 = J(xmlPullParser);
break;
case 1:
i5 = T(xmlPullParser, "value", -1);
break;
case 2:
case 6:
i5 = I(xmlPullParser);
break;
case 3:
i5 = Y(xmlPullParser);
break;
case 5:
i5 = K(xmlPullParser);
break;
}
do {
xmlPullParser.next();
} while (!t0.d(xmlPullParser, "AudioChannelConfiguration"));
return i5;
}
}