正在查看: BodyTech v7.6.4 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BodyTech v7.6.4 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package h9;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
import android.util.Xml;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.drm.h;
import com.google.android.exoplayer2.s;
import com.google.android.exoplayer2.u1;
import com.google.android.exoplayer2.upstream.j;
import com.google.common.collect.ImmutableList;
import com.mindbodyonline.android.api.sales.model.enums.CGiftCardLayoutTemplateKeys;
import com.newrelic.agent.android.analytics.AnalyticsAttribute;
import com.newrelic.agent.android.distributedtracing.DistributedTracing;
import com.newrelic.agent.android.util.Constants;
import h9.k;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
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 w9.p0;
import w9.r;
import w9.u0;
import w9.v;
import w9.v0;
public class d extends DefaultHandler implements j.a<c> {
private static final Pattern b = Pattern.compile("(\\d+)(?:/(\\d+))?");
private static final Pattern c = Pattern.compile("CC([1-4])=.*");
private static final Pattern d = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");
private static final int[] e = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};
private final XmlPullParserFactory a;
protected static final class a {
public final u1 a;
public final ImmutableList<b> b;
public final k c;
@Nullable
public final String d;
public final ArrayList<h.b> e;
public final ArrayList<e> f;
public final long g;
public final List<e> h;
public final List<e> i;
public a(u1 u1Var, List<b> list, k kVar, @Nullable String str, ArrayList<h.b> arrayList, ArrayList<e> arrayList2, List<e> list2, List<e> list3, long j) {
this.a = u1Var;
this.b = ImmutableList.o(list);
this.c = kVar;
this.d = str;
this.e = arrayList;
this.f = arrayList2;
this.h = list2;
this.i = list3;
this.g = j;
}
}
public d() {
try {
this.a = XmlPullParserFactory.newInstance();
} catch (XmlPullParserException e2) {
throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e2);
}
}
protected static int D(List<e> list) {
String str;
for (int i = 0; i < list.size(); i++) {
e eVar = list.get(i);
if ("urn:scte:dash:cc:cea-608:2015".equals(eVar.a) && (str = eVar.b) != null) {
Matcher matcher = c.matcher(str);
if (matcher.matches()) {
return Integer.parseInt(matcher.group(1));
}
r.i("MpdParser", "Unable to parse CEA-608 channel number from: " + eVar.b);
}
}
return -1;
}
protected static int E(List<e> list) {
String str;
for (int i = 0; i < list.size(); i++) {
e eVar = list.get(i);
if ("urn:scte:dash:cc:cea-708:2015".equals(eVar.a) && (str = eVar.b) != null) {
Matcher matcher = d.matcher(str);
if (matcher.matches()) {
return Integer.parseInt(matcher.group(1));
}
r.i("MpdParser", "Unable to parse CEA-708 service block number from: " + eVar.b);
}
}
return -1;
}
protected static long H(XmlPullParser xmlPullParser, String str, long j) throws ParserException {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j : u0.H0(attributeValue);
}
protected static e I(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
String r0 = r0(xmlPullParser, "schemeIdUri", "");
String r02 = r0(xmlPullParser, "value", null);
String r03 = r0(xmlPullParser, DistributedTracing.NR_ID_ATTRIBUTE, null);
do {
xmlPullParser.next();
} while (!v0.d(xmlPullParser, str));
return new e(r0, r02, r03);
}
protected static int J(XmlPullParser xmlPullParser) {
char c2;
String attributeValue = xmlPullParser.getAttributeValue(null, "value");
if (attributeValue == null) {
return -1;
}
String e2 = bc.a.e(attributeValue);
e2.hashCode();
switch (e2.hashCode()) {
case 1596796:
if (e2.equals("4000")) {
c2 = 0;
break;
}
c2 = 65535;
break;
case 2937391:
if (e2.equals("a000")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case 3094035:
if (e2.equals("f801")) {
c2 = 2;
break;
}
c2 = 65535;
break;
case 3133436:
if (e2.equals("fa01")) {
c2 = 3;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
switch (c2) {
}
return -1;
}
protected static int K(XmlPullParser xmlPullParser) {
int U = U(xmlPullParser, "value", -1);
if (U <= 0 || U >= 33) {
return -1;
}
return U;
}
protected static int L(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 M(XmlPullParser xmlPullParser, String str, long j) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j : u0.I0(attributeValue);
}
protected static String N(List<e> list) {
for (int i = 0; i < list.size(); i++) {
e eVar = list.get(i);
String str = eVar.a;
if ("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str) && "JOC".equals(eVar.b)) {
return "audio/eac3-joc";
}
if ("tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str) && "ec+3".equals(eVar.b)) {
return "audio/eac3-joc";
}
}
return "audio/eac3";
}
protected static float R(XmlPullParser xmlPullParser, String str, float f) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? f : Float.parseFloat(attributeValue);
}
protected static float S(XmlPullParser xmlPullParser, float f) {
String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
if (attributeValue == null) {
return f;
}
Matcher matcher = b.matcher(attributeValue);
if (!matcher.matches()) {
return f;
}
int parseInt = Integer.parseInt(matcher.group(1));
return !TextUtils.isEmpty(matcher.group(2)) ? parseInt / Integer.parseInt(r2) : parseInt;
}
protected static int U(XmlPullParser xmlPullParser, String str, int i) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? i : Integer.parseInt(attributeValue);
}
protected static long W(List<e> list) {
for (int i = 0; i < list.size(); i++) {
e eVar = list.get(i);
if (bc.a.a("http://dashif.org/guidelines/last-segment-number", eVar.a)) {
return Long.parseLong(eVar.b);
}
}
return -1L;
}
protected static long X(XmlPullParser xmlPullParser, String str, long j) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? j : Long.parseLong(attributeValue);
}
protected static int Z(XmlPullParser xmlPullParser) {
int U = U(xmlPullParser, "value", -1);
if (U < 0) {
return -1;
}
int[] iArr = e;
if (U < iArr.length) {
return iArr[U];
}
return -1;
}
private long b(List<k.d> list, long j, long j2, int i, long j3) {
int m = i >= 0 ? i + 1 : (int) u0.m(j3 - j, j2);
for (int i2 = 0; i2 < m; i2++) {
list.add(m(j, j2));
j += j2;
}
return j;
}
private static int p(int i, int i2) {
if (i == -1) {
return i2;
}
if (i2 == -1) {
return i;
}
w9.a.g(i == i2);
return i;
}
@Nullable
private static String q(@Nullable String str, @Nullable String str2) {
if (str == null) {
return str2;
}
if (str2 == null) {
return str;
}
w9.a.g(str.equals(str2));
return str;
}
private static void r(ArrayList<h.b> arrayList) {
String str;
int i = 0;
while (true) {
if (i >= arrayList.size()) {
str = null;
break;
}
h.b bVar = arrayList.get(i);
if (s.c.equals(bVar.d) && (str = bVar.e) != null) {
arrayList.remove(i);
break;
}
i++;
}
if (str == null) {
return;
}
for (int i2 = 0; i2 < arrayList.size(); i2++) {
h.b bVar2 = arrayList.get(i2);
if (s.b.equals(bVar2.d) && bVar2.e == null) {
arrayList.set(i2, new h.b(s.c, str, bVar2.k, bVar2.n));
}
}
}
protected static String r0(XmlPullParser xmlPullParser, String str, String str2) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? str2 : attributeValue;
}
private static void s(ArrayList<h.b> arrayList) {
for (int size = arrayList.size() - 1; size >= 0; size--) {
h.b bVar = arrayList.get(size);
if (!bVar.e()) {
int i = 0;
while (true) {
if (i >= arrayList.size()) {
break;
}
if (arrayList.get(i).b(bVar)) {
arrayList.remove(size);
break;
}
i++;
}
}
}
}
protected static String s0(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
String str2 = "";
do {
xmlPullParser.next();
if (xmlPullParser.getEventType() == 4) {
str2 = xmlPullParser.getText();
} else {
w(xmlPullParser);
}
} while (!v0.d(xmlPullParser, str));
return str2;
}
private static long t(long j, long j2) {
if (j2 != -9223372036854775807L) {
j = j2;
}
if (j == Long.MAX_VALUE) {
return -9223372036854775807L;
}
return j;
}
@Nullable
private static String u(@Nullable String str, @Nullable String str2) {
if (v.o(str)) {
return v.c(str2);
}
if (v.s(str)) {
return v.n(str2);
}
if (v.r(str)) {
return str;
}
if (v.p(str)) {
return str;
}
if (!"application/mp4".equals(str)) {
return null;
}
String g = v.g(str2);
return "text/vtt".equals(g) ? "application/x-mp4-vtt" : g;
}
private boolean v(String[] strArr) {
for (String str : strArr) {
if (str.startsWith("urn:dvb:dash:profile:dvb-dash:")) {
return true;
}
}
return false;
}
public static void w(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
if (v0.e(xmlPullParser)) {
int i = 1;
while (i != 0) {
xmlPullParser.next();
if (v0.e(xmlPullParser)) {
i++;
} else if (v0.c(xmlPullParser)) {
i--;
}
}
}
}
protected int A(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
char c2;
String r0 = r0(xmlPullParser, "schemeIdUri", null);
r0.hashCode();
int i = -1;
switch (r0.hashCode()) {
case -2128649360:
if (r0.equals("urn:dts:dash:audio_channel_configuration:2012")) {
c2 = 0;
break;
}
c2 = 65535;
break;
case -1352850286:
if (r0.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case -1138141449:
if (r0.equals("tag:dolby.com,2014:dash:audio_channel_configuration:2011")) {
c2 = 2;
break;
}
c2 = 65535;
break;
case -986633423:
if (r0.equals("urn:mpeg:mpegB:cicp:ChannelConfiguration")) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -79006963:
if (r0.equals("tag:dts.com,2014:dash:audio_channel_configuration:2012")) {
c2 = 4;
break;
}
c2 = 65535;
break;
case 312179081:
if (r0.equals("tag:dts.com,2018:uhd:audio_channel_configuration")) {
c2 = 5;
break;
}
c2 = 65535;
break;
case 2036691300:
if (r0.equals("urn:dolby:dash:audio_channel_configuration:2011")) {
c2 = 6;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
switch (c2) {
case 0:
case 4:
i = K(xmlPullParser);
break;
case 1:
i = U(xmlPullParser, "value", -1);
break;
case 2:
case 6:
i = J(xmlPullParser);
break;
case 3:
i = Z(xmlPullParser);
break;
case 5:
i = L(xmlPullParser);
break;
}
do {
xmlPullParser.next();
} while (!v0.d(xmlPullParser, "AudioChannelConfiguration"));
return i;
}
protected long B(XmlPullParser xmlPullParser, long j) {
String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset");
if (attributeValue == null) {
return j;
}
if ("INF".equals(attributeValue)) {
return Long.MAX_VALUE;
}
return (long) (Float.parseFloat(attributeValue) * 1000000.0f);
}
protected List<b> C(XmlPullParser xmlPullParser, List<b> list, boolean z) throws XmlPullParserException, IOException {
String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority");
int parseInt = attributeValue != null ? Integer.parseInt(attributeValue) : z ? 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 s0 = s0(xmlPullParser, "BaseURL");
if (p0.b(s0)) {
if (attributeValue3 == null) {
attributeValue3 = s0;
}
return com.google.common.collect.m.j(new b(s0, attributeValue3, parseInt, parseInt2));
}
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
b bVar = list.get(i);
String d2 = p0.d(bVar.a, s0);
String str = attributeValue3 == null ? d2 : attributeValue3;
if (z) {
parseInt = bVar.c;
parseInt2 = bVar.d;
str = bVar.b;
}
arrayList.add(new b(d2, str, parseInt, parseInt2));
}
return arrayList;
}
protected android.util.Pair<java.lang.String, com.google.android.exoplayer2.drm.h.b> F(org.xmlpull.v1.XmlPullParser r11) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: h9.d.F(org.xmlpull.v1.XmlPullParser):android.util.Pair");
}
protected int G(XmlPullParser xmlPullParser) {
String attributeValue = xmlPullParser.getAttributeValue(null, AnalyticsAttribute.CONTENT_TYPE_ATTRIBUTE);
if (TextUtils.isEmpty(attributeValue)) {
return -1;
}
if ("audio".equals(attributeValue)) {
return 1;
}
if ("video".equals(attributeValue)) {
return 2;
}
return "text".equals(attributeValue) ? 3 : -1;
}
protected Pair<Long, u8.a> O(XmlPullParser xmlPullParser, String str, String str2, long j, ByteArrayOutputStream byteArrayOutputStream) throws IOException, XmlPullParserException {
long X = X(xmlPullParser, DistributedTracing.NR_ID_ATTRIBUTE, 0L);
long X2 = X(xmlPullParser, "duration", -9223372036854775807L);
long X3 = X(xmlPullParser, "presentationTime", 0L);
long M0 = u0.M0(X2, 1000L, j);
long M02 = u0.M0(X3, Constants.Network.MAX_PAYLOAD_SIZE, j);
String r0 = r0(xmlPullParser, "messageData", null);
byte[] P = P(xmlPullParser, byteArrayOutputStream);
Long valueOf = Long.valueOf(M02);
if (r0 != null) {
P = u0.l0(r0);
}
return Pair.create(valueOf, d(str, str2, X, M0, P));
}
protected byte[] P(XmlPullParser xmlPullParser, ByteArrayOutputStream byteArrayOutputStream) throws XmlPullParserException, IOException {
byteArrayOutputStream.reset();
XmlSerializer newSerializer = Xml.newSerializer();
newSerializer.setOutput(byteArrayOutputStream, bc.c.c.name());
xmlPullParser.nextToken();
while (!v0.d(xmlPullParser, "Event")) {
switch (xmlPullParser.getEventType()) {
case 0:
newSerializer.startDocument(null, Boolean.FALSE);
break;
case 1:
newSerializer.endDocument();
break;
case 2:
newSerializer.startTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
for (int i = 0; i < xmlPullParser.getAttributeCount(); i++) {
newSerializer.attribute(xmlPullParser.getAttributeNamespace(i), xmlPullParser.getAttributeName(i), xmlPullParser.getAttributeValue(i));
}
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 Q(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
String r0 = r0(xmlPullParser, "schemeIdUri", "");
String r02 = r0(xmlPullParser, "value", "");
long X = X(xmlPullParser, "timescale", 1L);
ArrayList arrayList = new ArrayList();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(512);
do {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Event")) {
arrayList.add(O(xmlPullParser, r0, r02, X, byteArrayOutputStream));
} else {
w(xmlPullParser);
}
} while (!v0.d(xmlPullParser, "EventStream"));
long[] jArr = new long[arrayList.size()];
u8.a[] aVarArr = new u8.a[arrayList.size()];
for (int i = 0; i < arrayList.size(); i++) {
Pair pair = (Pair) arrayList.get(i);
jArr[i] = ((Long) pair.first).longValue();
aVarArr[i] = (u8.a) pair.second;
}
return e(r0, r02, X, jArr, aVarArr);
}
protected i T(XmlPullParser xmlPullParser) {
return d0(xmlPullParser, "sourceURL", "range");
}
protected String V(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
return s0(xmlPullParser, "Label");
}
protected h9.c Y(org.xmlpull.v1.XmlPullParser r47, android.net.Uri r48) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: h9.d.Y(org.xmlpull.v1.XmlPullParser, android.net.Uri):h9.c");
}
protected Pair<g, Long> a0(XmlPullParser xmlPullParser, List<b> list, long j, long j2, long j3, long j4, boolean z) throws XmlPullParserException, IOException {
long j5;
ArrayList arrayList;
ArrayList arrayList2;
ArrayList arrayList3;
Object obj;
long j6;
k l0;
d dVar = this;
XmlPullParser xmlPullParser2 = xmlPullParser;
Object obj2 = null;
String attributeValue = xmlPullParser2.getAttributeValue(null, DistributedTracing.NR_ID_ATTRIBUTE);
long M = M(xmlPullParser2, "start", j);
long j7 = -9223372036854775807L;
long j10 = j3 != -9223372036854775807L ? j3 + M : -9223372036854775807L;
long M2 = M(xmlPullParser2, "duration", -9223372036854775807L);
ArrayList arrayList4 = new ArrayList();
ArrayList arrayList5 = new ArrayList();
ArrayList arrayList6 = new ArrayList();
long j11 = j2;
boolean z2 = false;
long j12 = -9223372036854775807L;
k kVar = null;
e eVar = null;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser2, "BaseURL")) {
if (!z2) {
j11 = dVar.B(xmlPullParser2, j11);
z2 = true;
}
arrayList6.addAll(dVar.C(xmlPullParser2, list, z));
arrayList3 = arrayList5;
arrayList = arrayList6;
j6 = j7;
obj = obj2;
arrayList2 = arrayList4;
} else {
if (v0.f(xmlPullParser2, "AdaptationSet")) {
j5 = j11;
arrayList = arrayList6;
arrayList2 = arrayList4;
arrayList2.add(y(xmlPullParser, !arrayList6.isEmpty() ? arrayList6 : list, kVar, M2, j11, j12, j10, j4, z));
xmlPullParser2 = xmlPullParser;
arrayList3 = arrayList5;
} else {
j5 = j11;
ArrayList arrayList7 = arrayList5;
arrayList = arrayList6;
arrayList2 = arrayList4;
xmlPullParser2 = xmlPullParser;
if (v0.f(xmlPullParser2, "EventStream")) {
arrayList7.add(Q(xmlPullParser));
arrayList3 = arrayList7;
} else if (v0.f(xmlPullParser2, "SegmentBase")) {
arrayList3 = arrayList7;
kVar = j0(xmlPullParser2, null);
obj = null;
j11 = j5;
j6 = -9223372036854775807L;
} else {
arrayList3 = arrayList7;
if (v0.f(xmlPullParser2, "SegmentList")) {
long B = B(xmlPullParser2, -9223372036854775807L);
obj = null;
l0 = k0(xmlPullParser, null, j10, M2, j5, B, j4);
j12 = B;
j11 = j5;
j6 = -9223372036854775807L;
} else {
obj = null;
if (v0.f(xmlPullParser2, "SegmentTemplate")) {
long B2 = B(xmlPullParser2, -9223372036854775807L);
j6 = -9223372036854775807L;
l0 = l0(xmlPullParser, null, ImmutableList.t(), j10, M2, j5, B2, j4);
j12 = B2;
j11 = j5;
} else {
j6 = -9223372036854775807L;
if (v0.f(xmlPullParser2, "AssetIdentifier")) {
eVar = I(xmlPullParser2, "AssetIdentifier");
} else {
w(xmlPullParser);
}
j11 = j5;
}
}
kVar = l0;
}
}
obj = null;
j6 = -9223372036854775807L;
j11 = j5;
}
if (v0.d(xmlPullParser2, "Period")) {
return Pair.create(h(attributeValue, M, arrayList2, arrayList3, eVar), Long.valueOf(M2));
}
arrayList4 = arrayList2;
arrayList6 = arrayList;
obj2 = obj;
arrayList5 = arrayList3;
j7 = j6;
dVar = this;
}
}
protected String[] b0(XmlPullParser xmlPullParser, String str, String[] strArr) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue == null ? strArr : attributeValue.split(",");
}
protected h9.a c(int i, int i2, List<j> list, List<e> list2, List<e> list3, List<e> list4) {
return new h9.a(i, i2, list, list2, list3, list4);
}
protected h c0(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
String str = null;
String r0 = r0(xmlPullParser, "moreInformationURL", null);
String r02 = r0(xmlPullParser, "lang", null);
String str2 = null;
String str3 = null;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, CGiftCardLayoutTemplateKeys.TITLE)) {
str = xmlPullParser.nextText();
} else if (v0.f(xmlPullParser, "Source")) {
str2 = xmlPullParser.nextText();
} else if (v0.f(xmlPullParser, "Copyright")) {
str3 = xmlPullParser.nextText();
} else {
w(xmlPullParser);
}
String str4 = str3;
if (v0.d(xmlPullParser, "ProgramInformation")) {
return new h(str, str2, str4, r0, r02);
}
str3 = str4;
}
}
protected u8.a d(String str, String str2, long j, long j2, byte[] bArr) {
return new u8.a(str, str2, j2, j, bArr);
}
protected i d0(XmlPullParser xmlPullParser, String str, String str2) {
long j;
long j2;
String attributeValue = xmlPullParser.getAttributeValue(null, str);
String attributeValue2 = xmlPullParser.getAttributeValue(null, str2);
if (attributeValue2 != null) {
String[] split = attributeValue2.split("-");
j = Long.parseLong(split[0]);
if (split.length == 2) {
j2 = (Long.parseLong(split[1]) - j) + 1;
return i(attributeValue, j, j2);
}
} else {
j = 0;
}
j2 = -1;
return i(attributeValue, j, j2);
}
protected f e(String str, String str2, long j, long[] jArr, u8.a[] aVarArr) {
return new f(str, str2, j, jArr, aVarArr);
}
protected h9.d.a e0(org.xmlpull.v1.XmlPullParser r36, java.util.List<h9.b> r37, @androidx.annotation.Nullable java.lang.String r38, @androidx.annotation.Nullable java.lang.String r39, int r40, int r41, float r42, int r43, int r44, @androidx.annotation.Nullable java.lang.String r45, java.util.List<h9.e> r46, java.util.List<h9.e> r47, java.util.List<h9.e> r48, java.util.List<h9.e> r49, @androidx.annotation.Nullable h9.k r50, long r51, long r53, long r55, long r57, long r59, boolean r61) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: h9.d.e0(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, h9.k, long, long, long, long, long, boolean):h9.d$a");
}
protected u1 f(@Nullable String str, @Nullable String str2, int i, int i2, float f, int i3, int i4, int i5, @Nullable String str3, List<e> list, List<e> list2, @Nullable String str4, List<e> list3, List<e> list4) {
String str5 = str4;
String u = u(str2, str5);
if ("audio/eac3".equals(u)) {
u = N(list4);
if ("audio/eac3-joc".equals(u)) {
str5 = "ec+3";
}
}
u1.b V = new u1.b().S(str).K(str2).e0(u).I(str5).Z(i5).g0(p0(list)).c0(i0(list) | f0(list2) | h0(list3) | h0(list4)).V(str3);
if (v.s(u)) {
V.j0(i).Q(i2).P(f);
} else if (v.o(u)) {
V.H(i3).f0(i4);
} else if (v.r(u)) {
V.F("application/cea-608".equals(u) ? D(list2) : "application/cea-708".equals(u) ? E(list2) : -1);
} else if (v.p(u)) {
V.j0(i).Q(i2);
}
return V.E();
}
protected int f0(List<e> list) {
int t0;
int i = 0;
for (int i2 = 0; i2 < list.size(); i2++) {
e eVar = list.get(i2);
if (bc.a.a("urn:mpeg:dash:role:2011", eVar.a)) {
t0 = g0(eVar.b);
} else if (bc.a.a("urn:tva:metadata:cs:AudioPurposeCS:2007", eVar.a)) {
t0 = t0(eVar.b);
}
i |= t0;
}
return i;
}
protected c g(long j, long j2, long j3, boolean z, long j4, long j5, long j6, long j7, @Nullable h hVar, @Nullable o oVar, @Nullable l lVar, @Nullable Uri uri, List<g> list) {
return new c(j, j2, j3, z, j4, j5, j6, j7, hVar, oVar, lVar, uri, list);
}
protected int g0(@Nullable String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
protected g h(@Nullable String str, long j, List<h9.a> list, List<f> list2, @Nullable e eVar) {
return new g(str, j, list, list2, eVar);
}
protected int h0(List<e> list) {
int i = 0;
for (int i2 = 0; i2 < list.size(); i2++) {
if (bc.a.a("http://dashif.org/guidelines/trickmode", list.get(i2).a)) {
i |= 16384;
}
}
return i;
}
protected i i(String str, long j, long j2) {
return new i(str, j, j2);
}
protected int i0(List<e> list) {
int i = 0;
for (int i2 = 0; i2 < list.size(); i2++) {
e eVar = list.get(i2);
if (bc.a.a("urn:mpeg:dash:role:2011", eVar.a)) {
i |= g0(eVar.b);
}
}
return i;
}
protected j j(a aVar, @Nullable String str, @Nullable String str2, ArrayList<h.b> arrayList, ArrayList<e> arrayList2) {
u1.b b2 = aVar.a.b();
if (str != null) {
b2.U(str);
}
String str3 = aVar.d;
if (str3 != null) {
str2 = str3;
}
ArrayList<h.b> arrayList3 = aVar.e;
arrayList3.addAll(arrayList);
if (!arrayList3.isEmpty()) {
r(arrayList3);
s(arrayList3);
b2.M(new com.google.android.exoplayer2.drm.h(str2, arrayList3));
}
ArrayList<e> arrayList4 = aVar.f;
arrayList4.addAll(arrayList2);
return j.o(aVar.g, b2.E(), aVar.b, aVar.c, arrayList4, aVar.h, aVar.i, null);
}
protected k.e j0(XmlPullParser xmlPullParser, @Nullable k.e eVar) throws XmlPullParserException, IOException {
long j;
long j2;
long X = X(xmlPullParser, "timescale", eVar != null ? eVar.b : 1L);
long X2 = X(xmlPullParser, "presentationTimeOffset", eVar != null ? eVar.c : 0L);
long j3 = eVar != null ? eVar.d : 0L;
long j4 = eVar != null ? eVar.e : 0L;
String attributeValue = xmlPullParser.getAttributeValue(null, "indexRange");
if (attributeValue != null) {
String[] split = attributeValue.split("-");
j2 = Long.parseLong(split[0]);
j = (Long.parseLong(split[1]) - j2) + 1;
} else {
j = j4;
j2 = j3;
}
i iVar = eVar != null ? eVar.a : null;
do {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Initialization")) {
iVar = T(xmlPullParser);
} else {
w(xmlPullParser);
}
} while (!v0.d(xmlPullParser, "SegmentBase"));
return n(iVar, X, X2, j2, j);
}
protected k.b k(i iVar, long j, long j2, long j3, long j4, @Nullable List<k.d> list, long j5, @Nullable List<i> list2, long j6, long j7) {
return new k.b(iVar, j, j2, j3, j4, list, j5, list2, u0.A0(j6), u0.A0(j7));
}
protected k.b k0(XmlPullParser xmlPullParser, @Nullable k.b bVar, long j, long j2, long j3, long j4, long j5) throws XmlPullParserException, IOException {
long X = X(xmlPullParser, "timescale", bVar != null ? bVar.b : 1L);
long X2 = X(xmlPullParser, "presentationTimeOffset", bVar != null ? bVar.c : 0L);
long X3 = X(xmlPullParser, "duration", bVar != null ? bVar.e : -9223372036854775807L);
long X4 = X(xmlPullParser, "startNumber", bVar != null ? bVar.d : 1L);
long t = t(j3, j4);
List<k.d> list = null;
List<i> list2 = null;
i iVar = null;
do {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Initialization")) {
iVar = T(xmlPullParser);
} else if (v0.f(xmlPullParser, "SegmentTimeline")) {
list = m0(xmlPullParser, X, j2);
} else if (v0.f(xmlPullParser, "SegmentURL")) {
if (list2 == null) {
list2 = new ArrayList<>();
}
list2.add(n0(xmlPullParser));
} else {
w(xmlPullParser);
}
} while (!v0.d(xmlPullParser, "SegmentList"));
if (bVar != null) {
if (iVar == null) {
iVar = bVar.a;
}
if (list == null) {
list = bVar.f;
}
if (list2 == null) {
list2 = bVar.j;
}
}
return k(iVar, X, X2, X4, X3, list, t, list2, j5, j);
}
protected k.c l(i iVar, long j, long j2, long j3, long j4, long j5, List<k.d> list, long j6, @Nullable n nVar, @Nullable n nVar2, long j7, long j10) {
return new k.c(iVar, j, j2, j3, j4, j5, list, j6, nVar, nVar2, u0.A0(j7), u0.A0(j10));
}
protected k.c l0(XmlPullParser xmlPullParser, @Nullable k.c cVar, List<e> list, long j, long j2, long j3, long j4, long j5) throws XmlPullParserException, IOException {
long X = X(xmlPullParser, "timescale", cVar != null ? cVar.b : 1L);
long X2 = X(xmlPullParser, "presentationTimeOffset", cVar != null ? cVar.c : 0L);
long X3 = X(xmlPullParser, "duration", cVar != null ? cVar.e : -9223372036854775807L);
long X4 = X(xmlPullParser, "startNumber", cVar != null ? cVar.d : 1L);
long W = W(list);
long t = t(j3, j4);
List<k.d> list2 = null;
n u0 = u0(xmlPullParser, "media", cVar != null ? cVar.k : null);
n u02 = u0(xmlPullParser, "initialization", cVar != null ? cVar.j : null);
i iVar = null;
do {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Initialization")) {
iVar = T(xmlPullParser);
} else if (v0.f(xmlPullParser, "SegmentTimeline")) {
list2 = m0(xmlPullParser, X, j2);
} else {
w(xmlPullParser);
}
} while (!v0.d(xmlPullParser, "SegmentTemplate"));
if (cVar != null) {
if (iVar == null) {
iVar = cVar.a;
}
if (list2 == null) {
list2 = cVar.f;
}
}
return l(iVar, X, X2, X4, W, X3, list2, t, u02, u0, j5, j);
}
protected k.d m(long j, long j2) {
return new k.d(j, j2);
}
protected List<k.d> m0(XmlPullParser xmlPullParser, long j, long j2) throws XmlPullParserException, IOException {
ArrayList arrayList = new ArrayList();
long j3 = 0;
long j4 = -9223372036854775807L;
boolean z = false;
int i = 0;
do {
xmlPullParser.next();
if (v0.f(xmlPullParser, "S")) {
long X = X(xmlPullParser, "t", -9223372036854775807L);
if (z) {
j3 = b(arrayList, j3, j4, i, X);
}
if (X == -9223372036854775807L) {
X = j3;
}
j4 = X(xmlPullParser, "d", -9223372036854775807L);
i = U(xmlPullParser, "r", 0);
z = true;
j3 = X;
} else {
w(xmlPullParser);
}
} while (!v0.d(xmlPullParser, "SegmentTimeline"));
if (z) {
b(arrayList, j3, j4, i, u0.M0(j2, j, 1000L));
}
return arrayList;
}
protected k.e n(i iVar, long j, long j2, long j3, long j4) {
return new k.e(iVar, j, j2, j3, j4);
}
protected i n0(XmlPullParser xmlPullParser) {
return d0(xmlPullParser, "media", "mediaRange");
}
protected o o(String str, String str2) {
return new o(str, str2);
}
protected int o0(@Nullable String str) {
if (str == null) {
return 0;
}
return (str.equals("forced_subtitle") || str.equals("forced-subtitle")) ? 2 : 0;
}
protected int p0(List<e> list) {
int i = 0;
for (int i2 = 0; i2 < list.size(); i2++) {
e eVar = list.get(i2);
if (bc.a.a("urn:mpeg:dash:role:2011", eVar.a)) {
i |= o0(eVar.b);
}
}
return i;
}
protected l q0(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
long j = -9223372036854775807L;
long j2 = -9223372036854775807L;
long j3 = -9223372036854775807L;
float f = -3.4028235E38f;
float f2 = -3.4028235E38f;
while (true) {
xmlPullParser.next();
if (v0.f(xmlPullParser, "Latency")) {
j = X(xmlPullParser, "target", -9223372036854775807L);
j2 = X(xmlPullParser, "min", -9223372036854775807L);
j3 = X(xmlPullParser, "max", -9223372036854775807L);
} else if (v0.f(xmlPullParser, "PlaybackRate")) {
f = R(xmlPullParser, "min", -3.4028235E38f);
f2 = R(xmlPullParser, "max", -3.4028235E38f);
}
long j4 = j;
long j5 = j2;
long j6 = j3;
float f3 = f;
float f4 = f2;
if (v0.d(xmlPullParser, "ServiceDescription")) {
return new l(j4, j5, j6, f3, f4);
}
j = j4;
j2 = j5;
j3 = j6;
f = f3;
f2 = f4;
}
}
protected int t0(@Nullable String str) {
if (str == null) {
return 0;
}
switch (str) {
}
return 0;
}
@Nullable
protected n u0(XmlPullParser xmlPullParser, String str, @Nullable n nVar) {
String attributeValue = xmlPullParser.getAttributeValue(null, str);
return attributeValue != null ? n.b(attributeValue) : nVar;
}
protected o v0(XmlPullParser xmlPullParser) {
return o(xmlPullParser.getAttributeValue(null, "schemeIdUri"), xmlPullParser.getAttributeValue(null, "value"));
}
@Override
public c a(Uri uri, InputStream inputStream) throws IOException {
try {
XmlPullParser newPullParser = this.a.newPullParser();
newPullParser.setInput(inputStream, null);
if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
return Y(newPullParser, uri);
}
throw ParserException.c("inputStream does not contain a valid media presentation description", null);
} catch (XmlPullParserException e2) {
throw ParserException.c(null, e2);
}
}
protected h9.a y(org.xmlpull.v1.XmlPullParser r55, java.util.List<h9.b> r56, @androidx.annotation.Nullable h9.k r57, long r58, long r60, long r62, long r64, long r66, boolean r68) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: h9.d.y(org.xmlpull.v1.XmlPullParser, java.util.List, h9.k, long, long, long, long, long, boolean):h9.a");
}
protected void z(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
w(xmlPullParser);
}
}