Class SegmentBase.SegmentTemplate
- java.lang.Object
-
- com.google.android.exoplayer2.source.dash.manifest.SegmentBase
-
- com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase
-
- com.google.android.exoplayer2.source.dash.manifest.SegmentBase.SegmentTemplate
-
- Enclosing class:
- SegmentBase
public static final class SegmentBase.SegmentTemplate extends SegmentBase.MultiSegmentBase
ASegmentBase.MultiSegmentBase
that uses a SegmentTemplate to define its segments.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.source.dash.manifest.SegmentBase
SegmentBase.MultiSegmentBase, SegmentBase.SegmentList, SegmentBase.SegmentTemplate, SegmentBase.SegmentTimelineElement, SegmentBase.SingleSegmentBase
-
-
Constructor Summary
Constructors Constructor Description SegmentTemplate(RangedUri initialization, long timescale, long presentationTimeOffset, long startNumber, long endNumber, long duration, List<SegmentBase.SegmentTimelineElement> segmentTimeline, long availabilityTimeOffsetUs, UrlTemplate initializationTemplate, UrlTemplate mediaTemplate, long timeShiftBufferDepthUs, long periodStartUnixTimeUs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangedUri
getInitialization(Representation representation)
Returns theRangedUri
defining the location of initialization data for a given representation, or null if no initialization data exists.long
getSegmentCount(long periodDurationUs)
RangedUri
getSegmentUrl(Representation representation, long sequenceNumber)
Returns aRangedUri
defining the location of a segment for the given index in the given representation.-
Methods inherited from class com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase
getAvailableSegmentCount, getFirstAvailableSegmentNum, getFirstSegmentNum, getNextSegmentAvailableTimeUs, getSegmentDurationUs, getSegmentNum, getSegmentTimeUs, isExplicit
-
Methods inherited from class com.google.android.exoplayer2.source.dash.manifest.SegmentBase
getPresentationTimeOffsetUs
-
-
-
-
Constructor Detail
-
SegmentTemplate
public SegmentTemplate(RangedUri initialization, long timescale, long presentationTimeOffset, long startNumber, long endNumber, long duration, @Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline, long availabilityTimeOffsetUs, @Nullable UrlTemplate initializationTemplate, @Nullable UrlTemplate mediaTemplate, long timeShiftBufferDepthUs, long periodStartUnixTimeUs)
- Parameters:
initialization
- ARangedUri
corresponding to initialization data, if such data exists. The value of this parameter is ignored ifinitializationTemplate
is non-null.timescale
- The timescale in units per second.presentationTimeOffset
- The presentation time offset. The value in seconds is the division of this value andtimescale
.startNumber
- The sequence number of the first segment.endNumber
- The sequence number of the last segment as specified by the SupplementalProperty with schemeIdUri="http://dashif.org/guidelines/last-segment-number", orC.INDEX_UNSET
.duration
- The duration of each segment in the case of fixed duration segments. The value in seconds is the division of this value andtimescale
. IfsegmentTimeline
is non-null then this parameter is ignored.segmentTimeline
- A segment timeline corresponding to the segments. If null, then segments are assumed to be of fixed duration as specified by theduration
parameter.availabilityTimeOffsetUs
- The offset to the current realtime at which segments become available in microseconds, orC.TIME_UNSET
if not applicable.initializationTemplate
- A template defining the location of initialization data, if such data exists. If non-null then theinitialization
parameter is ignored. If null theninitialization
will be used.mediaTemplate
- A template defining the location of each media segment.timeShiftBufferDepthUs
- The time shift buffer depth in microseconds.periodStartUnixTimeUs
- The start of the enclosing period in microseconds since the Unix epoch.
-
-
Method Detail
-
getInitialization
@Nullable public RangedUri getInitialization(Representation representation)
Description copied from class:SegmentBase
Returns theRangedUri
defining the location of initialization data for a given representation, or null if no initialization data exists.- Overrides:
getInitialization
in classSegmentBase
- Parameters:
representation
- TheRepresentation
for which initialization data is required.- Returns:
- A
RangedUri
defining the location of the initialization data, or null.
-
getSegmentUrl
public RangedUri getSegmentUrl(Representation representation, long sequenceNumber)
Description copied from class:SegmentBase.MultiSegmentBase
Returns aRangedUri
defining the location of a segment for the given index in the given representation.- Specified by:
getSegmentUrl
in classSegmentBase.MultiSegmentBase
-
getSegmentCount
public long getSegmentCount(long periodDurationUs)
Description copied from class:SegmentBase.MultiSegmentBase
- Specified by:
getSegmentCount
in classSegmentBase.MultiSegmentBase
-
-