导航菜单

页面标题

页面副标题

Bhakti v5.4.0 - e.java 源代码

正在查看: Bhakti v5.4.0 应用的 e.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package p3;

import E3.q;
import android.net.Uri;
import android.text.TextUtils;
import b3.N;
import cc.y;
import e3.C;
import e3.b;
import e3.d;
import h3.k;
import io.sentry.config.a;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import m6.l;
import org.xml.sax.helpers.DefaultHandler;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

public final class e extends DefaultHandler implements q {

    public static final Pattern f498b = Pattern.compile("(\\d+)(?:/(\\d+))?");
    public static final Pattern c = Pattern.compile("CC([1-4])=.*");
    public static final Pattern d = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");
    public static final int[] e = {2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2};
    public static final int[] f = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};

    public final XmlPullParserFactory f499a;

    public e() {
        try {
            this.f499a = XmlPullParserFactory.newInstance();
        } catch (XmlPullParserException e4) {
            throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e4);
        }
    }

    public static long a(ArrayList arrayList, long j, long j2, int i, long j3) {
        int i2;
        if (i >= 0) {
            i2 = i + 1;
        } else {
            int i3 = C.f422a;
            i2 = (int) ((((j3 - j) + j2) - 1) / j2);
        }
        for (int i4 = 0; i4 < i2; i4++) {
            arrayList.add(new q(j, j2));
            j += j2;
        }
        return j;
    }

    public static void b(XmlPullParser xmlPullParser) {
        if (b.o(xmlPullParser)) {
            int i = 1;
            while (i != 0) {
                xmlPullParser.next();
                if (b.o(xmlPullParser)) {
                    i++;
                } else if (xmlPullParser.getEventType() == 3) {
                    i--;
                }
            }
        }
    }

    public static int c(org.xmlpull.v1.XmlPullParser r13, java.lang.String r14) {
        throw new UnsupportedOperationException("Method not decompiled: p3.e.c(org.xmlpull.v1.XmlPullParser, java.lang.String):int");
    }

    public static long d(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);
    }

    public static ArrayList e(XmlPullParser xmlPullParser, List list, boolean z) {
        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 str = "";
        do {
            xmlPullParser.next();
            if (xmlPullParser.getEventType() == 4) {
                str = xmlPullParser.getText();
            } else {
                b(xmlPullParser);
            }
        } while (!b.n(xmlPullParser, "BaseURL"));
        if (str != null && d.k(str)[0] != -1) {
            if (attributeValue3 == null) {
                attributeValue3 = str;
            }
            return y.y(new b[]{new b(parseInt, parseInt2, str, attributeValue3)});
        }
        ArrayList arrayList = new ArrayList();
        for (int i = 0; i < list.size(); i++) {
            b bVar = (b) list.get(i);
            String n = d.n(bVar.a, str);
            String str2 = attributeValue3 == null ? n : attributeValue3;
            if (z) {
                parseInt = bVar.c;
                parseInt2 = bVar.d;
                str2 = bVar.b;
            }
            arrayList.add(new b(parseInt, parseInt2, n, str2));
        }
        return arrayList;
    }

    public static android.util.Pair f(org.xmlpull.v1.XmlPullParser r14) {
        throw new UnsupportedOperationException("Method not decompiled: p3.e.f(org.xmlpull.v1.XmlPullParser):android.util.Pair");
    }

    public static int g(XmlPullParser xmlPullParser) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "contentType");
        if (TextUtils.isEmpty(attributeValue)) {
            return -1;
        }
        if ("audio".equals(attributeValue)) {
            return 1;
        }
        if ("video".equals(attributeValue)) {
            return 2;
        }
        if ("text".equals(attributeValue)) {
            return 3;
        }
        return "image".equals(attributeValue) ? 4 : -1;
    }

    public static f h(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 (!b.n(xmlPullParser, str));
        return new f(attributeValue, attributeValue2, str2);
    }

    public static long i(XmlPullParser xmlPullParser, String str, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        if (attributeValue == null) {
            return j;
        }
        Matcher matcher = C.f.matcher(attributeValue);
        if (!matcher.matches()) {
            return (long) (Double.parseDouble(attributeValue) * 3600.0d * 1000.0d);
        }
        boolean isEmpty = 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 j(XmlPullParser xmlPullParser, float f2) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
        if (attributeValue == null) {
            return f2;
        }
        Matcher matcher = f498b.matcher(attributeValue);
        if (!matcher.matches()) {
            return f2;
        }
        int parseInt = Integer.parseInt(matcher.group(1));
        return !TextUtils.isEmpty(matcher.group(2)) ? parseInt / Integer.parseInt(r2) : parseInt;
    }

    public static int k(XmlPullParser xmlPullParser, String str, int i) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? i : Integer.parseInt(attributeValue);
    }

    public static long l(XmlPullParser xmlPullParser, String str, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? j : Long.parseLong(attributeValue);
    }

    public static p3.c m(org.xmlpull.v1.XmlPullParser r169, android.net.Uri r170) {
        throw new UnsupportedOperationException("Method not decompiled: p3.e.m(org.xmlpull.v1.XmlPullParser, android.net.Uri):p3.c");
    }

    public static j n(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 new j(attributeValue, j, j2);
            }
        } else {
            j = 0;
        }
        j2 = -1;
        return new j(attributeValue, j, j2);
    }

    public static int o(String str) {
        if (str == null) {
            return 0;
        }
        switch (str) {
        }
        return 0;
    }

    public static int q(ArrayList arrayList) {
        int i = 0;
        for (int i2 = 0; i2 < arrayList.size(); i2++) {
            if (a.t("http://dashif.org/guidelines/trickmode", ((f) arrayList.get(i2)).a)) {
                i = 16384;
            }
        }
        return i;
    }

    public static r r(XmlPullParser xmlPullParser, r rVar) {
        long j;
        long j2;
        long l = l(xmlPullParser, "timescale", rVar != null ? ((s) rVar).b : 1L);
        long l4 = l(xmlPullParser, "presentationTimeOffset", rVar != null ? ((s) rVar).c : 0L);
        long j3 = rVar != null ? rVar.d : 0L;
        long j4 = rVar != null ? rVar.e : 0L;
        String attributeValue = xmlPullParser.getAttributeValue(null, "indexRange");
        if (attributeValue != null) {
            String[] split = attributeValue.split("-");
            long parseLong = Long.parseLong(split[0]);
            j = (Long.parseLong(split[1]) - parseLong) + 1;
            j2 = parseLong;
        } else {
            j = j4;
            j2 = j3;
        }
        j jVar = rVar != null ? ((s) rVar).a : null;
        do {
            xmlPullParser.next();
            if (b.p(xmlPullParser, "Initialization")) {
                jVar = n(xmlPullParser, "sourceURL", "range");
            } else {
                b(xmlPullParser);
            }
        } while (!b.n(xmlPullParser, "SegmentBase"));
        return new r(jVar, l, l4, j2, j);
    }

    public static o s(XmlPullParser xmlPullParser, o oVar, long j, long j2, long j3, long j4, long j7) {
        long l = l(xmlPullParser, "timescale", oVar != null ? ((s) oVar).b : 1L);
        long l4 = l(xmlPullParser, "presentationTimeOffset", oVar != null ? ((s) oVar).c : 0L);
        long l5 = l(xmlPullParser, "duration", oVar != null ? ((n) oVar).e : -9223372036854775807L);
        long l6 = l(xmlPullParser, "startNumber", oVar != null ? ((n) oVar).d : 1L);
        long j8 = j4 == -9223372036854775807L ? j3 : j4;
        long j9 = j8 == Long.MAX_VALUE ? -9223372036854775807L : j8;
        List list = null;
        j jVar = null;
        List list2 = null;
        do {
            xmlPullParser.next();
            if (b.p(xmlPullParser, "Initialization")) {
                jVar = n(xmlPullParser, "sourceURL", "range");
            } else if (b.p(xmlPullParser, "SegmentTimeline")) {
                list2 = u(xmlPullParser, l, j2);
            } else if (b.p(xmlPullParser, "SegmentURL")) {
                if (list == null) {
                    list = new ArrayList();
                }
                list.add(n(xmlPullParser, "media", "mediaRange"));
            } else {
                b(xmlPullParser);
            }
        } while (!b.n(xmlPullParser, "SegmentList"));
        if (oVar != null) {
            if (jVar == null) {
                jVar = ((s) oVar).a;
            }
            if (list2 == null) {
                list2 = ((n) oVar).f;
            }
            if (list == null) {
                list = oVar.j;
            }
        }
        return new o(jVar, l, l4, l6, l5, list2, j9, list, C.R(j7), C.R(j));
    }

    public static p t(XmlPullParser xmlPullParser, p pVar, List list, long j, long j2, long j3, long j4, long j7) {
        long j8;
        long l = l(xmlPullParser, "timescale", pVar != null ? ((s) pVar).b : 1L);
        long l4 = l(xmlPullParser, "presentationTimeOffset", pVar != null ? ((s) pVar).c : 0L);
        long l5 = l(xmlPullParser, "duration", pVar != null ? ((n) pVar).e : -9223372036854775807L);
        long l6 = l(xmlPullParser, "startNumber", pVar != null ? ((n) pVar).d : 1L);
        int i = 0;
        while (true) {
            if (i >= list.size()) {
                j8 = -1;
                break;
            }
            f fVar = (f) list.get(i);
            if (a.t("http://dashif.org/guidelines/last-segment-number", fVar.a)) {
                j8 = Long.parseLong(fVar.b);
                break;
            }
            i++;
        }
        long j9 = j8;
        long j10 = j4 == -9223372036854775807L ? j3 : j4;
        long j11 = j10 == Long.MAX_VALUE ? -9223372036854775807L : j10;
        j jVar = null;
        l v = v(xmlPullParser, "media", pVar != null ? pVar.k : null);
        l v2 = v(xmlPullParser, "initialization", pVar != null ? pVar.j : null);
        List list2 = null;
        do {
            xmlPullParser.next();
            if (b.p(xmlPullParser, "Initialization")) {
                jVar = n(xmlPullParser, "sourceURL", "range");
            } else if (b.p(xmlPullParser, "SegmentTimeline")) {
                list2 = u(xmlPullParser, l, j2);
            } else {
                b(xmlPullParser);
            }
        } while (!b.n(xmlPullParser, "SegmentTemplate"));
        if (pVar != null) {
            if (jVar == null) {
                jVar = ((s) pVar).a;
            }
            if (list2 == null) {
                list2 = ((n) pVar).f;
            }
        }
        return new p(jVar, l, l4, l6, j9, l5, list2, j11, v2, v, C.R(j7), C.R(j));
    }

    public static ArrayList u(XmlPullParser xmlPullParser, long j, long j2) {
        ArrayList arrayList = new ArrayList();
        long j3 = 0;
        long j4 = -9223372036854775807L;
        boolean z = false;
        int i = 0;
        do {
            xmlPullParser.next();
            if (b.p(xmlPullParser, "S")) {
                long l = l(xmlPullParser, "t", -9223372036854775807L);
                if (z) {
                    j3 = a(arrayList, j3, j4, i, l);
                }
                if (l == -9223372036854775807L) {
                    l = j3;
                }
                long l4 = l(xmlPullParser, "d", -9223372036854775807L);
                i = k(xmlPullParser, "r", 0);
                z = true;
                j4 = l4;
                j3 = l;
            } else {
                b(xmlPullParser);
            }
        } while (!b.n(xmlPullParser, "SegmentTimeline"));
        if (z) {
            int i2 = C.f422a;
            a(arrayList, j3, j4, i, C.Z(j2, j, 1000L, RoundingMode.DOWN));
        }
        return arrayList;
    }

    public static l v(XmlPullParser xmlPullParser, String str, l lVar) {
        String str2;
        boolean z;
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        if (attributeValue == null) {
            return lVar;
        }
        ArrayList arrayList = new ArrayList();
        ArrayList arrayList2 = new ArrayList();
        ArrayList arrayList3 = new ArrayList();
        arrayList.add("");
        int i = 0;
        while (i < attributeValue.length()) {
            int indexOf = attributeValue.indexOf("$", i);
            if (indexOf == -1) {
                arrayList.set(arrayList2.size(), ((String) arrayList.get(arrayList2.size())) + attributeValue.substring(i));
                i = attributeValue.length();
            } else if (indexOf != i) {
                arrayList.set(arrayList2.size(), ((String) arrayList.get(arrayList2.size())) + attributeValue.substring(i, indexOf));
                i = indexOf;
            } else if (attributeValue.startsWith("$$", i)) {
                arrayList.set(arrayList2.size(), ((String) arrayList.get(arrayList2.size())) + "$");
                i += 2;
            } else {
                arrayList3.add("");
                int i2 = i + 1;
                int indexOf2 = attributeValue.indexOf("$", i2);
                String substring = attributeValue.substring(i2, indexOf2);
                if (substring.equals("RepresentationID")) {
                    arrayList2.add(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 = str2.concat("d");
                        }
                        substring = substring.substring(0, indexOf3);
                    } else {
                        str2 = "%01d";
                    }
                    substring.getClass();
                    switch (substring.hashCode()) {
                        case -1950496919:
                            if (substring.equals("Number")) {
                                z = false;
                                break;
                            }
                            break;
                        case 2606829:
                            if (substring.equals("Time")) {
                                z = true;
                                break;
                            }
                            break;
                        case 38199441:
                            if (substring.equals("Bandwidth")) {
                                z = 2;
                                break;
                            }
                            break;
                    }
                    z = -1;
                    switch (z) {
                        case false:
                            arrayList2.add(2);
                            break;
                        case true:
                            arrayList2.add(4);
                            break;
                        case true:
                            arrayList2.add(3);
                            break;
                        default:
                            throw new IllegalArgumentException("Invalid template: ".concat(attributeValue));
                    }
                    arrayList3.set(arrayList2.size() - 1, str2);
                }
                arrayList.add("");
                i = indexOf2 + 1;
            }
        }
        return new l(arrayList, arrayList2, arrayList3, 3);
    }

    public final Object p(Uri uri, k kVar) {
        try {
            XmlPullParser newPullParser = this.f499a.newPullParser();
            newPullParser.setInput(kVar, null);
            if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
                return m(newPullParser, uri);
            }
            throw N.b("inputStream does not contain a valid media presentation description", (Exception) null);
        } catch (XmlPullParserException e4) {
            throw N.b((String) null, e4);
        }
    }
}