package D;

import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class f extends h {

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f354e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final List f355f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final boolean f356g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final long f357h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final long f358i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final long f359j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public long f360k;

    public static final class a implements Comparable {

        /* JADX INFO: renamed from: H, reason: collision with root package name */
        public final String f361H;

        /* JADX INFO: renamed from: I, reason: collision with root package name */
        public final String f362I;

        /* JADX INFO: renamed from: L, reason: collision with root package name */
        public final long f363L;

        /* JADX INFO: renamed from: M, reason: collision with root package name */
        public final long f364M;

        /* JADX INFO: renamed from: Q, reason: collision with root package name */
        public final int f365Q;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final String f366b;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        public final double f367g;

        /* JADX INFO: renamed from: r, reason: collision with root package name */
        public final int f368r;

        /* JADX INFO: renamed from: x, reason: collision with root package name */
        public final long f369x;

        /* JADX INFO: renamed from: y, reason: collision with root package name */
        public final boolean f370y;

        public a(String str, double d2, int i2, long j2, boolean z2, String str2, String str3, long j3, long j4, int i3) {
            this.f366b = str;
            this.f367g = d2;
            this.f368r = i2;
            this.f369x = j2;
            this.f370y = z2;
            this.f361H = str2;
            this.f362I = str3;
            this.f363L = j3;
            this.f364M = j4;
            this.f365Q = i3;
            b0.o.d("HlsSegment", "URL[" + str + "]\ndurationSecs[" + d2 + "]\ndiscontinuity[" + i2 + "]\nstartTimeUs[" + j2 + "]\nisEncrypted[" + z2 + "]\nencryptionKeyUri[" + str2 + "]\nencryptionIV[" + str3 + "]\nbyterangeOffset[" + j3 + "]\nbyterangeLength[" + j4 + "]\nmediaSequence[" + i3 + "]\n", 4);
        }

        @Override // java.lang.Comparable
        /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
        public int compareTo(Long l2) {
            if (this.f369x > l2.longValue()) {
                return 1;
            }
            return this.f369x < l2.longValue() ? -1 : 0;
        }
    }

    public f(String str, int i2, int i3, int i4, boolean z2, List list) {
        super(str, 1);
        this.f352c = i2;
        this.f353d = i3;
        this.f354e = i4;
        this.f356g = z2;
        this.f355f = list;
        if (list.isEmpty()) {
            this.f357h = 0L;
            this.f358i = 0L;
            this.f359j = 0L;
        } else {
            a aVar = (a) list.get(list.size() - 1);
            long j2 = aVar.f369x + ((long) (aVar.f367g * 1000000.0d));
            this.f357h = j2;
            this.f358i = ((a) list.get(0)).f369x;
            if (z2) {
                this.f359j = (list.size() > 3 ? (a) list.get(list.size() - 3) : (a) list.get(0)).f369x;
            } else {
                this.f359j = j2;
            }
        }
        b0.o.d("HlsMediaPlaylist", "seekable range(" + this.f358i + "," + this.f359j + ")", 4);
    }

    public f(String str, int i2, int i3, int i4, boolean z2, List list, long j2) {
        this(str, i2, i3, i4, z2, list);
        this.f360k = j2;
    }
}
