Class Period
- java.lang.Object
-
- com.google.android.exoplayer2.source.dash.manifest.Period
-
public class Period extends Object
Encapsulates media content components over a contiguous period of time.
-
-
Field Summary
Fields Modifier and Type Field Description List<AdaptationSet>
adaptationSets
The adaptation sets belonging to the period.Descriptor
assetIdentifier
The asset identifier for this period, if one existsList<EventStream>
eventStreams
The event stream belonging to the period.String
id
The period identifier, if one exists.long
startMs
The start time of the period in milliseconds, relative to the start of the manifest.
-
Constructor Summary
Constructors Constructor Description Period(String id, long startMs, List<AdaptationSet> adaptationSets)
Period(String id, long startMs, List<AdaptationSet> adaptationSets, List<EventStream> eventStreams)
Period(String id, long startMs, List<AdaptationSet> adaptationSets, List<EventStream> eventStreams, Descriptor assetIdentifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAdaptationSetIndex(int type)
Returns the index of the first adaptation set of a given type, orC.INDEX_UNSET
if no adaptation set of the specified type exists.
-
-
-
Field Detail
-
id
@Nullable public final String id
The period identifier, if one exists.
-
startMs
public final long startMs
The start time of the period in milliseconds, relative to the start of the manifest.
-
adaptationSets
public final List<AdaptationSet> adaptationSets
The adaptation sets belonging to the period.
-
eventStreams
public final List<EventStream> eventStreams
The event stream belonging to the period.
-
assetIdentifier
@Nullable public final Descriptor assetIdentifier
The asset identifier for this period, if one exists
-
-
Constructor Detail
-
Period
public Period(@Nullable String id, long startMs, List<AdaptationSet> adaptationSets)
- Parameters:
id
- The period identifier. May be null.startMs
- The start time of the period in milliseconds.adaptationSets
- The adaptation sets belonging to the period.
-
Period
public Period(@Nullable String id, long startMs, List<AdaptationSet> adaptationSets, List<EventStream> eventStreams)
- Parameters:
id
- The period identifier. May be null.startMs
- The start time of the period in milliseconds.adaptationSets
- The adaptation sets belonging to the period.eventStreams
- TheEventStream
s belonging to the period.
-
Period
public Period(@Nullable String id, long startMs, List<AdaptationSet> adaptationSets, List<EventStream> eventStreams, @Nullable Descriptor assetIdentifier)
- Parameters:
id
- The period identifier. May be null.startMs
- The start time of the period in milliseconds.adaptationSets
- The adaptation sets belonging to the period.eventStreams
- TheEventStream
s belonging to the period.assetIdentifier
- The asset identifier for this period
-
-
Method Detail
-
getAdaptationSetIndex
public int getAdaptationSetIndex(int type)
Returns the index of the first adaptation set of a given type, orC.INDEX_UNSET
if no adaptation set of the specified type exists.- Parameters:
type
- An adaptation set type.- Returns:
- The index of the first adaptation set of the specified type, or
C.INDEX_UNSET
.
-
-