MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0
d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package t6; import android.net.Uri; import android.text.TextUtils; import android.util.Base64; import android.util.Log; import android.util.Pair; import android.util.Xml; import b6.i; import com.google.android.exoplayer2.drm.DrmInitData; import com.google.android.exoplayer2.metadata.emsg.EventMessage; import com.mopub.common.Constants; import com.mopub.mobileads.VastIconXmlManager; import fb.q0; import fb.v; import i5.f0; import i5.r0; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; import k4.m; import l7.b0; import m7.o; import m7.y; import m7.z; 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 t6.j; import t6.k; public class d extends DefaultHandler implements b0.a<c> { public static final Pattern f40996b = Pattern.compile("(\\d+)(?:/(\\d+))?"); public static final Pattern f40997c = Pattern.compile("CC([1-4])=.*"); public static final Pattern f40998d = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*"); public static final int[] f40999e = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14}; public final XmlPullParserFactory f41000a; public static final class a { public final f0 f41001a; public final v<b> f41002b; public final k f41003c; public final String f41004d; public final ArrayList<DrmInitData.SchemeData> f41005e; public final ArrayList<e> f41006f; public final long f41007g; public final List<e> f41008h; public final List<e> f41009i; public a(f0 f0Var, List<b> list, k kVar, String str, ArrayList<DrmInitData.SchemeData> arrayList, ArrayList<e> arrayList2, List<e> list2, List<e> list3, long j10) { this.f41001a = f0Var; this.f41002b = v.q(list); this.f41003c = kVar; this.f41004d = str; this.f41005e = arrayList; this.f41006f = arrayList2; this.f41008h = list2; this.f41009i = list3; this.f41007g = j10; } } public d() { try { this.f41000a = XmlPullParserFactory.newInstance(); } catch (XmlPullParserException e10) { throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e10); } } public static int c(int i10, int i11) { if (i10 == -1) { return i11; } if (i11 == -1) { return i10; } c0.a.f(i10 == i11); return i10; } public static long d(long j10, long j11) { if (j11 != -9223372036854775807L) { j10 = j11; } if (j10 == Long.MAX_VALUE) { return -9223372036854775807L; } return j10; } public static void e(XmlPullParser xmlPullParser) { if (e.h.g(xmlPullParser)) { int i10 = 1; while (i10 != 0) { xmlPullParser.next(); if (e.h.g(xmlPullParser)) { i10++; } else { if (xmlPullParser.getEventType() == 3) { i10--; } } } } } public static e k(XmlPullParser xmlPullParser, String str) { String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri"); if (attributeValue == null) { attributeValue = ""; } String attributeValue2 = xmlPullParser.getAttributeValue(null, "value"); if (attributeValue2 == null) { attributeValue2 = null; } String attributeValue3 = xmlPullParser.getAttributeValue(null, "id"); String str2 = attributeValue3 != null ? attributeValue3 : null; do { xmlPullParser.next(); } while (!e.h.f(xmlPullParser, str)); return new e(attributeValue, attributeValue2, str2); } public static long l(XmlPullParser xmlPullParser, String str, long j10) { String attributeValue = xmlPullParser.getAttributeValue(null, str); if (attributeValue == null) { return j10; } Matcher matcher = z.f36494h.matcher(attributeValue); if (!matcher.matches()) { return (long) (Double.parseDouble(attributeValue) * 3600.0d * 1000.0d); } boolean isEmpty = true ^ TextUtils.isEmpty(matcher.group(1)); String group = matcher.group(3); double parseDouble = group != null ? Double.parseDouble(group) * 3.1556908E7d : 0.0d; String group2 = matcher.group(5); double parseDouble2 = parseDouble + (group2 != null ? Double.parseDouble(group2) * 2629739.0d : 0.0d); String group3 = matcher.group(7); double parseDouble3 = parseDouble2 + (group3 != null ? Double.parseDouble(group3) * 86400.0d : 0.0d); String group4 = matcher.group(10); double parseDouble4 = parseDouble3 + (group4 != null ? Double.parseDouble(group4) * 3600.0d : 0.0d); String group5 = matcher.group(12); double parseDouble5 = parseDouble4 + (group5 != null ? Double.parseDouble(group5) * 60.0d : 0.0d); String group6 = matcher.group(14); long parseDouble6 = (long) ((parseDouble5 + (group6 != null ? Double.parseDouble(group6) : 0.0d)) * 1000.0d); return isEmpty ? -parseDouble6 : parseDouble6; } public static float m(XmlPullParser xmlPullParser, float f10) { String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate"); if (attributeValue == null) { return f10; } Matcher matcher = f40996b.matcher(attributeValue); if (!matcher.matches()) { return f10; } int parseInt = Integer.parseInt(matcher.group(1)); return !TextUtils.isEmpty(matcher.group(2)) ? parseInt / Integer.parseInt(r2) : parseInt; } public static int n(XmlPullParser xmlPullParser, String str, int i10) { String attributeValue = xmlPullParser.getAttributeValue(null, str); return attributeValue == null ? i10 : Integer.parseInt(attributeValue); } public static long o(XmlPullParser xmlPullParser, String str, long j10) { String attributeValue = xmlPullParser.getAttributeValue(null, str); return attributeValue == null ? j10 : Long.parseLong(attributeValue); } public static String x(XmlPullParser xmlPullParser, String str) { String str2 = ""; do { xmlPullParser.next(); if (xmlPullParser.getEventType() == 4) { str2 = xmlPullParser.getText(); } else { e(xmlPullParser); } } while (!e.h.f(xmlPullParser, str)); return str2; } @Override public c a(Uri uri, InputStream inputStream) { try { XmlPullParser newPullParser = this.f41000a.newPullParser(); newPullParser.setInput(inputStream, null); if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) { return p(newPullParser, uri); } throw r0.b("inputStream does not contain a valid media presentation description", null); } catch (XmlPullParserException e10) { throw r0.b(null, e10); } } public final long b(List<k.d> list, long j10, long j11, int i10, long j12) { int i11; if (i10 >= 0) { i11 = i10 + 1; } else { int i12 = z.f36487a; i11 = (int) ((((j12 - j10) + j11) - 1) / j11); } for (int i13 = 0; i13 < i11; i13++) { list.add(new k.d(j10, j11)); j10 += j11; } return j10; } public int f(XmlPullParser xmlPullParser) { char c10; String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri"); if (attributeValue == null) { attributeValue = null; } Objects.requireNonNull(attributeValue); char c11 = 0; int i10 = -1; switch (attributeValue.hashCode()) { case -1352850286: if (attributeValue.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011")) { c10 = 0; break; } c10 = 65535; break; case -1138141449: if (attributeValue.equals("tag:dolby.com,2014:dash:audio_channel_configuration:2011")) { c10 = 1; break; } c10 = 65535; break; case -986633423: if (attributeValue.equals("urn:mpeg:mpegB:cicp:ChannelConfiguration")) { c10 = 2; break; } c10 = 65535; break; case 2036691300: if (attributeValue.equals("urn:dolby:dash:audio_channel_configuration:2011")) { c10 = 3; break; } c10 = 65535; break; default: c10 = 65535; break; } if (c10 != 0) { if (c10 != 1) { if (c10 == 2) { int n10 = n(xmlPullParser, "value", -1); if (n10 >= 0) { int[] iArr = f40999e; if (n10 < iArr.length) { i10 = iArr[n10]; } } } } String attributeValue2 = xmlPullParser.getAttributeValue(null, "value"); if (attributeValue2 != null) { String f10 = n0.b.f(attributeValue2); Objects.requireNonNull(f10); switch (f10.hashCode()) { case 1596796: break; case 2937391: if (f10.equals("a000")) { c11 = 1; break; } c11 = 65535; break; case 3094035: if (f10.equals("f801")) { c11 = 2; break; } c11 = 65535; break; case 3133436: if (f10.equals("fa01")) { c11 = 3; break; } c11 = 65535; break; default: c11 = 65535; break; } if (c11 == 0) { i10 = 1; } else if (c11 == 1) { i10 = 2; } else if (c11 == 2) { i10 = 6; } else if (c11 == 3) { i10 = 8; } } } else { i10 = n(xmlPullParser, "value", -1); } do { xmlPullParser.next(); } while (!e.h.f(xmlPullParser, "AudioChannelConfiguration")); return i10; } public long g(XmlPullParser xmlPullParser, long j10) { String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset"); if (attributeValue == null) { return j10; } if ("INF".equals(attributeValue)) { return Long.MAX_VALUE; } return Float.parseFloat(attributeValue) * 1000000.0f; } public List<b> h(XmlPullParser xmlPullParser, List<b> list, boolean z10) { String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority"); int parseInt = attributeValue != null ? Integer.parseInt(attributeValue) : z10 ? 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 x10 = x(xmlPullParser, "BaseURL"); if ((x10 == null || y.a(x10)[0] == -1) ? false : true) { if (attributeValue3 == null) { attributeValue3 = x10; } return fb.f0.b(new b(x10, attributeValue3, parseInt, parseInt2)); } ArrayList arrayList = new ArrayList(); for (int i10 = 0; i10 < list.size(); i10++) { b bVar = list.get(i10); String c10 = y.c(bVar.f40979a, x10); String str = attributeValue3 == null ? c10 : attributeValue3; if (z10) { parseInt = bVar.f40981c; parseInt2 = bVar.f40982d; str = bVar.f40980b; } arrayList.add(new b(c10, str, parseInt, parseInt2)); } return arrayList; } public Pair<String, DrmInitData.SchemeData> i(XmlPullParser xmlPullParser) { String str; UUID uuid; byte[] bArr; String str2; boolean z10; UUID uuid2; char c10; UUID uuid3; String str3; String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri"); if (attributeValue != null) { String f10 = n0.b.f(attributeValue); Objects.requireNonNull(f10); int hashCode = f10.hashCode(); if (hashCode == 489446379) { if (f10.equals("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95")) { c10 = 0; if (c10 != 0) { } uuid = uuid3; str = null; } c10 = 65535; if (c10 != 0) { } uuid = uuid3; str = null; } else if (hashCode != 755418770) { if (hashCode == 1812765994 && f10.equals("urn:mpeg:dash:mp4protection:2011")) { c10 = 2; if (c10 != 0) { uuid3 = i5.i.f32307e; } else if (c10 == 1) { uuid3 = i5.i.f32306d; } else if (c10 == 2) { str = xmlPullParser.getAttributeValue(null, "value"); int attributeCount = xmlPullParser.getAttributeCount(); int i10 = 0; while (true) { if (i10 >= attributeCount) { str3 = null; break; } String attributeName = xmlPullParser.getAttributeName(i10); int indexOf = attributeName.indexOf(58); if (indexOf != -1) { attributeName = attributeName.substring(indexOf + 1); } if (attributeName.equals("default_KID")) { str3 = xmlPullParser.getAttributeValue(i10); break; } i10++; } if (!TextUtils.isEmpty(str3) && !"00000000-0000-0000-0000-000000000000".equals(str3)) { String[] split = str3.split("\\s+"); UUID[] uuidArr = new UUID[split.length]; for (int i11 = 0; i11 < split.length; i11++) { uuidArr[i11] = UUID.fromString(split[i11]); } uuid = i5.i.f32304b; bArr = b6.i.b(uuid, uuidArr, null); str2 = null; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "ms:laurl")) { str2 = xmlPullParser.getAttributeValue(null, "licenseUrl"); } else { if (bArr == null) { if (e.h.g(xmlPullParser)) { String name = xmlPullParser.getName(); int indexOf2 = name.indexOf(58); if (indexOf2 != -1) { name = name.substring(indexOf2 + 1); } if (name.equals("pssh")) { z10 = true; if (z10 && xmlPullParser.next() == 4) { byte[] decode = Base64.decode(xmlPullParser.getText(), 0); i.a c11 = b6.i.c(decode); uuid2 = c11 != null ? null : c11.f13445a; if (uuid2 != null) { Log.w("MpdParser", "Skipping malformed cenc:pssh data"); uuid = uuid2; bArr = null; } else { UUID uuid4 = uuid2; bArr = decode; uuid = uuid4; } } } } z10 = false; if (z10) { byte[] decode2 = Base64.decode(xmlPullParser.getText(), 0); i.a c112 = b6.i.c(decode2); if (c112 != null) { } if (uuid2 != null) { } } } if (bArr == null) { UUID uuid5 = i5.i.f32307e; if (uuid5.equals(uuid) && e.h.h(xmlPullParser, "mspr:pro") && xmlPullParser.next() == 4) { bArr = b6.i.a(uuid5, Base64.decode(xmlPullParser.getText(), 0)); } } e(xmlPullParser); } } while (!e.h.f(xmlPullParser, "ContentProtection")); return Pair.create(str, uuid != null ? new DrmInitData.SchemeData(uuid, str2, "video/mp4", bArr) : null); } uuid = null; } uuid = uuid3; str = null; } c10 = 65535; if (c10 != 0) { } uuid = uuid3; str = null; } else { if (f10.equals("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed")) { c10 = 1; if (c10 != 0) { } uuid = uuid3; str = null; } c10 = 65535; if (c10 != 0) { } uuid = uuid3; str = null; } bArr = null; str2 = null; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "ms:laurl")) { } } while (!e.h.f(xmlPullParser, "ContentProtection")); return Pair.create(str, uuid != null ? new DrmInitData.SchemeData(uuid, str2, "video/mp4", bArr) : null); } str = null; uuid = null; bArr = null; str2 = null; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "ms:laurl")) { } } while (!e.h.f(xmlPullParser, "ContentProtection")); return Pair.create(str, uuid != null ? new DrmInitData.SchemeData(uuid, str2, "video/mp4", bArr) : null); } public int j(XmlPullParser xmlPullParser) { String attributeValue = xmlPullParser.getAttributeValue(null, "contentType"); if (!TextUtils.isEmpty(attributeValue)) { if ("audio".equals(attributeValue)) { return 1; } if ("video".equals(attributeValue)) { return 2; } if ("text".equals(attributeValue)) { return 3; } } return -1; } public c p(XmlPullParser xmlPullParser, Uri uri) { int i10; boolean z10; ArrayList arrayList; ArrayList arrayList2; ArrayList arrayList3; boolean z11; long j10; ArrayList arrayList4; String str; String str2; String str3; long j11; String str4; ArrayList arrayList5; String str5; ArrayList arrayList6; long j12; ArrayList arrayList7; String str6; String str7; ArrayList arrayList8; ArrayList arrayList9; XmlPullParser xmlPullParser2; long j13; String str8; String str9; long j14; ArrayList arrayList10; String str10; ArrayList arrayList11; String str11; ArrayList arrayList12; long j15; ArrayList arrayList13; ArrayList arrayList14; String str12; String str13; String str14; String str15; ArrayList arrayList15; float f10; int i11; ArrayList arrayList16; ArrayList arrayList17; d dVar; ArrayList arrayList18; ArrayList arrayList19; ArrayList arrayList20; String str16; ArrayList arrayList21; XmlPullParser xmlPullParser3; String str17; int i12; String str18; int i13; String str19; long j16; String str20; d dVar2; XmlPullParser xmlPullParser4; ArrayList arrayList22; XmlPullParser xmlPullParser5; int i14; ArrayList arrayList23; ArrayList arrayList24; String str21; String str22; ArrayList arrayList25; String str23; String str24; String str25; int i15; ArrayList arrayList26; String str26; String str27; String str28; ArrayList arrayList27; String str29; int i16; String str30; int i17; int i18; ArrayList arrayList28; ArrayList arrayList29; XmlPullParser xmlPullParser6; String str31; String str32; String str33; String str34; ArrayList arrayList30; String str35; ArrayList arrayList31; String str36; ArrayList arrayList32; ArrayList arrayList33; String str37; String str38; String str39; int i19; String str40; String str41; String e10; String j17; int i20; String str42; int parseInt; String str43; String str44; int i21; char c10; ArrayList arrayList34; String str45; String str46; long j18; String str47; Object bVar; String str48; boolean z12; String str49; long j19; float f11; float f12; float parseFloat; d dVar3 = this; XmlPullParser xmlPullParser7 = xmlPullParser; String[] strArr = new String[0]; String str50 = null; String attributeValue = xmlPullParser7.getAttributeValue(null, "profiles"); if (attributeValue != null) { strArr = attributeValue.split(","); } int length = strArr.length; int i22 = 0; while (true) { i10 = 1; if (i22 >= length) { z10 = false; break; } if (strArr[i22].startsWith("urn:dvb:dash:profile:dvb-dash:")) { z10 = true; break; } i22++; } String attributeValue2 = xmlPullParser7.getAttributeValue(null, "availabilityStartTime"); long P = attributeValue2 == null ? -9223372036854775807L : z.P(attributeValue2); long l10 = l(xmlPullParser7, "mediaPresentationDuration", -9223372036854775807L); long l11 = l(xmlPullParser7, "minBufferTime", -9223372036854775807L); boolean equals = "dynamic".equals(xmlPullParser7.getAttributeValue(null, "type")); long l12 = equals ? l(xmlPullParser7, "minimumUpdatePeriod", -9223372036854775807L) : -9223372036854775807L; long l13 = equals ? l(xmlPullParser7, "timeShiftBufferDepth", -9223372036854775807L) : -9223372036854775807L; long l14 = equals ? l(xmlPullParser7, "suggestedPresentationDelay", -9223372036854775807L) : -9223372036854775807L; String attributeValue3 = xmlPullParser7.getAttributeValue(null, "publishTime"); long P2 = attributeValue3 == null ? -9223372036854775807L : z.P(attributeValue3); long j20 = equals ? 0L : -9223372036854775807L; ArrayList b10 = fb.f0.b(new b(uri.toString(), uri.toString(), z10 ? 1 : Integer.MIN_VALUE, 1)); ArrayList arrayList35 = new ArrayList(); ArrayList arrayList36 = new ArrayList(); h hVar = null; m mVar = null; Uri uri2 = null; l lVar = null; boolean z13 = false; boolean z14 = false; long j21 = j20; long j22 = equals ? -9223372036854775807L : 0L; while (true) { xmlPullParser.next(); String str51 = "BaseURL"; if (e.h.h(xmlPullParser7, "BaseURL")) { if (!z13) { j21 = dVar3.g(xmlPullParser7, j21); z13 = true; } arrayList36.addAll(dVar3.h(xmlPullParser7, b10, z10)); } else { String str52 = "lang"; if (e.h.h(xmlPullParser7, "ProgramInformation")) { String attributeValue4 = xmlPullParser7.getAttributeValue(str50, "moreInformationURL"); String str53 = attributeValue4 == null ? str50 : attributeValue4; String attributeValue5 = xmlPullParser7.getAttributeValue(str50, "lang"); String str54 = attributeValue5 == null ? str50 : attributeValue5; String str55 = str50; String str56 = str55; do { xmlPullParser.next(); if (e.h.h(xmlPullParser7, "Title")) { str50 = xmlPullParser.nextText(); } else if (e.h.h(xmlPullParser7, "Source")) { str55 = xmlPullParser.nextText(); } else if (e.h.h(xmlPullParser7, "Copyright")) { str56 = xmlPullParser.nextText(); } else { e(xmlPullParser); } } while (!e.h.f(xmlPullParser7, "ProgramInformation")); hVar = new h(str50, str55, str56, str53, str54); } else if (e.h.h(xmlPullParser7, "UTCTiming")) { mVar = new m(xmlPullParser7.getAttributeValue(str50, "schemeIdUri"), xmlPullParser7.getAttributeValue(str50, "value"), i10); } else if (e.h.h(xmlPullParser7, "Location")) { uri2 = Uri.parse(xmlPullParser.nextText()); } else if (e.h.h(xmlPullParser7, "ServiceDescription")) { float f13 = -3.4028235E38f; long j23 = -9223372036854775807L; float f14 = -3.4028235E38f; long j24 = -9223372036854775807L; long j25 = -9223372036854775807L; while (true) { xmlPullParser.next(); float f15 = f13; if (e.h.h(xmlPullParser7, "Latency")) { j19 = j21; f11 = f14; j23 = o(xmlPullParser7, "target", -9223372036854775807L); j24 = o(xmlPullParser7, Constants.CE_SKIP_MIN, -9223372036854775807L); j25 = o(xmlPullParser7, "max", -9223372036854775807L); } else { j19 = j21; f11 = f14; if (e.h.h(xmlPullParser7, "PlaybackRate")) { String attributeValue6 = xmlPullParser7.getAttributeValue(null, Constants.CE_SKIP_MIN); float parseFloat2 = attributeValue6 == null ? -3.4028235E38f : Float.parseFloat(attributeValue6); String attributeValue7 = xmlPullParser7.getAttributeValue(null, "max"); f12 = parseFloat2; parseFloat = attributeValue7 == null ? -3.4028235E38f : Float.parseFloat(attributeValue7); long j26 = j23; long j27 = j24; long j28 = j25; if (e.h.f(xmlPullParser7, "ServiceDescription")) { j21 = j19; j23 = j26; j24 = j27; j25 = j28; f13 = f12; f14 = parseFloat; } else { lVar = new l(j26, j27, j28, f12, parseFloat); j21 = j19; } } } f12 = f15; parseFloat = f11; long j262 = j23; long j272 = j24; long j282 = j25; if (e.h.f(xmlPullParser7, "ServiceDescription")) { } } } else { long j29 = j21; String str57 = "Period"; if (!e.h.h(xmlPullParser7, "Period") || z14) { arrayList = arrayList36; arrayList2 = b10; arrayList3 = arrayList35; z11 = z10; j10 = -9223372036854775807L; e(xmlPullParser); j22 = j22; } else { ArrayList arrayList37 = !arrayList36.isEmpty() ? arrayList36 : b10; String str58 = "id"; String attributeValue8 = xmlPullParser7.getAttributeValue(null, "id"); long l15 = l(xmlPullParser7, "start", j22); String str59 = "value"; long j30 = P != -9223372036854775807L ? P + l15 : -9223372036854775807L; String str60 = VastIconXmlManager.DURATION; long l16 = l(xmlPullParser7, VastIconXmlManager.DURATION, -9223372036854775807L); String str61 = "schemeIdUri"; ArrayList arrayList38 = new ArrayList(); ArrayList arrayList39 = new ArrayList(); ArrayList arrayList40 = new ArrayList(); k kVar = null; e eVar = null; long j31 = -9223372036854775807L; ArrayList arrayList41 = b10; ArrayList arrayList42 = arrayList35; XmlPullParser xmlPullParser8 = xmlPullParser7; long j32 = j29; boolean z15 = false; d dVar4 = this; while (true) { xmlPullParser.next(); if (e.h.h(xmlPullParser8, str51)) { if (!z15) { j32 = dVar4.g(xmlPullParser8, j32); z15 = true; } arrayList40.addAll(dVar4.h(xmlPullParser8, arrayList37, z10)); arrayList4 = arrayList37; str2 = str57; str3 = str52; j11 = j22; arrayList = arrayList36; str4 = str51; z11 = z10; arrayList5 = arrayList40; arrayList7 = arrayList39; arrayList2 = arrayList41; arrayList6 = arrayList42; str5 = str60; str6 = str58; } else { String str62 = str60; String str63 = "SegmentTemplate"; long j33 = j32; if (e.h.h(xmlPullParser8, "AdaptationSet")) { String str64 = "AdaptationSet"; ArrayList arrayList43 = !arrayList40.isEmpty() ? arrayList40 : arrayList37; int n10 = n(xmlPullParser8, str58, -1); int j34 = j(xmlPullParser); arrayList5 = arrayList40; String str65 = "mimeType"; String attributeValue9 = xmlPullParser8.getAttributeValue(null, "mimeType"); ArrayList arrayList44 = arrayList36; String attributeValue10 = xmlPullParser8.getAttributeValue(null, "codecs"); ArrayList arrayList45 = arrayList37; j11 = j22; int n11 = n(xmlPullParser8, "width", -1); int n12 = n(xmlPullParser8, "height", -1); String str66 = str57; float m10 = m(xmlPullParser8, -1.0f); String str67 = "SegmentList"; String str68 = "SegmentBase"; int n13 = n(xmlPullParser8, "audioSamplingRate", -1); String attributeValue11 = xmlPullParser8.getAttributeValue(null, str52); String str69 = "audioSamplingRate"; String attributeValue12 = xmlPullParser8.getAttributeValue(null, "label"); ArrayList arrayList46 = new ArrayList(); ArrayList arrayList47 = new ArrayList(); ArrayList arrayList48 = new ArrayList(); String str70 = attributeValue12; ArrayList arrayList49 = new ArrayList(); float f16 = m10; ArrayList arrayList50 = new ArrayList(); int i23 = n12; ArrayList arrayList51 = new ArrayList(); String str71 = "height"; ArrayList arrayList52 = new ArrayList(); ArrayList arrayList53 = new ArrayList(); String str72 = null; int i24 = -1; boolean z16 = false; ArrayList arrayList54 = arrayList51; String str73 = str58; String str74 = "codecs"; k kVar2 = kVar; long j35 = j31; long j36 = j33; XmlPullParser xmlPullParser9 = xmlPullParser; String str75 = "width"; int i25 = j34; int i26 = n11; String str76 = attributeValue11; while (true) { xmlPullParser.next(); if (e.h.h(xmlPullParser9, str51)) { if (!z16) { j36 = dVar4.g(xmlPullParser9, j36); z16 = true; } arrayList53.addAll(dVar4.h(xmlPullParser9, arrayList43, z10)); j18 = j36; arrayList12 = arrayList43; } else { arrayList12 = arrayList43; if (e.h.h(xmlPullParser9, "ContentProtection")) { Pair<String, DrmInitData.SchemeData> i27 = i(xmlPullParser); j15 = j36; Object obj = i27.first; if (obj != null) { str72 = (String) obj; } Object obj2 = i27.second; if (obj2 != null) { arrayList46.add((DrmInitData.SchemeData) obj2); } } else { j15 = j36; if (e.h.h(xmlPullParser9, "ContentComponent")) { String attributeValue13 = xmlPullParser9.getAttributeValue(null, str52); if (str76 == null) { str76 = attributeValue13; } else if (attributeValue13 != null) { c0.a.f(str76.equals(attributeValue13)); } i25 = c(i25, j(xmlPullParser)); } else { if (e.h.h(xmlPullParser9, "Role")) { arrayList49.add(k(xmlPullParser9, "Role")); } else { String str77 = "AudioChannelConfiguration"; if (e.h.h(xmlPullParser9, "AudioChannelConfiguration")) { i24 = f(xmlPullParser); } else if (e.h.h(xmlPullParser9, "Accessibility")) { arrayList48.add(k(xmlPullParser9, "Accessibility")); } else if (e.h.h(xmlPullParser9, "EssentialProperty")) { arrayList50.add(k(xmlPullParser9, "EssentialProperty")); } else { arrayList13 = arrayList46; if (e.h.h(xmlPullParser9, "SupplementalProperty")) { arrayList34 = arrayList54; arrayList34.add(k(xmlPullParser9, "SupplementalProperty")); xmlPullParser4 = xmlPullParser; arrayList14 = arrayList53; str4 = str51; str12 = str65; str5 = str62; str13 = str64; str20 = str63; str14 = str75; arrayList4 = arrayList45; str2 = str66; str19 = str68; str15 = str69; arrayList22 = arrayList47; f10 = f16; i11 = i23; arrayList16 = arrayList52; str = str73; arrayList17 = arrayList12; dVar2 = dVar4; i13 = i25; arrayList18 = arrayList34; arrayList19 = arrayList50; str3 = str52; arrayList20 = arrayList48; z11 = z10; arrayList2 = arrayList41; str16 = str71; arrayList21 = arrayList49; j16 = j35; String str78 = str74; str17 = str76; long j37 = j33; arrayList6 = arrayList42; j12 = j37; i12 = n13; arrayList = arrayList44; str18 = str78; xmlPullParser5 = xmlPullParser9; j35 = j16; xmlPullParser9 = xmlPullParser5; i25 = i13; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { z10 = z11; str70 = str45; str74 = str18; arrayList44 = arrayList; arrayList43 = arrayList17; dVar4 = dVar2; arrayList48 = arrayList20; str52 = str3; arrayList49 = arrayList21; str71 = str16; arrayList50 = arrayList19; arrayList46 = arrayList13; arrayList53 = arrayList14; str51 = str4; str69 = str15; str73 = str; arrayList52 = arrayList16; arrayList47 = arrayList22; str63 = str20; str75 = str14; n13 = i12; i23 = i11; f16 = f10; arrayList45 = arrayList4; str65 = str12; str62 = str5; str66 = str2; arrayList54 = arrayList18; str68 = str19; ArrayList arrayList55 = arrayList2; str64 = str46; j36 = j15; long j38 = j12; arrayList41 = arrayList55; arrayList42 = arrayList6; j33 = j38; } else { ArrayList arrayList56 = new ArrayList(arrayList16.size()); int i28 = 0; while (i28 < arrayList16.size()) { ArrayList arrayList57 = arrayList16; a aVar = (a) arrayList57.get(i28); f0.b b11 = aVar.f41001a.b(); if (str45 != null) { b11.f32273b = str45; } String str79 = aVar.f41004d; if (str79 == null) { str79 = str72; } ArrayList<DrmInitData.SchemeData> arrayList58 = aVar.f41005e; ArrayList arrayList59 = arrayList13; arrayList58.addAll(arrayList59); if (arrayList58.isEmpty()) { str47 = str45; } else { int size = arrayList58.size() - 1; while (size >= 0) { DrmInitData.SchemeData schemeData = arrayList58.get(size); if (!schemeData.a()) { int i29 = 0; while (i29 < arrayList58.size()) { DrmInitData.SchemeData schemeData2 = arrayList58.get(i29); if (!schemeData2.a() || schemeData.a()) { str48 = str45; } else { str48 = str45; if (schemeData2.b(schemeData.f14841b)) { z12 = true; if (z12) { i29++; str45 = str48; } else { arrayList58.remove(size); size--; str45 = str48; } } } z12 = false; if (z12) { } } } str48 = str45; size--; str45 = str48; } str47 = str45; b11.f32285n = new DrmInitData(str79, false, (DrmInitData.SchemeData[]) arrayList58.toArray(new DrmInitData.SchemeData[0])); } ArrayList<e> arrayList60 = aVar.f41006f; arrayList60.addAll(arrayList22); long j39 = aVar.f41007g; f0 a10 = b11.a(); v<b> vVar = aVar.f41002b; k kVar3 = aVar.f41003c; List<e> list = aVar.f41008h; List<e> list2 = aVar.f41009i; if (kVar3 instanceof k.e) { bVar = new j.c(j39, a10, vVar, (k.e) kVar3, arrayList60, list, list2, null, -1L); } else { if (!(kVar3 instanceof k.a)) { throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or MultiSegmentBase"); } bVar = new j.b(j39, a10, vVar, (k.a) kVar3, arrayList60, list, list2); } arrayList56.add(bVar); i28++; arrayList16 = arrayList57; arrayList13 = arrayList59; str45 = str47; } arrayList38.add(new t6.a(n10, i25, arrayList56, arrayList20, arrayList19, arrayList18)); xmlPullParser8 = xmlPullParser4; arrayList10 = arrayList39; dVar4 = dVar2; } } else { String str80 = "SupplementalProperty"; ArrayList arrayList61 = arrayList54; String str81 = "EssentialProperty"; ArrayList arrayList62 = arrayList61; String str82 = "Representation"; if (e.h.h(xmlPullParser9, "Representation")) { if (arrayList53.isEmpty()) { arrayList23 = arrayList49; arrayList24 = arrayList48; str21 = null; str22 = "InbandEventStream"; arrayList25 = arrayList12; } else { arrayList23 = arrayList49; arrayList24 = arrayList48; str21 = null; str22 = "InbandEventStream"; arrayList25 = arrayList53; } String str83 = str73; String str84 = str52; String attributeValue14 = xmlPullParser9.getAttributeValue(str21, str83); int i30 = i25; String str85 = str83; int n14 = n(xmlPullParser9, "bandwidth", -1); String attributeValue15 = xmlPullParser9.getAttributeValue(str21, str65); if (attributeValue15 == null) { attributeValue15 = attributeValue9; } String str86 = str74; String str87 = attributeValue14; String attributeValue16 = xmlPullParser9.getAttributeValue(str21, str86); str12 = str65; if (attributeValue16 == null) { str24 = str75; str23 = attributeValue10; int i31 = i26; str25 = str76; i15 = i31; } else { String str88 = str75; str23 = attributeValue16; str24 = str88; int i32 = i26; str25 = str76; i15 = i32; } int n15 = n(xmlPullParser9, str24, i15); int i33 = i15; String str89 = str71; int i34 = i23; int i35 = n14; int i36 = i34; float f17 = f16; int n16 = n(xmlPullParser9, str89, i34); float m11 = m(xmlPullParser9, f17); String str90 = str69; String str91 = "ContentProtection"; int i37 = n13; String str92 = str86; int n17 = n(xmlPullParser9, str90, i37); str15 = str90; ArrayList arrayList63 = new ArrayList(); ArrayList arrayList64 = new ArrayList(); ArrayList arrayList65 = new ArrayList(arrayList50); ArrayList arrayList66 = new ArrayList(arrayList62); ArrayList arrayList67 = new ArrayList(); String str93 = null; boolean z17 = false; String str94 = str24; String str95 = attributeValue15; int i38 = i37; int i39 = n17; int i40 = i24; long j40 = j35; k kVar4 = kVar2; long j41 = j15; while (true) { xmlPullParser.next(); if (e.h.h(xmlPullParser9, str51)) { if (!z17) { j41 = dVar4.g(xmlPullParser9, j41); z17 = true; } arrayList26 = arrayList62; arrayList67.addAll(dVar4.h(xmlPullParser9, arrayList25, z10)); } else { arrayList26 = arrayList62; if (e.h.h(xmlPullParser9, str77)) { i40 = f(xmlPullParser); } else { str26 = str68; if (e.h.h(xmlPullParser9, str26)) { str40 = str77; kVar4 = dVar4.t(xmlPullParser9, (k.e) kVar4); str28 = str26; str5 = str62; str13 = str64; str2 = str66; str27 = str67; str29 = str25; str37 = str91; arrayList15 = arrayList47; i16 = i35; arrayList16 = arrayList52; str30 = str87; str3 = str84; arrayList17 = arrayList12; str34 = str22; i17 = i30; str = str85; i26 = i33; i18 = i39; arrayList30 = arrayList63; str14 = str94; arrayList19 = arrayList50; f10 = f17; str16 = str89; arrayList14 = arrayList53; str4 = str51; arrayList28 = arrayList67; arrayList27 = arrayList25; arrayList2 = arrayList41; str32 = str63; str35 = str81; str36 = str80; arrayList29 = arrayList23; arrayList31 = arrayList64; arrayList32 = arrayList65; arrayList33 = arrayList66; dVar = dVar4; xmlPullParser6 = xmlPullParser9; z11 = z10; arrayList4 = arrayList45; str31 = str40; str38 = str82; i11 = i36; str39 = str93; i19 = i40; arrayList18 = arrayList26; long j42 = j33; arrayList6 = arrayList42; j12 = j42; i12 = i38; String str96 = str92; arrayList = arrayList44; str18 = str96; if (e.h.f(xmlPullParser6, str38)) { if (o.k(str95)) { j17 = o.b(str23); } else if (o.n(str95)) { j17 = o.j(str23); } else { if (o.m(str95)) { str41 = str95; if ("application/x-rawcc".equals(str41)) { if (str23 != null) { for (String str97 : z.W(str23)) { String e11 = o.e(str97); if (e11 != null && o.m(e11)) { e10 = e11; String str98 = "ec+3"; if ("audio/eac3".equals(e10)) { for (int i41 = 0; i41 < arrayList33.size(); i41++) { e eVar2 = (e) arrayList33.get(i41); String str99 = eVar2.f41010a; if (("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str99) && "JOC".equals(eVar2.f41011b)) || ("tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str99) && "ec+3".equals(eVar2.f41011b))) { e10 = "audio/eac3-joc"; } } e10 = "audio/eac3"; } str98 = str23; int i42 = 0; i20 = 0; while (true) { String str100 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { ArrayList arrayList68 = arrayList29; e eVar3 = (e) arrayList68.get(i20); if (n0.b.d("urn:mpeg:dash:role:2011", eVar3.f41010a)) { String str101 = eVar3.f41011b; i42 |= (str101 != null && (str101.equals("forced_subtitle") || str101.equals("forced-subtitle"))) ? 2 : 0; } i20++; arrayList29 = arrayList68; } else { ArrayList arrayList69 = arrayList29; int i43 = 0; int i44 = 0; while (i44 < arrayList69.size()) { e eVar4 = (e) arrayList69.get(i44); ArrayList arrayList70 = arrayList69; if (n0.b.d("urn:mpeg:dash:role:2011", eVar4.f41010a)) { i43 |= dVar.r(eVar4.f41011b); } i44++; arrayList69 = arrayList70; } ArrayList arrayList71 = arrayList69; int i45 = 0; int i46 = 0; while (i46 < arrayList24.size()) { ArrayList arrayList72 = arrayList24; ArrayList arrayList73 = arrayList31; e eVar5 = (e) arrayList72.get(i46); ArrayList arrayList74 = arrayList30; if (n0.b.d(str100, eVar5.f41010a)) { i45 |= dVar.r(eVar5.f41011b); str44 = str100; } else { str44 = str100; if (n0.b.d("urn:tva:metadata:cs:AudioPurposeCS:2007", eVar5.f41010a)) { String str102 = eVar5.f41011b; if (str102 != null) { switch (str102.hashCode()) { case 49: if (str102.equals("1")) { c10 = 0; break; } break; case 50: if (str102.equals("2")) { c10 = 1; break; } break; case 51: if (str102.equals("3")) { c10 = 2; break; } break; case 52: if (str102.equals("4")) { c10 = 3; break; } break; case 54: if (str102.equals("6")) { c10 = 4; break; } break; } c10 = 65535; if (c10 == 0) { i21 = 512; } else if (c10 == 1) { i21 = 2048; } else if (c10 == 2) { i21 = 4; } else if (c10 == 3) { i21 = 8; } else if (c10 == 4) { i21 = 1; } i45 = i21 | i45; } i21 = 0; i45 = i21 | i45; } } i46++; arrayList24 = arrayList72; str100 = str44; arrayList30 = arrayList74; arrayList31 = arrayList73; } ArrayList arrayList75 = arrayList30; ArrayList arrayList76 = arrayList31; ArrayList arrayList77 = arrayList24; int s4 = i43 | i45 | dVar.s(arrayList32) | dVar.s(arrayList33); f0.b bVar2 = new f0.b(); bVar2.f32272a = str30; bVar2.f32281j = str41; bVar2.f32282k = e10; bVar2.f32279h = str98; bVar2.f32278g = i16; bVar2.f32275d = i42; bVar2.f32276e = s4; String str103 = str29; bVar2.f32274c = str103; if (o.n(e10)) { bVar2.f32287p = n15; bVar2.f32288q = n16; bVar2.f32289r = m11; } else { int i47 = n16; if (o.k(e10)) { bVar2.f32295x = i19; bVar2.f32296y = i18; } else if (o.m(e10)) { if ("application/cea-608".equals(e10)) { for (int i48 = 0; i48 < arrayList77.size(); i48++) { e eVar6 = (e) arrayList77.get(i48); if ("urn:scte:dash:cc:cea-608:2015".equals(eVar6.f41010a) && (str43 = eVar6.f41011b) != null) { Matcher matcher = f40997c.matcher(str43); if (matcher.matches()) { parseInt = Integer.parseInt(matcher.group(1)); bVar2.C = parseInt; } else { t1.b.a(android.support.v4.media.b.a("Unable to parse CEA-608 channel number from: "), eVar6.f41011b, "MpdParser"); } } } parseInt = -1; bVar2.C = parseInt; } else { if ("application/cea-708".equals(e10)) { for (int i49 = 0; i49 < arrayList77.size(); i49++) { e eVar7 = (e) arrayList77.get(i49); if ("urn:scte:dash:cc:cea-708:2015".equals(eVar7.f41010a) && (str42 = eVar7.f41011b) != null) { Matcher matcher2 = f40998d.matcher(str42); if (matcher2.matches()) { parseInt = Integer.parseInt(matcher2.group(1)); bVar2.C = parseInt; } else { t1.b.a(android.support.v4.media.b.a("Unable to parse CEA-708 service block number from: "), eVar7.f41011b, "MpdParser"); } } } } parseInt = -1; bVar2.C = parseInt; } } else if (o.l(e10)) { bVar2.f32287p = n15; bVar2.f32288q = i47; } } f0 a11 = bVar2.a(); a aVar2 = new a(a11, !arrayList28.isEmpty() ? arrayList28 : arrayList27, kVar4 != null ? kVar4 : new k.e(), str39, arrayList75, arrayList76, arrayList32, arrayList33, -1L); int c11 = c(i17, o.i(a11.f32257l)); arrayList16.add(aVar2); xmlPullParser3 = xmlPullParser; str17 = str103; i25 = c11; arrayList20 = arrayList77; str20 = str32; arrayList21 = arrayList71; str67 = str27; str19 = str28; } } } } } e10 = null; String str982 = "ec+3"; if ("audio/eac3".equals(e10)) { } str982 = str23; int i422 = 0; i20 = 0; while (true) { String str1002 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { } i20++; arrayList29 = arrayList68; } } e10 = str41; String str9822 = "ec+3"; if ("audio/eac3".equals(e10)) { } str9822 = str23; int i4222 = 0; i20 = 0; while (true) { String str10022 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { } i20++; arrayList29 = arrayList68; } } else { str41 = str95; if (!o.l(str41)) { if ("application/mp4".equals(str41)) { e10 = o.e(str23); if ("text/vtt".equals(e10)) { e10 = "application/x-mp4-vtt"; } String str98222 = "ec+3"; if ("audio/eac3".equals(e10)) { } str98222 = str23; int i42222 = 0; i20 = 0; while (true) { String str100222 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { } i20++; arrayList29 = arrayList68; } } e10 = null; String str982222 = "ec+3"; if ("audio/eac3".equals(e10)) { } str982222 = str23; int i422222 = 0; i20 = 0; while (true) { String str1002222 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { } i20++; arrayList29 = arrayList68; } } e10 = str41; String str9822222 = "ec+3"; if ("audio/eac3".equals(e10)) { } str9822222 = str23; int i4222222 = 0; i20 = 0; while (true) { String str10022222 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { } i20++; arrayList29 = arrayList68; } } xmlPullParser9 = xmlPullParser4; arrayList22 = arrayList15; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { } } e10 = j17; str41 = str95; String str98222222 = "ec+3"; if ("audio/eac3".equals(e10)) { } str98222222 = str23; int i42222222 = 0; i20 = 0; while (true) { String str100222222 = "urn:mpeg:dash:role:2011"; if (i20 < arrayList29.size()) { } i20++; arrayList29 = arrayList68; } } else { arrayList64 = arrayList31; str82 = str38; arrayList63 = arrayList30; arrayList65 = arrayList32; str93 = str39; arrayList66 = arrayList33; i40 = i19; dVar4 = dVar; z10 = z11; i38 = i12; i36 = i11; f17 = f10; arrayList25 = arrayList27; arrayList62 = arrayList18; arrayList12 = arrayList17; str63 = str32; arrayList45 = arrayList4; n16 = n16; arrayList67 = arrayList28; arrayList53 = arrayList14; str51 = str4; i30 = i17; str85 = str; str67 = str27; str66 = str2; str68 = str28; arrayList47 = arrayList15; str91 = str37; str87 = str30; i39 = i18; xmlPullParser9 = xmlPullParser; str22 = str34; str81 = str35; str80 = str36; i33 = i26; str89 = str16; arrayList50 = arrayList19; str77 = str31; arrayList23 = arrayList29; arrayList52 = arrayList16; str25 = str29; str94 = str14; str84 = str3; str62 = str5; i35 = i16; long j43 = j12; arrayList41 = arrayList2; arrayList42 = arrayList6; str64 = str13; j33 = j43; ArrayList arrayList78 = arrayList; str92 = str18; arrayList44 = arrayList78; } } else { String str104 = str77; String str105 = str67; if (e.h.h(xmlPullParser9, str105)) { long g10 = dVar4.g(xmlPullParser9, j40); arrayList27 = arrayList25; dVar = dVar4; String str106 = str94; arrayList29 = arrayList23; str5 = str62; str13 = str64; str14 = str106; i17 = i30; str27 = str105; arrayList28 = arrayList67; str31 = str104; String str107 = str81; str = str85; arrayList18 = arrayList26; arrayList4 = arrayList45; i11 = i36; str2 = str66; i16 = i35; str3 = str84; arrayList19 = arrayList50; f10 = f17; arrayList14 = arrayList53; str29 = str25; arrayList16 = arrayList52; i26 = i33; str16 = str89; str4 = str51; xmlPullParser6 = xmlPullParser9; String str108 = str92; arrayList = arrayList44; str18 = str108; str28 = str26; str37 = str91; arrayList15 = arrayList47; str30 = str87; arrayList17 = arrayList12; i18 = i39; arrayList2 = arrayList41; long j44 = j33; arrayList6 = arrayList42; j12 = j44; i12 = i38; kVar4 = u(xmlPullParser, (k.b) kVar4, j30, l16, j41, g10, l13); str32 = str63; str36 = str80; str34 = str22; str38 = str82; str35 = str107; str39 = str93; j41 = j41; arrayList30 = arrayList63; arrayList31 = arrayList64; arrayList32 = arrayList65; arrayList33 = arrayList66; j40 = g10; z11 = z10; } else { str27 = str105; str28 = str26; arrayList27 = arrayList25; str5 = str62; str13 = str64; str2 = str66; str29 = str25; String str109 = str91; arrayList15 = arrayList47; i16 = i35; arrayList16 = arrayList52; str30 = str87; str3 = str84; arrayList17 = arrayList12; i17 = i30; str = str85; i26 = i33; i18 = i39; str14 = str94; dVar = dVar4; arrayList19 = arrayList50; f10 = f17; str16 = str89; arrayList14 = arrayList53; str4 = str51; arrayList28 = arrayList67; arrayList2 = arrayList41; arrayList29 = arrayList23; xmlPullParser6 = xmlPullParser9; str31 = str104; arrayList18 = arrayList26; long j45 = j33; arrayList6 = arrayList42; j12 = j45; i12 = i38; long j46 = j41; String str110 = str63; String str111 = str92; arrayList = arrayList44; str18 = str111; String str112 = str81; arrayList4 = arrayList45; i11 = i36; if (e.h.h(xmlPullParser6, str110)) { long g11 = dVar.g(xmlPullParser6, j40); str32 = str110; z11 = z10; kVar4 = v(xmlPullParser, (k.c) kVar4, arrayList18, j30, l16, j46, g11, l13); arrayList30 = arrayList63; j40 = g11; str33 = str109; } else { str32 = str110; z11 = z10; str33 = str109; if (e.h.h(xmlPullParser6, str33)) { Pair<String, DrmInitData.SchemeData> i50 = i(xmlPullParser); Object obj3 = i50.first; if (obj3 != null) { str93 = (String) obj3; } Object obj4 = i50.second; if (obj4 != null) { arrayList30 = arrayList63; arrayList30.add((DrmInitData.SchemeData) obj4); } else { arrayList30 = arrayList63; } } else { str34 = str22; arrayList30 = arrayList63; if (e.h.h(xmlPullParser6, str34)) { arrayList31 = arrayList64; arrayList31.add(k(xmlPullParser6, str34)); str35 = str112; arrayList32 = arrayList65; str36 = str80; arrayList33 = arrayList66; str37 = str33; str38 = str82; str39 = str93; j41 = j46; } else { str35 = str112; arrayList31 = arrayList64; if (e.h.h(xmlPullParser6, str35)) { arrayList32 = arrayList65; arrayList32.add(k(xmlPullParser6, str35)); str36 = str80; arrayList33 = arrayList66; str37 = str33; str38 = str82; str39 = str93; j41 = j46; } else { str36 = str80; arrayList32 = arrayList65; if (e.h.h(xmlPullParser6, str36)) { arrayList33 = arrayList66; arrayList33.add(k(xmlPullParser6, str36)); } else { arrayList33 = arrayList66; e(xmlPullParser); } str37 = str33; str38 = str82; str39 = str93; j41 = j46; } } } } str34 = str22; arrayList31 = arrayList64; str35 = str112; arrayList32 = arrayList65; str36 = str80; arrayList33 = arrayList66; str37 = str33; str38 = str82; str39 = str93; j41 = j46; } i19 = i40; if (e.h.f(xmlPullParser6, str38)) { } } } } str26 = str68; str40 = str77; str28 = str26; str5 = str62; str13 = str64; str2 = str66; str27 = str67; str29 = str25; str37 = str91; arrayList15 = arrayList47; i16 = i35; arrayList16 = arrayList52; str30 = str87; str3 = str84; arrayList17 = arrayList12; str34 = str22; i17 = i30; str = str85; i26 = i33; i18 = i39; arrayList30 = arrayList63; str14 = str94; arrayList19 = arrayList50; f10 = f17; str16 = str89; arrayList14 = arrayList53; str4 = str51; arrayList28 = arrayList67; arrayList27 = arrayList25; arrayList2 = arrayList41; str32 = str63; str35 = str81; str36 = str80; arrayList29 = arrayList23; arrayList31 = arrayList64; arrayList32 = arrayList65; arrayList33 = arrayList66; dVar = dVar4; xmlPullParser6 = xmlPullParser9; z11 = z10; arrayList4 = arrayList45; str31 = str40; str38 = str82; i11 = i36; str39 = str93; i19 = i40; arrayList18 = arrayList26; long j422 = j33; arrayList6 = arrayList42; j12 = j422; i12 = i38; String str962 = str92; arrayList = arrayList44; str18 = str962; if (e.h.f(xmlPullParser6, str38)) { } } } else { arrayList14 = arrayList53; str4 = str51; str12 = str65; str5 = str62; str13 = str64; str14 = str75; arrayList4 = arrayList45; str2 = str66; String str113 = str67; String str114 = str68; str15 = str69; arrayList15 = arrayList47; f10 = f16; i11 = i23; arrayList16 = arrayList52; str = str73; arrayList17 = arrayList12; dVar = dVar4; arrayList18 = arrayList62; arrayList19 = arrayList50; str3 = str52; arrayList20 = arrayList48; arrayList2 = arrayList41; String str115 = str63; str16 = str71; arrayList21 = arrayList49; int i51 = i25; z11 = z10; xmlPullParser3 = xmlPullParser; String str116 = str74; str17 = str76; long j47 = j33; arrayList6 = arrayList42; j12 = j47; i12 = n13; arrayList = arrayList44; str18 = str116; if (e.h.h(xmlPullParser3, str114)) { kVar2 = dVar.t(xmlPullParser3, (k.e) kVar2); i14 = i51; str20 = str115; str19 = str114; str67 = str113; } else if (e.h.h(xmlPullParser3, str113)) { j35 = dVar.g(xmlPullParser3, j35); i14 = i51; str19 = str114; str67 = str113; str20 = str115; kVar2 = u(xmlPullParser, (k.b) kVar2, j30, l16, j15, j35, l13); } else { i13 = i51; str19 = str114; str67 = str113; j16 = j35; str20 = str115; if (e.h.h(xmlPullParser3, str20)) { j35 = dVar.g(xmlPullParser3, j16); dVar2 = dVar; xmlPullParser4 = xmlPullParser3; kVar2 = v(xmlPullParser, (k.c) kVar2, arrayList18, j30, l16, j15, j35, l13); i25 = i13; xmlPullParser9 = xmlPullParser4; arrayList22 = arrayList15; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { } } else { dVar2 = dVar; xmlPullParser4 = xmlPullParser3; if (e.h.h(xmlPullParser4, "InbandEventStream")) { arrayList22 = arrayList15; arrayList22.add(k(xmlPullParser4, "InbandEventStream")); } else { arrayList22 = arrayList15; if (e.h.h(xmlPullParser4, "Label")) { str70 = x(xmlPullParser4, "Label"); xmlPullParser5 = xmlPullParser4; j35 = j16; xmlPullParser9 = xmlPullParser5; i25 = i13; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { } } else if (e.h.g(xmlPullParser)) { e(xmlPullParser); } } xmlPullParser9 = xmlPullParser4; xmlPullParser5 = xmlPullParser9; j35 = j16; xmlPullParser9 = xmlPullParser5; i25 = i13; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { } } } i25 = i14; } dVar2 = dVar; xmlPullParser4 = xmlPullParser3; xmlPullParser9 = xmlPullParser4; arrayList22 = arrayList15; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { } } } } arrayList13 = arrayList46; arrayList34 = arrayList54; xmlPullParser4 = xmlPullParser; arrayList14 = arrayList53; str4 = str51; str12 = str65; str5 = str62; str13 = str64; str20 = str63; str14 = str75; arrayList4 = arrayList45; str2 = str66; str19 = str68; str15 = str69; arrayList22 = arrayList47; f10 = f16; i11 = i23; arrayList16 = arrayList52; str = str73; arrayList17 = arrayList12; dVar2 = dVar4; i13 = i25; arrayList18 = arrayList34; arrayList19 = arrayList50; str3 = str52; arrayList20 = arrayList48; z11 = z10; arrayList2 = arrayList41; str16 = str71; arrayList21 = arrayList49; j16 = j35; String str782 = str74; str17 = str76; long j372 = j33; arrayList6 = arrayList42; j12 = j372; i12 = n13; arrayList = arrayList44; str18 = str782; xmlPullParser5 = xmlPullParser9; j35 = j16; xmlPullParser9 = xmlPullParser5; i25 = i13; str45 = str70; str76 = str17; str46 = str13; if (e.h.f(xmlPullParser9, str46)) { } } } j18 = j15; } j15 = j18; arrayList14 = arrayList53; str4 = str51; str12 = str65; arrayList13 = arrayList46; str5 = str62; str46 = str64; str20 = str63; str14 = str75; str2 = str66; str19 = str68; str15 = str69; arrayList22 = arrayList47; f10 = f16; arrayList16 = arrayList52; str = str73; arrayList18 = arrayList54; arrayList17 = arrayList12; xmlPullParser4 = xmlPullParser; dVar2 = dVar4; arrayList19 = arrayList50; arrayList20 = arrayList48; z11 = z10; arrayList2 = arrayList41; arrayList4 = arrayList45; str45 = str70; i11 = i23; str16 = str71; arrayList21 = arrayList49; str3 = str52; long j48 = j33; arrayList6 = arrayList42; j12 = j48; i12 = n13; arrayList = arrayList44; str18 = str74; if (e.h.f(xmlPullParser9, str46)) { } } } else { arrayList4 = arrayList37; str = str58; str2 = str57; str3 = str52; j11 = j22; arrayList = arrayList36; str4 = str51; arrayList5 = arrayList40; arrayList2 = arrayList41; str5 = str62; z11 = z10; ArrayList arrayList79 = arrayList38; arrayList6 = arrayList42; j12 = j33; String str117 = "EventStream"; if (e.h.h(xmlPullParser8, "EventStream")) { String str118 = str61; String attributeValue17 = xmlPullParser8.getAttributeValue(null, str118); if (attributeValue17 == null) { str9 = str59; str8 = ""; } else { str8 = attributeValue17; str9 = str59; } String attributeValue18 = xmlPullParser8.getAttributeValue(null, str9); String str119 = attributeValue18 == null ? "" : attributeValue18; long o10 = o(xmlPullParser8, "timescale", 1L); ArrayList arrayList80 = new ArrayList(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(512); while (true) { xmlPullParser.next(); String str120 = "Event"; if (e.h.h(xmlPullParser8, "Event")) { long o11 = o(xmlPullParser8, str, 0L); str61 = str118; str59 = str9; long o12 = o(xmlPullParser8, str5, -9223372036854775807L); arrayList38 = arrayList79; long o13 = o(xmlPullParser8, "presentationTime", 0L); long j49 = o10; long S = z.S(o12, 1000L, j49); long S2 = z.S(o13, 1000000L, j49); j14 = o10; String attributeValue19 = xmlPullParser8.getAttributeValue(null, "messageData"); if (attributeValue19 == null) { attributeValue19 = null; } byteArrayOutputStream.reset(); XmlSerializer newSerializer = Xml.newSerializer(); newSerializer.setOutput(byteArrayOutputStream, eb.c.f30393c.name()); xmlPullParser.nextToken(); while (!e.h.f(xmlPullParser8, str120)) { switch (xmlPullParser.getEventType()) { case 0: str10 = str117; arrayList11 = arrayList80; str11 = str120; newSerializer.startDocument(null, Boolean.FALSE); break; case 1: str10 = str117; arrayList11 = arrayList80; str11 = str120; newSerializer.endDocument(); break; case 2: str11 = str120; newSerializer.startTag(xmlPullParser.getNamespace(), xmlPullParser.getName()); int i52 = 0; while (i52 < xmlPullParser.getAttributeCount()) { newSerializer.attribute(xmlPullParser8.getAttributeNamespace(i52), xmlPullParser8.getAttributeName(i52), xmlPullParser8.getAttributeValue(i52)); i52++; str117 = str117; arrayList80 = arrayList80; } str10 = str117; arrayList11 = arrayList80; break; case 3: str11 = str120; newSerializer.endTag(xmlPullParser.getNamespace(), xmlPullParser.getName()); str10 = str117; arrayList11 = arrayList80; break; case 4: newSerializer.text(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; case 5: newSerializer.cdsect(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; case 6: newSerializer.entityRef(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; case 7: newSerializer.ignorableWhitespace(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; case 8: newSerializer.processingInstruction(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; case 9: newSerializer.comment(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; case 10: newSerializer.docdecl(xmlPullParser.getText()); str10 = str117; arrayList11 = arrayList80; str11 = str120; break; default: str10 = str117; arrayList11 = arrayList80; str11 = str120; break; } xmlPullParser.nextToken(); str120 = str11; str117 = str10; arrayList80 = arrayList11; } String str121 = str117; ArrayList arrayList81 = arrayList80; newSerializer.flush(); byte[] byteArray = byteArrayOutputStream.toByteArray(); Long valueOf = Long.valueOf(S2); if (attributeValue19 != null) { byteArray = z.F(attributeValue19); } Pair create = Pair.create(valueOf, new EventMessage(str8, str119, S, o11, byteArray)); arrayList80 = arrayList81; arrayList80.add(create); str117 = str121; } else { str61 = str118; str59 = str9; j14 = o10; arrayList38 = arrayList79; e(xmlPullParser); } if (e.h.f(xmlPullParser8, str117)) { long[] jArr = new long[arrayList80.size()]; EventMessage[] eventMessageArr = new EventMessage[arrayList80.size()]; for (int i53 = 0; i53 < arrayList80.size(); i53++) { Pair pair = (Pair) arrayList80.get(i53); jArr[i53] = ((Long) pair.first).longValue(); eventMessageArr[i53] = (EventMessage) pair.second; } arrayList10 = arrayList39; arrayList10.add(new f(str8, str119, j14, jArr, eventMessageArr)); dVar4 = this; } else { str9 = str59; str118 = str61; arrayList79 = arrayList38; o10 = j14; } } } else { arrayList38 = arrayList79; arrayList7 = arrayList39; str6 = str; if (e.h.h(xmlPullParser8, "SegmentBase")) { kVar = t(xmlPullParser8, null); dVar4 = this; j32 = j12; } else { if (e.h.h(xmlPullParser8, "SegmentList")) { j31 = g(xmlPullParser8, -9223372036854775807L); str7 = str59; kVar = u(xmlPullParser, null, j30, l16, j12, j31, l13); j13 = -9223372036854775807L; arrayList8 = arrayList7; xmlPullParser2 = xmlPullParser8; arrayList9 = arrayList38; } else { str7 = str59; XmlPullParser xmlPullParser10 = xmlPullParser8; if (e.h.h(xmlPullParser10, str63)) { j31 = g(xmlPullParser10, -9223372036854775807L); fb.a<Object> aVar3 = v.f31004b; arrayList8 = arrayList7; arrayList9 = arrayList38; xmlPullParser2 = xmlPullParser10; kVar = v(xmlPullParser, null, q0.f30972e, j30, l16, j12, j31, l13); j13 = -9223372036854775807L; } else { arrayList8 = arrayList7; arrayList9 = arrayList38; xmlPullParser2 = xmlPullParser10; if (e.h.h(xmlPullParser2, "AssetIdentifier")) { eVar = k(xmlPullParser2, "AssetIdentifier"); } else { e(xmlPullParser); } j13 = -9223372036854775807L; } } dVar4 = this; xmlPullParser8 = xmlPullParser2; j32 = j12; str49 = str2; if (e.h.f(xmlPullParser8, str49)) { Pair create2 = Pair.create(new g(attributeValue8, l15, arrayList9, arrayList8, eVar), Long.valueOf(l16)); g gVar = (g) create2.first; if (gVar.f41018b != j13) { long longValue = ((Long) create2.second).longValue(); long j50 = longValue == j13 ? j13 : gVar.f41018b + longValue; arrayList3 = arrayList6; arrayList3.add(gVar); j22 = j50; } else { if (!equals) { StringBuilder a12 = android.support.v4.media.b.a("Unable to determine start of period "); a12.append(arrayList6.size()); throw r0.b(a12.toString(), null); } arrayList3 = arrayList6; j22 = j11; z14 = true; } j10 = j13; } else { str57 = str49; arrayList38 = arrayList9; str58 = str6; str59 = str7; arrayList41 = arrayList2; z10 = z11; arrayList42 = arrayList6; arrayList39 = arrayList8; arrayList40 = arrayList5; j22 = j11; arrayList36 = arrayList; str52 = str3; arrayList37 = arrayList4; str51 = str4; str60 = str5; } } } } j13 = -9223372036854775807L; str7 = str59; arrayList8 = arrayList10; arrayList9 = arrayList38; str6 = str; j32 = j12; str49 = str2; if (e.h.f(xmlPullParser8, str49)) { } } j13 = -9223372036854775807L; str7 = str59; arrayList8 = arrayList7; arrayList9 = arrayList38; str49 = str2; if (e.h.f(xmlPullParser8, str49)) { } } } j21 = j29; if (!e.h.f(xmlPullParser, "MPD")) { if (l10 == j10) { if (j22 != j10) { l10 = j22; } else if (!equals) { throw r0.b("Unable to determine duration of static manifest.", null); } } if (arrayList3.isEmpty()) { throw r0.b("No periods found.", null); } return new c(P, l10, l11, equals, l12, l13, l14, P2, hVar, mVar, lVar, uri2, arrayList3); } str50 = null; dVar3 = this; arrayList35 = arrayList3; xmlPullParser7 = xmlPullParser; b10 = arrayList2; z10 = z11; arrayList36 = arrayList; i10 = 1; } j19 = j21; j21 = j19; } j10 = -9223372036854775807L; arrayList = arrayList36; arrayList2 = b10; arrayList3 = arrayList35; z11 = z10; if (!e.h.f(xmlPullParser, "MPD")) { } } } public i q(XmlPullParser xmlPullParser, String str, String str2) { long j10; long j11; String attributeValue = xmlPullParser.getAttributeValue(null, str); String attributeValue2 = xmlPullParser.getAttributeValue(null, str2); if (attributeValue2 != null) { String[] split = attributeValue2.split("-"); j10 = Long.parseLong(split[0]); if (split.length == 2) { j11 = (Long.parseLong(split[1]) - j10) + 1; return new i(attributeValue, j10, j11); } } else { j10 = 0; } j11 = -1; return new i(attributeValue, j10, j11); } public int r(String str) { if (str == null) { return 0; } char c10 = 65535; switch (str.hashCode()) { case -2060497896: if (str.equals("subtitle")) { c10 = 0; break; } break; case -1724546052: if (str.equals("description")) { c10 = 1; break; } break; case -1580883024: if (str.equals("enhanced-audio-intelligibility")) { c10 = 2; break; } break; case -1574842690: if (str.equals("forced_subtitle")) { c10 = 3; break; } break; case -1408024454: if (str.equals("alternate")) { c10 = 4; break; } break; case -1396432756: if (str.equals("forced-subtitle")) { c10 = 5; break; } break; case 99825: if (str.equals("dub")) { c10 = 6; break; } break; case 3343801: if (str.equals("main")) { c10 = 7; break; } break; case 3530173: if (str.equals("sign")) { c10 = '\b'; break; } break; case 552573414: if (str.equals("caption")) { c10 = '\t'; break; } break; case 899152809: if (str.equals("commentary")) { c10 = '\n'; break; } break; case 1629013393: if (str.equals("emergency")) { c10 = 11; break; } break; case 1855372047: if (str.equals("supplementary")) { c10 = '\f'; break; } break; } switch (c10) { case 0: case 3: case 5: return 128; case 1: return 512; case 2: return 2048; case 4: return 2; case 6: return 16; case 7: return 1; case '\b': return 256; case '\t': return 64; case '\n': return 8; case 11: return 32; case '\f': return 4; default: return 0; } } public int s(List<e> list) { int i10 = 0; for (int i11 = 0; i11 < list.size(); i11++) { if (n0.b.d("http://dashif.org/guidelines/trickmode", list.get(i11).f41010a)) { i10 |= 16384; } } return i10; } public k.e t(XmlPullParser xmlPullParser, k.e eVar) { long j10; long j11; long o10 = o(xmlPullParser, "timescale", eVar != null ? eVar.f41042b : 1L); long o11 = o(xmlPullParser, "presentationTimeOffset", eVar != null ? eVar.f41043c : 0L); long j12 = eVar != null ? eVar.f41056d : 0L; long j13 = eVar != null ? eVar.f41057e : 0L; String attributeValue = xmlPullParser.getAttributeValue(null, "indexRange"); if (attributeValue != null) { String[] split = attributeValue.split("-"); long parseLong = Long.parseLong(split[0]); j10 = (Long.parseLong(split[1]) - parseLong) + 1; j11 = parseLong; } else { j10 = j13; j11 = j12; } i iVar = eVar != null ? eVar.f41041a : null; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "Initialization")) { iVar = q(xmlPullParser, "sourceURL", "range"); } else { e(xmlPullParser); } } while (!e.h.f(xmlPullParser, "SegmentBase")); return new k.e(iVar, o10, o11, j11, j10); } public k.b u(XmlPullParser xmlPullParser, k.b bVar, long j10, long j11, long j12, long j13, long j14) { i iVar; List list; List<k.d> list2; long o10 = o(xmlPullParser, "timescale", bVar != null ? bVar.f41042b : 1L); long o11 = o(xmlPullParser, "presentationTimeOffset", bVar != null ? bVar.f41043c : 0L); long o12 = o(xmlPullParser, VastIconXmlManager.DURATION, bVar != null ? bVar.f41045e : -9223372036854775807L); long o13 = o(xmlPullParser, "startNumber", bVar != null ? bVar.f41044d : 1L); long d10 = d(j12, j13); List<k.d> list3 = null; List list4 = null; i iVar2 = null; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "Initialization")) { iVar2 = q(xmlPullParser, "sourceURL", "range"); } else if (e.h.h(xmlPullParser, "SegmentTimeline")) { list3 = w(xmlPullParser, o10, j11); } else if (e.h.h(xmlPullParser, "SegmentURL")) { if (list4 == null) { list4 = new ArrayList(); } List list5 = list4; list5.add(q(xmlPullParser, "media", "mediaRange")); list4 = list5; } else { e(xmlPullParser); } } while (!e.h.f(xmlPullParser, "SegmentList")); if (bVar != null) { if (iVar2 == null) { iVar2 = bVar.f41041a; } if (list3 == null) { list3 = bVar.f41046f; } if (list4 == null) { list2 = list3; iVar = iVar2; list = bVar.f41050j; return new k.b(iVar, o10, o11, o13, o12, list2, d10, list, z.M(j14), z.M(j10)); } } iVar = iVar2; list = list4; list2 = list3; return new k.b(iVar, o10, o11, o13, o12, list2, d10, list, z.M(j14), z.M(j10)); } public k.c v(XmlPullParser xmlPullParser, k.c cVar, List<e> list, long j10, long j11, long j12, long j13, long j14) { long j15; long o10 = o(xmlPullParser, "timescale", cVar != null ? cVar.f41042b : 1L); long o11 = o(xmlPullParser, "presentationTimeOffset", cVar != null ? cVar.f41043c : 0L); long o12 = o(xmlPullParser, VastIconXmlManager.DURATION, cVar != null ? cVar.f41045e : -9223372036854775807L); long o13 = o(xmlPullParser, "startNumber", cVar != null ? cVar.f41044d : 1L); int i10 = 0; while (true) { if (i10 >= list.size()) { j15 = -1; break; } e eVar = list.get(i10); if (n0.b.d("http://dashif.org/guidelines/last-segment-number", eVar.f41010a)) { j15 = Long.parseLong(eVar.f41011b); break; } i10++; } long j16 = j15; long d10 = d(j12, j13); List<k.d> list2 = null; j2.d y10 = y(xmlPullParser, "media", cVar != null ? cVar.f41052k : null); j2.d y11 = y(xmlPullParser, "initialization", cVar != null ? cVar.f41051j : null); i iVar = null; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "Initialization")) { iVar = q(xmlPullParser, "sourceURL", "range"); } else if (e.h.h(xmlPullParser, "SegmentTimeline")) { list2 = w(xmlPullParser, o10, j11); } else { e(xmlPullParser); } } while (!e.h.f(xmlPullParser, "SegmentTemplate")); if (cVar != null) { if (iVar == null) { iVar = cVar.f41041a; } if (list2 == null) { list2 = cVar.f41046f; } } return new k.c(iVar, o10, o11, o13, j16, o12, list2, d10, y11, y10, z.M(j14), z.M(j10)); } public List<k.d> w(XmlPullParser xmlPullParser, long j10, long j11) { ArrayList arrayList = new ArrayList(); long j12 = 0; long j13 = -9223372036854775807L; boolean z10 = false; int i10 = 0; do { xmlPullParser.next(); if (e.h.h(xmlPullParser, "S")) { long o10 = o(xmlPullParser, "t", -9223372036854775807L); if (z10) { j12 = b(arrayList, j12, j13, i10, o10); } if (o10 == -9223372036854775807L) { o10 = j12; } j13 = o(xmlPullParser, "d", -9223372036854775807L); i10 = n(xmlPullParser, "r", 0); j12 = o10; z10 = true; } else { e(xmlPullParser); } } while (!e.h.f(xmlPullParser, "SegmentTimeline")); if (z10) { b(arrayList, j12, j13, i10, z.S(j11, j10, 1000L)); } return arrayList; } public j2.d y(XmlPullParser xmlPullParser, String str, j2.d dVar) { String str2; String attributeValue = xmlPullParser.getAttributeValue(null, str); if (attributeValue == null) { return dVar; } String[] strArr = new String[5]; int[] iArr = new int[4]; String[] strArr2 = new String[4]; strArr[0] = ""; int i10 = 0; int i11 = 0; while (i10 < attributeValue.length()) { int indexOf = attributeValue.indexOf("$", i10); if (indexOf == -1) { strArr[i11] = strArr[i11] + attributeValue.substring(i10); i10 = attributeValue.length(); } else if (indexOf != i10) { strArr[i11] = strArr[i11] + attributeValue.substring(i10, indexOf); i10 = indexOf; } else if (attributeValue.startsWith("$$", i10)) { strArr[i11] = w.a.a(new StringBuilder(), strArr[i11], "$"); i10 += 2; } else { int i12 = i10 + 1; int indexOf2 = attributeValue.indexOf("$", i12); String substring = attributeValue.substring(i12, indexOf2); if (substring.equals("RepresentationID")) { iArr[i11] = 1; } else { int indexOf3 = substring.indexOf("%0"); if (indexOf3 != -1) { str2 = substring.substring(indexOf3); if (!str2.endsWith("d") && !str2.endsWith("x") && !str2.endsWith("X")) { str2 = i.c.a(str2, "d"); } substring = substring.substring(0, indexOf3); } else { str2 = "%01d"; } Objects.requireNonNull(substring); substring.hashCode(); char c10 = 65535; switch (substring.hashCode()) { case -1950496919: if (substring.equals("Number")) { c10 = 0; break; } break; case 2606829: if (substring.equals("Time")) { c10 = 1; break; } break; case 38199441: if (substring.equals("Bandwidth")) { c10 = 2; break; } break; } switch (c10) { case 0: iArr[i11] = 2; break; case 1: iArr[i11] = 4; break; case 2: iArr[i11] = 3; break; default: throw new IllegalArgumentException(i.c.a("Invalid template: ", attributeValue)); } strArr2[i11] = str2; } i11++; strArr[i11] = ""; i10 = indexOf2 + 1; } } return new j2.d(strArr, iArr, strArr2, i11); } }