package defpackage;

import androidx.media3.common.ParserException;
import androidx.media3.exoplayer.smoothstreaming.manifest.SsManifestParser$MissingFieldException;
import java.math.RoundingMode;
import java.util.LinkedList;
import org.xmlpull.v1.XmlPullParser;

/* JADX INFO: renamed from: ᵗᵱᵢ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2529 extends AbstractC5483 {

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public long f9785;

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public C4733 f9786;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final LinkedList f9787;

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public boolean f9788;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public long f9789;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public int f9790;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public int f9791;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public long f9792;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public int f9793;

    public C2529(String str) {
        super(null, str, "SmoothStreamingMedia");
        this.f9791 = -1;
        this.f9786 = null;
        this.f9787 = new LinkedList();
    }

    @Override // defpackage.AbstractC5483
    /* JADX INFO: renamed from: ʽˈˋ */
    public final Object mo5456() {
        long jM3218;
        LinkedList linkedList = this.f9787;
        int size = linkedList.size();
        C5494[] c5494Arr = new C5494[size];
        linkedList.toArray(c5494Arr);
        C4733 c4733 = this.f9786;
        if (c4733 != null) {
            C5576 c5576 = new C5576(new C4386(c4733.f17995, null, "video/mp4", c4733.f17993));
            for (int i = 0; i < size; i++) {
                C5494 c5494 = c5494Arr[i];
                int i2 = c5494.f20767;
                if (i2 == 2 || i2 == 1) {
                    C5286[] c5286Arr = c5494.f20766;
                    for (int i3 = 0; i3 < c5286Arr.length; i3++) {
                        C4753 c4753M10878 = c5286Arr[i3].m10878();
                        c4753M10878.f18096 = c5576;
                        c5286Arr[i3] = new C5286(c4753M10878);
                    }
                }
            }
        }
        int i4 = this.f9793;
        int i5 = this.f9790;
        long j = this.f9785;
        long j2 = this.f9792;
        long j3 = this.f9789;
        int i6 = this.f9791;
        boolean z = this.f9788;
        C4733 c47332 = this.f9786;
        long jM32182 = -9223372036854775807L;
        if (j2 == 0) {
            jM3218 = -9223372036854775807L;
        } else {
            String str = AbstractC0956.f4222;
            jM3218 = AbstractC0956.m3218(j2, 1000000L, j, RoundingMode.DOWN);
        }
        if (j3 != 0) {
            String str2 = AbstractC0956.f4222;
            jM32182 = AbstractC0956.m3218(j3, 1000000L, j, RoundingMode.DOWN);
        }
        return new C0464(i4, i5, jM3218, jM32182, i6, z, c47332, c5494Arr);
    }

    @Override // defpackage.AbstractC5483
    /* JADX INFO: renamed from: ᵱᵽʡᵚ */
    public final void mo5457(XmlPullParser xmlPullParser) throws ParserException {
        this.f9793 = AbstractC5483.m11108(xmlPullParser, "MajorVersion");
        this.f9790 = AbstractC5483.m11108(xmlPullParser, "MinorVersion");
        this.f9785 = AbstractC5483.m11106(xmlPullParser, "TimeScale", 10000000L);
        String attributeValue = xmlPullParser.getAttributeValue(null, "Duration");
        if (attributeValue == null) {
            throw new SsManifestParser$MissingFieldException("Duration");
        }
        try {
            this.f9792 = Long.parseLong(attributeValue);
            this.f9789 = AbstractC5483.m11106(xmlPullParser, "DVRWindowLength", 0L);
            this.f9791 = AbstractC5483.m11107(xmlPullParser, "LookaheadCount");
            String attributeValue2 = xmlPullParser.getAttributeValue(null, "IsLive");
            this.f9788 = attributeValue2 != null ? Boolean.parseBoolean(attributeValue2) : false;
            m11111(Long.valueOf(this.f9785), "TimeScale");
        } catch (NumberFormatException e) {
            throw ParserException.m355(null, e);
        }
    }

    @Override // defpackage.AbstractC5483
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void mo6249(Object obj) {
        if (obj instanceof C5494) {
            this.f9787.add((C5494) obj);
        } else if (obj instanceof C4733) {
            ᵻᵪ.ˌᴵ(this.f9786 == null);
            this.f9786 = (C4733) obj;
        }
    }
}
