package defpackage;

import android.content.Context;
import android.os.Build;
import android.view.Surface;

/* JADX INFO: renamed from: ᵻᵦᵼʧ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C5221 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final Context f19662;

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public long f19663;

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public long f19664;

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

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public long f19666;

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

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

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public long f19669;

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

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public long f19671;

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

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public long f19673;

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

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

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

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

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

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

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

    public C5221(Context context) {
        this.f19662 = context;
        C1625 c1625 = new C1625();
        c1625.f6498 = new C2029();
        c1625.f6495 = new C2029();
        c1625.f6499 = -9223372036854775807L;
        this.f19675 = c1625;
        this.f19680 = -1.0f;
        this.f19679 = 1.0f;
        this.f19674 = 0;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m10757() {
        this.f19668 = 0L;
        this.f19673 = -1L;
        this.f19666 = -1L;
        this.f19677 = 0L;
        this.f19672 = 0L;
    }

    /* JADX WARN: Removed duplicated region for block: B:34:0x0071  */
    /* JADX WARN: Removed duplicated region for block: B:45:? A[RETURN, SYNTHETIC] */
    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m10758() {
        float f;
        float f2;
        if (Build.VERSION.SDK_INT < 30 || this.f19670 == null) {
            return;
        }
        C1625 c1625 = this.f19675;
        if (!c1625.f6498.m5445()) {
            f = this.f19680;
        } else if (c1625.f6498.m5445()) {
            f = (float) (1.0E9d / (c1625.f6498.f8063 != 0 ? r2.f8067 / r4 : 0L));
        } else {
            f = -1.0f;
        }
        float f3 = this.f19676;
        if (f == f3) {
            return;
        }
        if (f == -1.0f || f3 == -1.0f) {
            if (f == -1.0f && c1625.f6497 < 30) {
                return;
            }
        } else if (c1625.f6498.m5445()) {
            if ((c1625.f6498.m5445() ? c1625.f6498.f8067 : -9223372036854775807L) >= 5000000000L) {
                f2 = 0.1f;
            }
            if (Math.abs(f - this.f19676) < f2) {
            }
        } else {
            f2 = 1.0f;
            if (Math.abs(f - this.f19676) < f2) {
                return;
            }
        }
        this.f19676 = f;
        m10760(false);
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m10759() {
        Surface surface;
        if (Build.VERSION.SDK_INT < 30 || (surface = this.f19670) == null || this.f19674 == Integer.MIN_VALUE || this.f19665 == 0.0f || !surface.isValid()) {
            return;
        }
        this.f19665 = 0.0f;
        AbstractC3311.m7582(this.f19670, 0.0f);
    }

    /* JADX WARN: Removed duplicated region for block: B:16:0x0027  */
    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m10760(boolean z) {
        Surface surface;
        float f;
        if (Build.VERSION.SDK_INT < 30 || (surface = this.f19670) == null || this.f19674 == Integer.MIN_VALUE || !surface.isValid()) {
            return;
        }
        if (this.f19678) {
            float f2 = this.f19676;
            f = f2 != -1.0f ? f2 * this.f19679 : 0.0f;
        }
        if (z || this.f19665 != f) {
            this.f19665 = f;
            AbstractC3311.m7582(this.f19670, f);
        }
    }
}
