导航菜单

页面标题

页面副标题

饼干视频 v4.1.0 - C0704.java 源代码

正在查看: 饼干视频 v4.1.0 应用的 C0704.java JAVA 源代码文件

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


package amc.cd.p128;

import amc.cd.p128.AbstractC0719;
import amc.cd.p303.C1814;
import amc.cd.p303.C1815;
import amc.cd.p303.C1833;
import amc.cd.p303.C1847;
import amc.cd.p303.C1852;
import amc.cd.p303.C1864;
import amc.cd.ऐएऋअऐऊईऌ.ईऌओओआऊउउईउ;
import amc.cd.ऐएऋअऐऊईऌ.औउऐऌ;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
import android.util.Xml;
import androidx.annotation.Nullable;
import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.bytedance.sdk.openadsdk.downloadnew.core.TTDownloadField;
import com.bytedance.sdk.openadsdk.mediation.MediationConstant;
import com.google.android.exoplayer2.C3599;
import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.drm.DrmInitData;
import com.google.android.exoplayer2.metadata.emsg.EventMessage;
import com.google.android.exoplayer2.upstream.C3511;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
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;

public class C0704 extends DefaultHandler implements C3511.InterfaceC3512<C0726> {

    public final XmlPullParserFactory f1610;

    public static final Pattern f1607 = Pattern.compile("(\\d+)(?:/(\\d+))?");

    public static final Pattern f1609 = Pattern.compile("CC([1-4])=.*");

    public static final Pattern f1606 = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");

    public static final int[] f1608 = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};

    public static final class C0705 {

        public final List<C0718> f1611;

        @Nullable
        public final String f1612;

        public final C3599 f1613;

        public final long f1614;

        public final ArrayList<C0718> f1615;

        public final List<C0718> f1616;

        public final ImmutableList<C0717> f1617;

        public final ArrayList<DrmInitData.SchemeData> f1618;

        public final AbstractC0719 f1619;

        public C0705(C3599 c3599, List<C0717> list, AbstractC0719 abstractC0719, @Nullable String str, ArrayList<DrmInitData.SchemeData> arrayList, ArrayList<C0718> arrayList2, List<C0718> list2, List<C0718> list3, long j) {
            this.f1613 = c3599;
            this.f1617 = ImmutableList.copyOf(list);
            this.f1619 = abstractC0719;
            this.f1612 = str;
            this.f1618 = arrayList;
            this.f1615 = arrayList2;
            this.f1616 = list2;
            this.f1611 = list3;
            this.f1614 = j;
        }
    }

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

    public static int m1268(List<C0718> list) {
        String str;
        for (int i = 0; i < list.size(); i++) {
            C0718 c0718 = list.get(i);
            if ("urn:scte:dash:cc:cea-608:2015".equals(c0718.f1670) && (str = c0718.f1671) != null) {
                Matcher matcher = f1609.matcher(str);
                if (matcher.matches()) {
                    return Integer.parseInt(matcher.group(1));
                }
                String valueOf = String.valueOf(c0718.f1671);
                C1864.m3610("MpdParser", valueOf.length() != 0 ? "Unable to parse CEA-608 channel number from: ".concat(valueOf) : new String("Unable to parse CEA-608 channel number from: "));
            }
        }
        return -1;
    }

    public static long m1269(XmlPullParser xmlPullParser, String str, long j) throws ParserException {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? j : C1815.m3289(attributeValue);
    }

    public static String m1270(XmlPullParser xmlPullParser, String str, String str2) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? str2 : attributeValue;
    }

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

    public static float m1272(XmlPullParser xmlPullParser, String str, float f) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? f : Float.parseFloat(attributeValue);
    }

    public static String m1273(List<C0718> list) {
        for (int i = 0; i < list.size(); i++) {
            C0718 c0718 = list.get(i);
            String str = c0718.f1670;
            if ("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str) && "JOC".equals(c0718.f1671)) {
                return "audio/eac3-joc";
            }
            if ("tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str) && "ec+3".equals(c0718.f1671)) {
                return "audio/eac3-joc";
            }
        }
        return "audio/eac3";
    }

    public static long m1274(XmlPullParser xmlPullParser, String str, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? j : C1815.m3285(attributeValue);
    }

    public static int m1275(XmlPullParser xmlPullParser) {
        int m1271 = m1271(xmlPullParser, "value", -1);
        if (m1271 < 0) {
            return -1;
        }
        int[] iArr = f1608;
        if (m1271 < iArr.length) {
            return iArr[m1271];
        }
        return -1;
    }

    public static int m1276(XmlPullParser xmlPullParser) {
        char c;
        String attributeValue = xmlPullParser.getAttributeValue(null, "value");
        if (attributeValue == null) {
            return -1;
        }
        String str = ईऌओओआऊउउईउ.ओइऌऊएएऐ(attributeValue);
        str.hashCode();
        switch (str.hashCode()) {
            case 1596796:
                if (str.equals("4000")) {
                    c = 0;
                    break;
                }
                c = 65535;
                break;
            case 2937391:
                if (str.equals("a000")) {
                    c = 1;
                    break;
                }
                c = 65535;
                break;
            case 3094035:
                if (str.equals("f801")) {
                    c = 2;
                    break;
                }
                c = 65535;
                break;
            case 3133436:
                if (str.equals("fa01")) {
                    c = 3;
                    break;
                }
                c = 65535;
                break;
            default:
                c = 65535;
                break;
        }
        switch (c) {
        }
        return -1;
    }

    public static int m1277(List<C0718> list) {
        String str;
        for (int i = 0; i < list.size(); i++) {
            C0718 c0718 = list.get(i);
            if ("urn:scte:dash:cc:cea-708:2015".equals(c0718.f1670) && (str = c0718.f1671) != null) {
                Matcher matcher = f1606.matcher(str);
                if (matcher.matches()) {
                    return Integer.parseInt(matcher.group(1));
                }
                String valueOf = String.valueOf(c0718.f1671);
                C1864.m3610("MpdParser", valueOf.length() != 0 ? "Unable to parse CEA-708 service block number from: ".concat(valueOf) : new String("Unable to parse CEA-708 service block number from: "));
            }
        }
        return -1;
    }

    public static float m1278(XmlPullParser xmlPullParser, float f) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
        if (attributeValue == null) {
            return f;
        }
        Matcher matcher = f1607.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;
    }

    public static C0718 m1279(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
        String m1270 = m1270(xmlPullParser, "schemeIdUri", "");
        String m12702 = m1270(xmlPullParser, "value", null);
        String m12703 = m1270(xmlPullParser, TTDownloadField.TT_ID, null);
        do {
            xmlPullParser.next();
        } while (!C1833.m3464(xmlPullParser, str));
        return new C0718(m1270, m12702, m12703);
    }

    public static long m1280(List<C0718> list) {
        for (int i = 0; i < list.size(); i++) {
            C0718 c0718 = list.get(i);
            if (ईऌओओआऊउउईउ.ईऌओओआऊउउईउ("http://dashif.org/guidelines/last-segment-number", c0718.f1670)) {
                return Long.parseLong(c0718.f1671);
            }
        }
        return -1L;
    }

    @Nullable
    public static String m1281(@Nullable String str, @Nullable String str2) {
        if (str == null) {
            return str2;
        }
        if (str2 == null) {
            return str;
        }
        C1814.m3274(str.equals(str2));
        return str;
    }

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

    public static String m1283(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
        String str2 = "";
        do {
            xmlPullParser.next();
            if (xmlPullParser.getEventType() == 4) {
                str2 = xmlPullParser.getText();
            } else {
                m1285(xmlPullParser);
            }
        } while (!C1833.m3464(xmlPullParser, str));
        return str2;
    }

    @Nullable
    public static String m1284(@Nullable String str, @Nullable String str2) {
        if (C1847.m3547(str)) {
            return C1847.m3546(str2);
        }
        if (C1847.m3540(str)) {
            return C1847.m3529(str2);
        }
        if (C1847.m3545(str)) {
            return "application/x-rawcc".equals(str) ? C1847.m3530(str2) : str;
        }
        if (C1847.m3538(str)) {
            return str;
        }
        if (!"application/mp4".equals(str)) {
            return null;
        }
        String m3534 = C1847.m3534(str2);
        return "text/vtt".equals(m3534) ? "application/x-mp4-vtt" : m3534;
    }

    public static void m1285(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
        if (C1833.m3470(xmlPullParser)) {
            int i = 1;
            while (i != 0) {
                xmlPullParser.next();
                if (C1833.m3470(xmlPullParser)) {
                    i++;
                } else if (C1833.m3471(xmlPullParser)) {
                    i--;
                }
            }
        }
    }

    public static void m1286(ArrayList<DrmInitData.SchemeData> arrayList) {
        for (int size = arrayList.size() - 1; size >= 0; size--) {
            DrmInitData.SchemeData schemeData = arrayList.get(size);
            if (!schemeData.m7134()) {
                int i = 0;
                while (true) {
                    if (i >= arrayList.size()) {
                        break;
                    }
                    if (arrayList.get(i).m7136(schemeData)) {
                        arrayList.remove(size);
                        break;
                    }
                    i++;
                }
            }
        }
    }

    public static long m1287(long j, long j2) {
        if (j2 != -9223372036854775807L) {
            j = j2;
        }
        if (j == Long.MAX_VALUE) {
            return -9223372036854775807L;
        }
        return j;
    }

    public static int m1288(int i, int i2) {
        if (i == -1) {
            return i2;
        }
        if (i2 == -1) {
            return i;
        }
        C1814.m3274(i == i2);
        return i;
    }

    public C0703 m1289(String str, long j, long j2) {
        return new C0703(str, j, j2);
    }

    public AbstractC0719.C0724 m1290(XmlPullParser xmlPullParser, @Nullable AbstractC0719.C0724 c0724, List<C0718> list, long j, long j2, long j3, long j4, long j5) throws XmlPullParserException, IOException {
        long m1282 = m1282(xmlPullParser, "timescale", c0724 != null ? c0724.f1674 : 1L);
        long m12822 = m1282(xmlPullParser, "presentationTimeOffset", c0724 != null ? c0724.f1675 : 0L);
        long m12823 = m1282(xmlPullParser, MediationConstant.EXTRA_DURATION, c0724 != null ? c0724.f1683 : -9223372036854775807L);
        long m12824 = m1282(xmlPullParser, "startNumber", c0724 != null ? c0724.f1679 : 1L);
        long m1280 = m1280(list);
        long m1287 = m1287(j3, j4);
        List<AbstractC0719.C0720> list2 = null;
        C0711 m1313 = m1313(xmlPullParser, "media", c0724 != null ? c0724.f1689 : null);
        C0711 m13132 = m1313(xmlPullParser, "initialization", c0724 != null ? c0724.f1687 : null);
        C0703 c0703 = null;
        do {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "Initialization")) {
                c0703 = m1315(xmlPullParser);
            } else if (C1833.m3467(xmlPullParser, "SegmentTimeline")) {
                list2 = m1314(xmlPullParser, m1282, j2);
            } else {
                m1285(xmlPullParser);
            }
        } while (!C1833.m3464(xmlPullParser, "SegmentTemplate"));
        if (c0724 != null) {
            if (c0703 == null) {
                c0703 = c0724.f1673;
            }
            if (list2 == null) {
                list2 = c0724.f1681;
            }
        }
        return m1311(c0703, m1282, m12822, m12824, m1280, m12823, list2, m1287, m13132, m1313, j5, j);
    }

    public C0715 m1291(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        String m1270 = m1270(xmlPullParser, "schemeIdUri", "");
        String m12702 = m1270(xmlPullParser, "value", "");
        long m1282 = m1282(xmlPullParser, "timescale", 1L);
        ArrayList arrayList = new ArrayList();
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(TTAdConstant.VALUE_CLICK_AREA_LAUNCH_DOUYIN);
        do {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "Event")) {
                arrayList.add(m1332(xmlPullParser, m1270, m12702, m1282, byteArrayOutputStream));
            } else {
                m1285(xmlPullParser);
            }
        } while (!C1833.m3464(xmlPullParser, "EventStream"));
        long[] jArr = new long[arrayList.size()];
        EventMessage[] eventMessageArr = new EventMessage[arrayList.size()];
        for (int i = 0; i < arrayList.size(); i++) {
            Pair pair = (Pair) arrayList.get(i);
            jArr[i] = ((Long) pair.first).longValue();
            eventMessageArr[i] = (EventMessage) pair.second;
        }
        return m1331(m1270, m12702, m1282, jArr, eventMessageArr);
    }

    public int m1292(@Nullable String str) {
        if (str == null) {
            return 0;
        }
        switch (str) {
        }
        return 0;
    }

    public amc.cd.p128.C0704.C0705 m1293(org.xmlpull.v1.XmlPullParser r36, java.util.List<amc.cd.p128.C0717> 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<amc.cd.p128.C0718> r46, java.util.List<amc.cd.p128.C0718> r47, java.util.List<amc.cd.p128.C0718> r48, java.util.List<amc.cd.p128.C0718> r49, @androidx.annotation.Nullable amc.cd.p128.AbstractC0719 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: amc.cd.p128.C0704.m1293(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, amc.cd.ईईआईइ.ओऌउऔ, long, long, long, long, long, boolean):amc.cd.ईईआईइ.इईऔओऋआऐइऐ$ईऌओओआऊउउईउ");
    }

    public String m1294(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        return m1283(xmlPullParser, "Label");
    }

    public EventMessage m1295(String str, String str2, long j, long j2, byte[] bArr) {
        return new EventMessage(str, str2, j2, j, bArr);
    }

    public C0706 m1296(String str, String str2) {
        return new C0706(str, str2);
    }

    public C0716 m1297(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException {
        String str = null;
        String m1270 = m1270(xmlPullParser, "moreInformationURL", null);
        String m12702 = m1270(xmlPullParser, "lang", null);
        String str2 = null;
        String str3 = null;
        while (true) {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "Title")) {
                str = xmlPullParser.nextText();
            } else if (C1833.m3467(xmlPullParser, "Source")) {
                str2 = xmlPullParser.nextText();
            } else if (C1833.m3467(xmlPullParser, "Copyright")) {
                str3 = xmlPullParser.nextText();
            } else {
                m1285(xmlPullParser);
            }
            String str4 = str3;
            if (C1833.m3464(xmlPullParser, "ProgramInformation")) {
                return new C0716(str, str2, str4, m1270, m12702);
            }
            str3 = str4;
        }
    }

    public int m1298(List<C0718> list) {
        int i = 0;
        for (int i2 = 0; i2 < list.size(); i2++) {
            C0718 c0718 = list.get(i2);
            if (ईऌओओआऊउउईउ.ईऌओओआऊउउईउ("urn:mpeg:dash:role:2011", c0718.f1670)) {
                i |= m1325(c0718.f1671);
            }
        }
        return i;
    }

    public String[] m1299(XmlPullParser xmlPullParser, String str, String[] strArr) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? strArr : attributeValue.split(",");
    }

    public AbstractC0707 m1300(C0705 c0705, @Nullable String str, @Nullable String str2, ArrayList<DrmInitData.SchemeData> arrayList, ArrayList<C0718> arrayList2) {
        C3599.C3601 m8607 = c0705.f1613.m8607();
        if (str != null) {
            m8607.m8667(str);
        }
        String str3 = c0705.f1612;
        if (str3 != null) {
            str2 = str3;
        }
        ArrayList<DrmInitData.SchemeData> arrayList3 = c0705.f1618;
        arrayList3.addAll(arrayList);
        if (!arrayList3.isEmpty()) {
            m1286(arrayList3);
            m8607.m8669(new DrmInitData(str2, arrayList3));
        }
        ArrayList<C0718> arrayList4 = c0705.f1615;
        arrayList4.addAll(arrayList2);
        return AbstractC0707.m1338(c0705.f1614, m8607.m8665(), c0705.f1617, c0705.f1619, arrayList4, c0705.f1616, c0705.f1611, null);
    }

    public AbstractC0719.C0723 m1301(C0703 c0703, long j, long j2, long j3, long j4) {
        return new AbstractC0719.C0723(c0703, j, j2, j3, j4);
    }

    public void m1302(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        m1285(xmlPullParser);
    }

    public C0714 m1303(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        float f = -3.4028235E38f;
        float f2 = -3.4028235E38f;
        long j = -9223372036854775807L;
        long j2 = -9223372036854775807L;
        long j3 = -9223372036854775807L;
        while (true) {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "Latency")) {
                j = m1282(xmlPullParser, "target", -9223372036854775807L);
                j2 = m1282(xmlPullParser, "min", -9223372036854775807L);
                j3 = m1282(xmlPullParser, "max", -9223372036854775807L);
            } else if (C1833.m3467(xmlPullParser, "PlaybackRate")) {
                f = m1272(xmlPullParser, "min", -3.4028235E38f);
                f2 = m1272(xmlPullParser, "max", -3.4028235E38f);
            }
            long j4 = j;
            long j5 = j2;
            long j6 = j3;
            float f3 = f;
            float f4 = f2;
            if (C1833.m3464(xmlPullParser, "ServiceDescription")) {
                return new C0714(j4, j5, j6, f3, f4);
            }
            j = j4;
            j2 = j5;
            j3 = j6;
            f = f3;
            f2 = f4;
        }
    }

    public amc.cd.p128.C0712 m1304(org.xmlpull.v1.XmlPullParser r55, java.util.List<amc.cd.p128.C0717> r56, @androidx.annotation.Nullable amc.cd.p128.AbstractC0719 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: amc.cd.p128.C0704.m1304(org.xmlpull.v1.XmlPullParser, java.util.List, amc.cd.ईईआईइ.ओऌउऔ, long, long, long, long, long, boolean):amc.cd.ईईआईइ.ईऌओओआऊउउईउ");
    }

    public amc.cd.p128.C0726 m1305(org.xmlpull.v1.XmlPullParser r47, android.net.Uri r48) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
        throw new UnsupportedOperationException("Method not decompiled: amc.cd.p128.C0704.m1305(org.xmlpull.v1.XmlPullParser, android.net.Uri):amc.cd.ईईआईइ.औउऐऌ");
    }

    public final boolean m1306(String[] strArr) {
        for (String str : strArr) {
            if (str.startsWith("urn:dvb:dash:profile:dvb-dash:")) {
                return true;
            }
        }
        return false;
    }

    public int m1307(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;
        }
        return "text".equals(attributeValue) ? 3 : -1;
    }

    public int m1308(List<C0718> list) {
        int i = 0;
        for (int i2 = 0; i2 < list.size(); i2++) {
            C0718 c0718 = list.get(i2);
            if (ईऌओओआऊउउईउ.ईऌओओआऊउउईउ("urn:mpeg:dash:role:2011", c0718.f1670)) {
                i |= m1312(c0718.f1671);
            }
        }
        return i;
    }

    public C0726 m1309(long j, long j2, long j3, boolean z, long j4, long j5, long j6, long j7, @Nullable C0716 c0716, @Nullable C0706 c0706, @Nullable C0714 c0714, @Nullable Uri uri, List<C0713> list) {
        return new C0726(j, j2, j3, z, j4, j5, j6, j7, c0716, c0706, c0714, uri, list);
    }

    public AbstractC0719.C0722 m1310(XmlPullParser xmlPullParser, @Nullable AbstractC0719.C0722 c0722, long j, long j2, long j3, long j4, long j5) throws XmlPullParserException, IOException {
        long m1282 = m1282(xmlPullParser, "timescale", c0722 != null ? c0722.f1674 : 1L);
        long m12822 = m1282(xmlPullParser, "presentationTimeOffset", c0722 != null ? c0722.f1675 : 0L);
        long m12823 = m1282(xmlPullParser, MediationConstant.EXTRA_DURATION, c0722 != null ? c0722.f1683 : -9223372036854775807L);
        long m12824 = m1282(xmlPullParser, "startNumber", c0722 != null ? c0722.f1679 : 1L);
        long m1287 = m1287(j3, j4);
        List<AbstractC0719.C0720> list = null;
        List<C0703> list2 = null;
        C0703 c0703 = null;
        do {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "Initialization")) {
                c0703 = m1315(xmlPullParser);
            } else if (C1833.m3467(xmlPullParser, "SegmentTimeline")) {
                list = m1314(xmlPullParser, m1282, j2);
            } else if (C1833.m3467(xmlPullParser, "SegmentURL")) {
                if (list2 == null) {
                    list2 = new ArrayList<>();
                }
                list2.add(m1320(xmlPullParser));
            } else {
                m1285(xmlPullParser);
            }
        } while (!C1833.m3464(xmlPullParser, "SegmentList"));
        if (c0722 != null) {
            if (c0703 == null) {
                c0703 = c0722.f1673;
            }
            if (list == null) {
                list = c0722.f1681;
            }
            if (list2 == null) {
                list2 = c0722.f1684;
            }
        }
        return m1333(c0703, m1282, m12822, m12824, m12823, list, m1287, list2, j5, j);
    }

    public AbstractC0719.C0724 m1311(C0703 c0703, long j, long j2, long j3, long j4, long j5, List<AbstractC0719.C0720> list, long j6, @Nullable C0711 c0711, @Nullable C0711 c07112, long j7, long j8) {
        return new AbstractC0719.C0724(c0703, j, j2, j3, j4, j5, list, j6, c0711, c07112, C1815.m3365(j7), C1815.m3365(j8));
    }

    public int m1312(@Nullable String str) {
        if (str == null) {
            return 0;
        }
        switch (str) {
        }
        return 0;
    }

    @Nullable
    public C0711 m1313(XmlPullParser xmlPullParser, String str, @Nullable C0711 c0711) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue != null ? C0711.m1343(attributeValue) : c0711;
    }

    public List<AbstractC0719.C0720> m1314(XmlPullParser xmlPullParser, long j, long j2) throws XmlPullParserException, IOException {
        ArrayList arrayList = new ArrayList();
        long j3 = 0;
        boolean z = false;
        int i = 0;
        long j4 = -9223372036854775807L;
        do {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "S")) {
                long m1282 = m1282(xmlPullParser, "t", -9223372036854775807L);
                if (z) {
                    j3 = m1329(arrayList, j3, j4, i, m1282);
                }
                if (m1282 == -9223372036854775807L) {
                    m1282 = j3;
                }
                j4 = m1282(xmlPullParser, "d", -9223372036854775807L);
                i = m1271(xmlPullParser, "r", 0);
                z = true;
                j3 = m1282;
            } else {
                m1285(xmlPullParser);
            }
        } while (!C1833.m3464(xmlPullParser, "SegmentTimeline"));
        if (z) {
            m1329(arrayList, j3, j4, i, C1815.m3361(j2, j, 1000L));
        }
        return arrayList;
    }

    public C0703 m1315(XmlPullParser xmlPullParser) {
        return m1317(xmlPullParser, "sourceURL", "range");
    }

    public int m1316(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        char c;
        String m1270 = m1270(xmlPullParser, "schemeIdUri", null);
        m1270.hashCode();
        int i = -1;
        switch (m1270.hashCode()) {
            case -1352850286:
                if (m1270.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011")) {
                    c = 0;
                    break;
                }
                c = 65535;
                break;
            case -1138141449:
                if (m1270.equals("tag:dolby.com,2014:dash:audio_channel_configuration:2011")) {
                    c = 1;
                    break;
                }
                c = 65535;
                break;
            case -986633423:
                if (m1270.equals("urn:mpeg:mpegB:cicp:ChannelConfiguration")) {
                    c = 2;
                    break;
                }
                c = 65535;
                break;
            case 2036691300:
                if (m1270.equals("urn:dolby:dash:audio_channel_configuration:2011")) {
                    c = 3;
                    break;
                }
                c = 65535;
                break;
            default:
                c = 65535;
                break;
        }
        switch (c) {
            case 0:
                i = m1271(xmlPullParser, "value", -1);
                break;
            case 1:
            case 3:
                i = m1276(xmlPullParser);
                break;
            case 2:
                i = m1275(xmlPullParser);
                break;
        }
        do {
            xmlPullParser.next();
        } while (!C1833.m3464(xmlPullParser, "AudioChannelConfiguration"));
        return i;
    }

    public C0703 m1317(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 m1289(attributeValue, j, j2);
            }
        } else {
            j = 0;
        }
        j2 = -1;
        return m1289(attributeValue, j, j2);
    }

    public int m1318(List<C0718> list) {
        int i = 0;
        for (int i2 = 0; i2 < list.size(); i2++) {
            if (ईऌओओआऊउउईउ.ईऌओओआऊउउईउ("http://dashif.org/guidelines/trickmode", list.get(i2).f1670)) {
                i |= 16384;
            }
        }
        return i;
    }

    public C3599 m1319(@Nullable String str, @Nullable String str2, int i, int i2, float f, int i3, int i4, int i5, @Nullable String str3, List<C0718> list, List<C0718> list2, @Nullable String str4, List<C0718> list3, List<C0718> list4) {
        String str5 = str4;
        String m1284 = m1284(str2, str5);
        if ("audio/eac3".equals(m1284)) {
            m1284 = m1273(list4);
            if ("audio/eac3-joc".equals(m1284)) {
                str5 = "ec+3";
            }
        }
        int m1298 = m1298(list);
        C3599.C3601 m8651 = new C3599.C3601().m8644(str).m8649(str2).m8664(m1284).m8654(str5).m8645(i5).m8666(m1298).m8668(m1308(list) | m1328(list2) | m1318(list3) | m1318(list4)).m8651(str3);
        if (C1847.m3540(m1284)) {
            m8651.m8660(i).m8661(i2).m8657(f);
        } else if (C1847.m3547(m1284)) {
            m8651.m8659(i3).m8655(i4);
        } else if (C1847.m3545(m1284)) {
            int i6 = -1;
            if ("application/cea-608".equals(m1284)) {
                i6 = m1268(list2);
            } else if ("application/cea-708".equals(m1284)) {
                i6 = m1277(list2);
            }
            m8651.m8653(i6);
        } else if (C1847.m3538(m1284)) {
            m8651.m8660(i).m8661(i2);
        }
        return m8651.m8665();
    }

    public C0703 m1320(XmlPullParser xmlPullParser) {
        return m1317(xmlPullParser, "media", "mediaRange");
    }

    public C0713 m1321(@Nullable String str, long j, List<C0712> list, List<C0715> list2, @Nullable C0718 c0718) {
        return new C0713(str, j, list, list2, c0718);
    }

    public android.util.Pair<java.lang.String, com.google.android.exoplayer2.drm.DrmInitData.SchemeData> m1322(org.xmlpull.v1.XmlPullParser r11) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
        throw new UnsupportedOperationException("Method not decompiled: amc.cd.p128.C0704.m1322(org.xmlpull.v1.XmlPullParser):android.util.Pair");
    }

    public C0706 m1323(XmlPullParser xmlPullParser) {
        return m1296(xmlPullParser.getAttributeValue(null, "schemeIdUri"), xmlPullParser.getAttributeValue(null, "value"));
    }

    public AbstractC0719.C0723 m1324(XmlPullParser xmlPullParser, @Nullable AbstractC0719.C0723 c0723) throws XmlPullParserException, IOException {
        long j;
        long j2;
        long m1282 = m1282(xmlPullParser, "timescale", c0723 != null ? c0723.f1674 : 1L);
        long m12822 = m1282(xmlPullParser, "presentationTimeOffset", c0723 != null ? c0723.f1675 : 0L);
        long j3 = c0723 != null ? c0723.f1685 : 0L;
        long j4 = c0723 != null ? c0723.f1686 : 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;
        }
        C0703 c0703 = c0723 != null ? c0723.f1673 : null;
        do {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser, "Initialization")) {
                c0703 = m1315(xmlPullParser);
            } else {
                m1285(xmlPullParser);
            }
        } while (!C1833.m3464(xmlPullParser, "SegmentBase"));
        return m1301(c0703, m1282, m12822, j2, j);
    }

    public int m1325(@Nullable String str) {
        if (str == null) {
            return 0;
        }
        return (str.equals("forced_subtitle") || str.equals("forced-subtitle")) ? 2 : 0;
    }

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

    @Override
    public C0726 mo794(Uri uri, InputStream inputStream) throws IOException {
        try {
            XmlPullParser newPullParser = this.f1610.newPullParser();
            newPullParser.setInput(inputStream, null);
            if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
                return m1305(newPullParser, uri);
            }
            throw ParserException.createForMalformedManifest("inputStream does not contain a valid media presentation description", null);
        } catch (XmlPullParserException e) {
            throw ParserException.createForMalformedManifest(null, e);
        }
    }

    public int m1328(List<C0718> list) {
        int m1292;
        int i = 0;
        for (int i2 = 0; i2 < list.size(); i2++) {
            C0718 c0718 = list.get(i2);
            if (ईऌओओआऊउउईउ.ईऌओओआऊउउईउ("urn:mpeg:dash:role:2011", c0718.f1670)) {
                m1292 = m1312(c0718.f1671);
            } else if (ईऌओओआऊउउईउ.ईऌओओआऊउउईउ("urn:tva:metadata:cs:AudioPurposeCS:2007", c0718.f1670)) {
                m1292 = m1292(c0718.f1671);
            }
            i |= m1292;
        }
        return i;
    }

    public final long m1329(List<AbstractC0719.C0720> list, long j, long j2, int i, long j3) {
        int m3376 = i >= 0 ? i + 1 : (int) C1815.m3376(j3 - j, j2);
        for (int i2 = 0; i2 < m3376; i2++) {
            list.add(m1334(j, j2));
            j += j2;
        }
        return j;
    }

    public byte[] m1330(XmlPullParser xmlPullParser, ByteArrayOutputStream byteArrayOutputStream) throws XmlPullParserException, IOException {
        byteArrayOutputStream.reset();
        XmlSerializer newSerializer = Xml.newSerializer();
        newSerializer.setOutput(byteArrayOutputStream, औउऐऌ.औउऐऌ.name());
        xmlPullParser.nextToken();
        while (!C1833.m3464(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();
    }

    public C0715 m1331(String str, String str2, long j, long[] jArr, EventMessage[] eventMessageArr) {
        return new C0715(str, str2, j, jArr, eventMessageArr);
    }

    public Pair<Long, EventMessage> m1332(XmlPullParser xmlPullParser, String str, String str2, long j, ByteArrayOutputStream byteArrayOutputStream) throws IOException, XmlPullParserException {
        long m1282 = m1282(xmlPullParser, TTDownloadField.TT_ID, 0L);
        long m12822 = m1282(xmlPullParser, MediationConstant.EXTRA_DURATION, -9223372036854775807L);
        long m12823 = m1282(xmlPullParser, "presentationTime", 0L);
        long m3361 = C1815.m3361(m12822, 1000L, j);
        long m33612 = C1815.m3361(m12823, 1000000L, j);
        String m1270 = m1270(xmlPullParser, "messageData", null);
        byte[] m1330 = m1330(xmlPullParser, byteArrayOutputStream);
        Long valueOf = Long.valueOf(m33612);
        if (m1270 != null) {
            m1330 = C1815.m3315(m1270);
        }
        return Pair.create(valueOf, m1295(str, str2, m1282, m3361, m1330));
    }

    public AbstractC0719.C0722 m1333(C0703 c0703, long j, long j2, long j3, long j4, @Nullable List<AbstractC0719.C0720> list, long j5, @Nullable List<C0703> list2, long j6, long j7) {
        return new AbstractC0719.C0722(c0703, j, j2, j3, j4, list, j5, list2, C1815.m3365(j6), C1815.m3365(j7));
    }

    public AbstractC0719.C0720 m1334(long j, long j2) {
        return new AbstractC0719.C0720(j, j2);
    }

    public List<C0717> m1335(XmlPullParser xmlPullParser, List<C0717> list, boolean z) throws XmlPullParserException, IOException {
        String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority");
        int parseInt = attributeValue != null ? Integer.parseInt(attributeValue) : z ? 1 : TTAdConstant.SHOW_POLL_TIME_NOT_FOUND;
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "dvb:weight");
        int parseInt2 = attributeValue2 != null ? Integer.parseInt(attributeValue2) : 1;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "serviceLocation");
        String m1283 = m1283(xmlPullParser, "BaseURL");
        if (C1852.m3556(m1283)) {
            if (attributeValue3 == null) {
                attributeValue3 = m1283;
            }
            return Lists.ओऌएऐऐऔओऋउउ(new C0717[]{new C0717(m1283, attributeValue3, parseInt, parseInt2)});
        }
        ArrayList arrayList = new ArrayList();
        for (int i = 0; i < list.size(); i++) {
            C0717 c0717 = list.get(i);
            String m3554 = C1852.m3554(c0717.f1667, m1283);
            String str = attributeValue3 == null ? m3554 : attributeValue3;
            if (z) {
                parseInt = c0717.f1669;
                parseInt2 = c0717.f1666;
                str = c0717.f1668;
            }
            arrayList.add(new C0717(m3554, str, parseInt, parseInt2));
        }
        return arrayList;
    }

    public C0712 m1336(int i, int i2, List<AbstractC0707> list, List<C0718> list2, List<C0718> list3, List<C0718> list4) {
        return new C0712(i, i2, list, list2, list3, list4);
    }

    public Pair<C0713, Long> m1337(XmlPullParser xmlPullParser, List<C0717> 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;
        AbstractC0719 m1290;
        C0704 c0704 = this;
        XmlPullParser xmlPullParser2 = xmlPullParser;
        Object obj2 = null;
        String attributeValue = xmlPullParser2.getAttributeValue(null, TTDownloadField.TT_ID);
        long m1274 = m1274(xmlPullParser2, "start", j);
        long j7 = -9223372036854775807L;
        long j8 = j3 != -9223372036854775807L ? j3 + m1274 : -9223372036854775807L;
        long m12742 = m1274(xmlPullParser2, MediationConstant.EXTRA_DURATION, -9223372036854775807L);
        ArrayList arrayList4 = new ArrayList();
        ArrayList arrayList5 = new ArrayList();
        ArrayList arrayList6 = new ArrayList();
        long j9 = j2;
        boolean z2 = false;
        long j10 = -9223372036854775807L;
        AbstractC0719 abstractC0719 = null;
        C0718 c0718 = null;
        while (true) {
            xmlPullParser.next();
            if (C1833.m3467(xmlPullParser2, "BaseURL")) {
                if (!z2) {
                    j9 = c0704.m1326(xmlPullParser2, j9);
                    z2 = true;
                }
                arrayList6.addAll(c0704.m1335(xmlPullParser2, list, z));
                arrayList3 = arrayList5;
                arrayList = arrayList6;
                j6 = j7;
                obj = obj2;
                arrayList2 = arrayList4;
            } else {
                if (C1833.m3467(xmlPullParser2, "AdaptationSet")) {
                    j5 = j9;
                    arrayList = arrayList6;
                    arrayList2 = arrayList4;
                    arrayList2.add(m1304(xmlPullParser, !arrayList6.isEmpty() ? arrayList6 : list, abstractC0719, m12742, j9, j10, j8, j4, z));
                    xmlPullParser2 = xmlPullParser;
                    arrayList3 = arrayList5;
                } else {
                    j5 = j9;
                    ArrayList arrayList7 = arrayList5;
                    arrayList = arrayList6;
                    arrayList2 = arrayList4;
                    xmlPullParser2 = xmlPullParser;
                    if (C1833.m3467(xmlPullParser2, "EventStream")) {
                        arrayList7.add(m1291(xmlPullParser));
                        arrayList3 = arrayList7;
                    } else if (C1833.m3467(xmlPullParser2, "SegmentBase")) {
                        arrayList3 = arrayList7;
                        abstractC0719 = m1324(xmlPullParser2, null);
                        obj = null;
                        j9 = j5;
                        j6 = -9223372036854775807L;
                    } else {
                        arrayList3 = arrayList7;
                        if (C1833.m3467(xmlPullParser2, "SegmentList")) {
                            long m1326 = m1326(xmlPullParser2, -9223372036854775807L);
                            obj = null;
                            m1290 = m1310(xmlPullParser, null, j8, m12742, j5, m1326, j4);
                            j10 = m1326;
                            j9 = j5;
                            j6 = -9223372036854775807L;
                        } else {
                            obj = null;
                            if (C1833.m3467(xmlPullParser2, "SegmentTemplate")) {
                                long m13262 = m1326(xmlPullParser2, -9223372036854775807L);
                                j6 = -9223372036854775807L;
                                m1290 = m1290(xmlPullParser, null, ImmutableList.of(), j8, m12742, j5, m13262, j4);
                                j10 = m13262;
                                j9 = j5;
                            } else {
                                j6 = -9223372036854775807L;
                                if (C1833.m3467(xmlPullParser2, "AssetIdentifier")) {
                                    c0718 = m1279(xmlPullParser2, "AssetIdentifier");
                                } else {
                                    m1285(xmlPullParser);
                                }
                                j9 = j5;
                            }
                        }
                        abstractC0719 = m1290;
                    }
                }
                obj = null;
                j6 = -9223372036854775807L;
                j9 = j5;
            }
            if (C1833.m3464(xmlPullParser2, "Period")) {
                return Pair.create(m1321(attributeValue, m1274, arrayList2, arrayList3, c0718), Long.valueOf(m12742));
            }
            arrayList4 = arrayList2;
            arrayList6 = arrayList;
            obj2 = obj;
            arrayList5 = arrayList3;
            j7 = j6;
            c0704 = this;
        }
    }
}