package defpackage;

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

/* renamed from: ˎᵙᵸ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1747 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public long f6963;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public boolean f6964;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public long f6965;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f6966;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final /* synthetic */ C3423 f6967;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final int f6968;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public Object f6969;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public long f6970;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f6971;

    public C1747(C3423 c3423, int i) {
        this.f6967 = c3423;
        this.f6968 = i;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m4964() {
        long jM8621;
        if (((C3916) this.f6967.f12727).m8640() != 2 || !((C3916) this.f6967.f12727).m8629() || ((C3916) this.f6967.f12727).m8624() != 0) {
            if (this.f6964) {
                ((C5073) this.f6967.f12726).m10535(1);
            }
            this.f6964 = false;
            return;
        }
        AbstractC0488 abstractC0488M8641 = ((C3916) this.f6967.f12727).m8641();
        Object objMo2116 = abstractC0488M8641.m2115() ? null : abstractC0488M8641.mo2116(((C3916) this.f6967.f12727).m8652());
        int iM8653 = ((C3916) this.f6967.f12727).m8653();
        int iM8628 = ((C3916) this.f6967.f12727).m8628();
        C3916 c3916 = (C3916) this.f6967.f12727;
        c3916.m8604();
        if (c3916.m8632()) {
            C4659 c4659 = c3916.f14769;
            jM8621 = c4659.f17259.equals(c4659.f17256) ? AbstractC3558.m8161(c3916.f14769.f17250) : c3916.m8651();
        } else {
            jM8621 = c3916.m8621();
        }
        long jMax = Math.max(0L, jM8621 - ((C3916) this.f6967.f12727).m8615());
        C3916 c39162 = (C3916) this.f6967.f12727;
        c39162.m8604();
        long jMax2 = Math.max(0L, AbstractC3558.m8161(c39162.f14769.f17258) - jMax);
        if (objMo2116 != null && iM8653 == -1) {
            jM8621 -= AbstractC3558.m8161(abstractC0488M8641.mo2117(objMo2116, (C4479) this.f6967.f12724).f16705);
        }
        ((C1875) this.f6967.f12730).getClass();
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        if (this.f6964 && Objects.equals(objMo2116, this.f6969) && iM8653 == this.f6966 && iM8628 == this.f6971 && jM8621 == this.f6963 && jMax2 == this.f6965) {
            long j = jElapsedRealtime - this.f6970;
            int i = this.f6968;
            if (j >= i) {
                ((SurfaceHolderCallbackC4282) this.f6967.f12729).f16066.m8605(new ExoPlaybackException(2, new StuckPlayerException(1, i), 1003));
                return;
            }
            return;
        }
        this.f6964 = true;
        this.f6970 = jElapsedRealtime;
        this.f6969 = objMo2116;
        this.f6966 = iM8653;
        this.f6971 = iM8628;
        this.f6963 = jM8621;
        this.f6965 = jMax2;
        ((C5073) this.f6967.f12726).m10535(1);
        ((C5073) this.f6967.f12726).f18953.sendEmptyMessageDelayed(1, this.f6968);
    }
}
