public abstract static class SegmentBase.MultiSegmentBase extends SegmentBase
SegmentBase
that consists of multiple segments.SegmentBase.MultiSegmentBase, SegmentBase.SegmentList, SegmentBase.SegmentTemplate, SegmentBase.SegmentTimelineElement, SegmentBase.SingleSegmentBase
Constructor and Description |
---|
MultiSegmentBase(RangedUri initialization,
long timescale,
long presentationTimeOffset,
int startNumber,
long duration,
List<SegmentBase.SegmentTimelineElement> segmentTimeline) |
Modifier and Type | Method and Description |
---|---|
int |
getFirstSegmentNum() |
abstract int |
getSegmentCount(long periodDurationUs) |
long |
getSegmentDurationUs(int sequenceNumber,
long periodDurationUs) |
int |
getSegmentNum(long timeUs,
long periodDurationUs) |
long |
getSegmentTimeUs(int sequenceNumber) |
abstract RangedUri |
getSegmentUrl(Representation representation,
int index)
Returns a
RangedUri defining the location of a segment for the given index in the
given representation. |
boolean |
isExplicit() |
getInitialization, getPresentationTimeOffsetUs
public MultiSegmentBase(RangedUri initialization, long timescale, long presentationTimeOffset, int startNumber, long duration, List<SegmentBase.SegmentTimelineElement> segmentTimeline)
initialization
- A RangedUri
corresponding to initialization data, if such data
exists.timescale
- The timescale in units per second.presentationTimeOffset
- The presentation time offset. The value in seconds is the
division of this value and timescale
.startNumber
- The sequence number of the first segment.duration
- The duration of each segment in the case of fixed duration segments. The
value in seconds is the division of this value and timescale
. If
segmentTimeline
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 the duration
parameter.public int getSegmentNum(long timeUs, long periodDurationUs)
public final long getSegmentDurationUs(int sequenceNumber, long periodDurationUs)
public final long getSegmentTimeUs(int sequenceNumber)
DashSegmentIndex.getTimeUs(int)
public abstract RangedUri getSegmentUrl(Representation representation, int index)
RangedUri
defining the location of a segment for the given index in the
given representation.DashSegmentIndex.getSegmentUrl(int)
public int getFirstSegmentNum()
DashSegmentIndex.getFirstSegmentNum()
public abstract int getSegmentCount(long periodDurationUs)
DashSegmentIndex.getSegmentCount(long)
public boolean isExplicit()
DashSegmentIndex.isExplicit()