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

import androidx.annotation.Nullable;
import androidx.media3.exoplayer.rtsp.SessionDescription;
import java.math.BigInteger;
import java.util.HashSet;
import java.util.Set;

/* JADX INFO: loaded from: classes2.dex */
public final class v20 implements rj {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final p7.n0 f17480b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final u20 f17481c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final t20 f17482d;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Object f17479a = new Object();

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final HashSet f17483e = new HashSet();

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final HashSet f17484f = new HashSet();

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public boolean f17485g = false;

    public v20(String str, p7.o0 o0Var) {
        this.f17482d = new t20(str, o0Var);
        this.f17480b = o0Var;
        u20 u20Var = new u20();
        u20Var.f17065a = BigInteger.ONE;
        u20Var.f17066b = SessionDescription.SUPPORTED_SDP_VERSION;
        this.f17481c = u20Var;
    }

    @Override // com.google.android.gms.internal.ads.rj
    public final void G(boolean z10) {
        long j10;
        int i10;
        m7.n.C.f30472k.getClass();
        long jCurrentTimeMillis = System.currentTimeMillis();
        p7.n0 n0Var = this.f17480b;
        t20 t20Var = this.f17482d;
        if (!z10) {
            p7.o0 o0Var = (p7.o0) n0Var;
            o0Var.u(jCurrentTimeMillis);
            o0Var.v(t20Var.f16678d);
            return;
        }
        p7.o0 o0Var2 = (p7.o0) n0Var;
        o0Var2.k();
        synchronized (o0Var2.f31726a) {
            j10 = o0Var2.f31735j;
        }
        if (jCurrentTimeMillis - j10 > ((Long) n7.y.f31093e.f31096c.b(ao.f9062s1)).longValue()) {
            t20Var.f16678d = -1;
        } else {
            o0Var2.k();
            synchronized (o0Var2.f31726a) {
                i10 = o0Var2.f31737l;
            }
            t20Var.f16678d = i10;
        }
        this.f17485g = true;
    }

    public final void a(o20 o20Var) {
        synchronized (this.f17479a) {
            this.f17483e.add(o20Var);
        }
    }

    public final s20 zzn(Set set, @Nullable String str) {
        return this.f17482d.zzi(set, str);
    }
}
