package androidx.media3.exoplayer.dash.manifest;

import androidx.media3.common.util.UnstableApi;
import defpackage.rq6;
import java.util.Collections;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
@UnstableApi
public class Period {
    public final List<AdaptationSet> adaptationSets;

    @rq6
    public final Descriptor assetIdentifier;
    public final List<EventStream> eventStreams;

    @rq6
    public final String id;
    public final long startMs;

    public Period(@rq6 String str, long j, List<AdaptationSet> list) {
        this(str, j, list, Collections.EMPTY_LIST, null);
    }

    public int getAdaptationSetIndex(int i) {
        int size = this.adaptationSets.size();
        for (int i2 = 0; i2 < size; i2++) {
            if (this.adaptationSets.get(i2).type == i) {
                return i2;
            }
        }
        return -1;
    }

    public Period(@rq6 String str, long j, List<AdaptationSet> list, List<EventStream> list2) {
        this(str, j, list, list2, null);
    }

    public Period(@rq6 String str, long j, List<AdaptationSet> list, List<EventStream> list2, @rq6 Descriptor descriptor) {
        this.id = str;
        this.startMs = j;
        this.adaptationSets = Collections.unmodifiableList(list);
        this.eventStreams = Collections.unmodifiableList(list2);
        this.assetIdentifier = descriptor;
    }
}
