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 C4146 {

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

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

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

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

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final /* synthetic */ C4735 f15819;

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

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

    public C4146(C4735 c4735, int i) {
        this.f15819 = c4735;
        this.f15818 = i;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m9066() {
        long jM7451;
        C4735 c4735 = this.f15819;
        C4593 c4593 = (C4593) c4735.f18001;
        C3086 c3086 = (C3086) c4735.f18007;
        C3262 c3262 = (C3262) c4735.f18000;
        AbstractC4975 abstractC4975M7457 = c3262.m7457();
        Object objMo1665 = abstractC4975M7457.m10285() ? null : abstractC4975M7457.mo1665(c3262.m7488());
        int iM7454 = c3262.m7454();
        int iM7490 = c3262.m7490();
        long jM7480 = c3262.m7480();
        if (objMo1665 == null || iM7454 != -1) {
            jM7451 = iM7454 != -1 ? c3262.m7451() : -9223372036854775807L;
        } else {
            abstractC4975M7457.mo7165(objMo1665, c4593);
            jM7480 -= AbstractC0956.m3264(c4593.f17477);
            jM7451 = AbstractC0956.m3264(c4593.f17480);
        }
        boolean zM7445 = c3262.m7445();
        if (!zM7445 || jM7451 == -9223372036854775807L || jM7480 < jM7451) {
            c3086.m7173(3);
            if (zM7445 && jM7451 != -9223372036854775807L) {
                c3262.m7468();
                c3086.f11775.sendEmptyMessageDelayed(3, (int) Math.ceil((jM7451 - jM7480) / c3262.f12467.f16079.f17813));
            }
            this.f15817 = false;
            return;
        }
        ((C2353) c4735.f17998).getClass();
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        boolean z = this.f15817;
        int i = this.f15818;
        if (z && Objects.equals(objMo1665, this.f15815) && iM7454 == this.f15816 && iM7490 == this.f15820) {
            if (jElapsedRealtime - this.f15821 >= i) {
                ((SurfaceHolderCallbackC2683) c4735.f18003).f10352.m7475(new ExoPlaybackException(2, new StuckPlayerException(3, i), 1003));
                return;
            }
            return;
        }
        this.f15817 = true;
        this.f15821 = jElapsedRealtime;
        this.f15815 = objMo1665;
        this.f15816 = iM7454;
        this.f15820 = iM7490;
        c3086.m7173(3);
        c3086.f11775.sendEmptyMessageDelayed(3, i);
    }
}
