package H;

import android.net.Uri;
import b0.AbstractC0399d;
import b0.C;
import b0.D;
import java.util.List;
import java.util.UUID;
import p.j;
import p.l;

/* JADX INFO: loaded from: classes.dex */
public class c {

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

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

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

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

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final b[] f863f;

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

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

    public static class a {

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

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final byte[] f867b;

        public a(UUID uuid, byte[] bArr) {
            this.f866a = uuid;
            this.f867b = bArr;
        }
    }

    public static class b {

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

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

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

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

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

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

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

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

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

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

        /* JADX INFO: renamed from: k, reason: collision with root package name */
        public final C0009c[] f878k;

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

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        private final String f880m;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        private final String f881n;

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        private final List f882o;

        /* JADX INFO: renamed from: p, reason: collision with root package name */
        private final long[] f883p;

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        private final long f884q;

        public b(String str, String str2, int i2, String str3, long j2, String str4, int i3, int i4, int i5, int i6, int i7, String str5, C0009c[] c0009cArr, List list, long j3) {
            this.f880m = str;
            this.f881n = str2;
            this.f868a = i2;
            this.f869b = str3;
            this.f870c = j2;
            this.f871d = str4;
            this.f872e = i3;
            this.f873f = i4;
            this.f874g = i5;
            this.f875h = i6;
            this.f876i = i7;
            this.f877j = str5;
            this.f878k = c0009cArr;
            this.f879l = list.size();
            this.f882o = list;
            this.f884q = D.I(j3, 1000000L, j2);
            this.f883p = D.J(list, 1000000L, j2);
        }

        public Uri a(int i2, int i3) {
            AbstractC0399d.e(this.f878k != null);
            AbstractC0399d.e(this.f882o != null);
            AbstractC0399d.e(i3 < this.f882o.size());
            String string = Integer.toString(this.f878k[i2].f885a.f6167c);
            String string2 = ((Long) this.f882o.get(i3)).toString();
            return C.d(this.f880m, this.f881n.replace("{bitrate}", string).replace("{Bitrate}", string).replace("{start time}", string2).replace("{start_time}", string2));
        }

        public long b(int i2) {
            if (i2 == this.f879l - 1) {
                return this.f884q;
            }
            long[] jArr = this.f883p;
            return jArr[i2 + 1] - jArr[i2];
        }

        public int c(long j2) {
            return D.d(this.f883p, j2, true, true);
        }

        public long d(int i2) {
            return this.f883p[i2];
        }
    }

    /* JADX INFO: renamed from: H.c$c, reason: collision with other inner class name */
    public static class C0009c implements l {

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

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final byte[][] f886b;

        public C0009c(int i2, int i3, String str, byte[][] bArr, int i4, int i5, int i6, int i7, String str2) {
            this.f886b = bArr;
            this.f885a = new j(String.valueOf(i2), str, i4, i5, -1.0f, i7, i6, i3, str2);
        }

        @Override // p.l
        public j h() {
            return this.f885a;
        }
    }

    public c(int i2, int i3, long j2, long j3, long j4, int i4, boolean z2, a aVar, b[] bVarArr) {
        this.f858a = i2;
        this.f859b = i3;
        this.f860c = i4;
        this.f861d = z2;
        this.f862e = aVar;
        this.f863f = bVarArr;
        this.f865h = j4 == 0 ? -1L : D.I(j4, 1000000L, j2);
        this.f864g = j3 != 0 ? D.I(j3, 1000000L, j2) : -1L;
    }
}
