package com.google.android.gms.internal.ads;

import android.os.Looper;
import android.os.SystemClock;
import androidx.annotation.Nullable;
import java.io.IOException;
import java.util.concurrent.Executors;

/* JADX INFO: loaded from: classes2.dex */
public final class z {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final h2.f f19023b = new h2.f(-9223372036854775807L, 2);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final h2.f f19024c = new h2.f(-9223372036854775807L, 3);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final e0 f19025a;

    @Nullable
    private x zzd;

    @Nullable
    private IOException zze;

    public z() {
        String str = bb1.f9474a;
        this.f19025a = new e0(Executors.newSingleThreadExecutor(new x10("ExoPlayer:Loader:ProgressiveMediaPeriod")));
    }

    public final boolean a() {
        return this.zze != null;
    }

    public final void b() {
        this.zze = null;
    }

    public final void c(sp2 sp2Var, v vVar, int i10) {
        Looper looperMyLooper = Looper.myLooper();
        looperMyLooper.getClass();
        this.zze = null;
        new x(this, looperMyLooper, sp2Var, vVar, SystemClock.elapsedRealtime()).b(0L);
    }

    public final boolean d() {
        return this.zzd != null;
    }

    public final void e() {
        x xVar = this.zzd;
        xVar.getClass();
        xVar.c(false);
    }

    public final void f(int i10) {
        IOException iOException = this.zze;
        if (iOException != null) {
            throw iOException;
        }
        x xVar = this.zzd;
        if (xVar != null) {
            xVar.a(i10);
        }
    }

    public final /* synthetic */ x g() {
        return this.zzd;
    }

    public final /* synthetic */ void h(x xVar) {
        this.zzd = xVar;
    }

    public final /* synthetic */ void i(IOException iOException) {
        this.zze = iOException;
    }

    public final void zzg(@Nullable y yVar) {
        x xVar = this.zzd;
        int i10 = 1;
        if (xVar != null) {
            xVar.c(true);
        }
        mv1 mv1Var = new mv1(yVar, i10);
        e0 e0Var = this.f19025a;
        e0Var.execute(mv1Var);
        e0Var.f10583b.mo2zza(e0Var.f10582a);
    }
}
