package defpackage;

import android.os.SystemClock;
import androidx.media3.common.util.StuckPlayerException;
import androidx.media3.exoplayer.ExoPlaybackException;
import j$.util.Objects;

/* JADX INFO: renamed from: ᵘᵢᵯ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2583 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public Object f9975;

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

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public int f9977;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public long f9978;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final int f9979;

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

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public int f9981;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final /* synthetic */ C4735 f9982;

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

    public C2583(C4735 c4735, int i) {
        this.f9982 = c4735;
        this.f9979 = i;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m6308() {
        long jM7491;
        if (((C3262) this.f9982.f18000).m7460() != 2 || !((C3262) this.f9982.f18000).m7448() || ((C3262) this.f9982.f18000).m7453() != 0) {
            if (this.f9980) {
                ((C3086) this.f9982.f18007).m7173(1);
            }
            this.f9980 = false;
            return;
        }
        AbstractC4975 abstractC4975M7457 = ((C3262) this.f9982.f18000).m7457();
        Object objMo1665 = abstractC4975M7457.m10285() ? null : abstractC4975M7457.mo1665(((C3262) this.f9982.f18000).m7488());
        int iM7454 = ((C3262) this.f9982.f18000).m7454();
        int iM7490 = ((C3262) this.f9982.f18000).m7490();
        C3262 c3262 = (C3262) this.f9982.f18000;
        c3262.m7468();
        if (c3262.m7459()) {
            C4220 c4220 = c3262.f12467;
            jM7491 = c4220.f16085.equals(c4220.f16069) ? AbstractC0956.m3264(c3262.f12467.f16081) : c3262.m7451();
        } else {
            jM7491 = c3262.m7491();
        }
        long jMax = Math.max(0L, jM7491 - ((C3262) this.f9982.f18000).m7480());
        C3262 c32622 = (C3262) this.f9982.f18000;
        c32622.m7468();
        long jMax2 = Math.max(0L, AbstractC0956.m3264(c32622.f12467.f16071) - jMax);
        if (objMo1665 != null && iM7454 == -1) {
            jM7491 -= AbstractC0956.m3264(abstractC4975M7457.mo7165(objMo1665, (C4593) this.f9982.f18001).f17477);
        }
        ((C2353) this.f9982.f17998).getClass();
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        if (this.f9980 && Objects.equals(objMo1665, this.f9975) && iM7454 == this.f9977 && iM7490 == this.f9981 && jM7491 == this.f9978 && jMax2 == this.f9983) {
            long j = jElapsedRealtime - this.f9976;
            int i = this.f9979;
            if (j >= i) {
                ((SurfaceHolderCallbackC2683) this.f9982.f18003).f10352.m7475(new ExoPlaybackException(2, new StuckPlayerException(1, i), 1003));
                return;
            }
            return;
        }
        this.f9980 = true;
        this.f9976 = jElapsedRealtime;
        this.f9975 = objMo1665;
        this.f9977 = iM7454;
        this.f9981 = iM7490;
        this.f9978 = jM7491;
        this.f9983 = jMax2;
        ((C3086) this.f9982.f18007).m7173(1);
        ((C3086) this.f9982.f18007).f11775.sendEmptyMessageDelayed(1, this.f9979);
    }
}
