package defpackage;

import androidx.media3.exoplayer.source.ClippingMediaSource$IllegalClippingException;
import java.util.ArrayList;

/* renamed from: ᵴˆˉ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4632 extends AbstractC3110 {

    /* renamed from: ˁˑᵰ, reason: contains not printable characters */
    public C2452 f17153;

    /* renamed from: ᐧﾞ, reason: contains not printable characters */
    public final ArrayList f17154;

    /* renamed from: ᵙᵢᵨᵳ, reason: contains not printable characters */
    public long f17155;

    /* renamed from: ᵡᵘˎʽ, reason: contains not printable characters */
    public long f17156;

    /* renamed from: ᵧـˌᵎ, reason: contains not printable characters */
    public final long f17157;

    /* renamed from: ᵶʔᵢˊ, reason: contains not printable characters */
    public final C3254 f17158;

    /* renamed from: ᵺʙ, reason: contains not printable characters */
    public final boolean f17159;

    /* renamed from: ﾞⁱ, reason: contains not printable characters */
    public ClippingMediaSource$IllegalClippingException f17160;

    public C4632(C5466 c5466) {
        super(c5466.f20524);
        this.f17157 = c5466.f20525;
        this.f17159 = c5466.f20523;
        this.f17154 = new ArrayList();
        this.f17158 = new C3254();
    }

    @Override // defpackage.InterfaceC4865
    /* renamed from: ˎˏʜʾ */
    public final InterfaceC3757 mo2928(C2477 c2477, ᵧˉʙ r10, long j) {
        C0954 c0954 = new C0954(this.f11864.mo2928(c2477, r10, j), this.f17159, this.f17155, this.f17156, 0);
        this.f17154.add(c0954);
        return c0954;
    }

    @Override // defpackage.AbstractC3110
    /* renamed from: ˎˑː */
    public final void mo3558(AbstractC0488 abstractC0488) {
        if (this.f17160 != null) {
            return;
        }
        m9816(abstractC0488);
    }

    @Override // defpackage.AbstractC2631, defpackage.AbstractC3587
    /* renamed from: ᵢˇᵭ */
    public final void mo2930() {
        super.mo2930();
        this.f17160 = null;
        this.f17153 = null;
    }

    @Override // defpackage.InterfaceC4865
    /* renamed from: ᵳٴᵶ */
    public final void mo2932(InterfaceC3757 interfaceC3757) {
        ArrayList arrayList = this.f17154;
        ᵛᵾˏ.ᵿʗᵝʽ(arrayList.remove(interfaceC3757));
        this.f11864.mo2932(((C0954) interfaceC3757).f4293);
        if (arrayList.isEmpty()) {
            C2452 c2452 = this.f17153;
            c2452.getClass();
            m9816(c2452.f17542);
        }
    }

    @Override // defpackage.AbstractC2631, defpackage.InterfaceC4865
    /* renamed from: ᵸˑ */
    public final void mo2933() throws ClippingMediaSource$IllegalClippingException {
        ClippingMediaSource$IllegalClippingException clippingMediaSource$IllegalClippingException = this.f17160;
        if (clippingMediaSource$IllegalClippingException != null) {
            throw clippingMediaSource$IllegalClippingException;
        }
        super.mo2933();
    }

    /* renamed from: ᵺʙ, reason: contains not printable characters */
    public final void m9816(AbstractC0488 abstractC0488) {
        long j;
        C3254 c3254 = this.f17158;
        abstractC0488.m2122(0, c3254);
        long j2 = c3254.f12264;
        C2452 c2452 = this.f17153;
        long j3 = this.f17157;
        ArrayList arrayList = this.f17154;
        if (c2452 == null || arrayList.isEmpty()) {
            this.f17155 = j2;
            this.f17156 = j3 != Long.MIN_VALUE ? j2 + j3 : Long.MIN_VALUE;
            int size = arrayList.size();
            for (int i = 0; i < size; i++) {
                C0954 c0954 = (C0954) arrayList.get(i);
                long j4 = this.f17155;
                long j5 = this.f17156;
                c0954.f4290 = j4;
                c0954.f4288 = j5;
            }
            j = 0;
        } else {
            j = this.f17155 - j2;
            j3 = j3 == Long.MIN_VALUE ? Long.MIN_VALUE : this.f17156 - j2;
        }
        try {
            C2452 c24522 = new C2452(abstractC0488, j, j3);
            this.f17153 = c24522;
            m8197(c24522);
        } catch (ClippingMediaSource$IllegalClippingException e) {
            this.f17160 = e;
            for (int i2 = 0; i2 < arrayList.size(); i2++) {
                ((C0954) arrayList.get(i2)).f4289 = this.f17160;
            }
        }
    }
}
