Class SegmentBase.MultiSegmentBase
- java.lang.Object
-
- com.google.android.exoplayer2.source.dash.manifest.SegmentBase
-
- com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase
-
- Direct Known Subclasses:
SegmentBase.SegmentList,SegmentBase.SegmentTemplate
- Enclosing class:
- SegmentBase
public abstract static class SegmentBase.MultiSegmentBase extends SegmentBase
ASegmentBasethat consists of multiple 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 MultiSegmentBase(RangedUri initialization, long timescale, long presentationTimeOffset, long startNumber, long duration, List<SegmentBase.SegmentTimelineElement> segmentTimeline, long availabilityTimeOffsetUs, long timeShiftBufferDepthUs, long periodStartUnixTimeUs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description longgetAvailableSegmentCount(long periodDurationUs, long nowUnixTimeUs)longgetFirstAvailableSegmentNum(long periodDurationUs, long nowUnixTimeUs)longgetFirstSegmentNum()longgetNextSegmentAvailableTimeUs(long periodDurationUs, long nowUnixTimeUs)abstract longgetSegmentCount(long periodDurationUs)longgetSegmentDurationUs(long sequenceNumber, long periodDurationUs)longgetSegmentNum(long timeUs, long periodDurationUs)longgetSegmentTimeUs(long sequenceNumber)abstract RangedUrigetSegmentUrl(Representation representation, long index)Returns aRangedUridefining the location of a segment for the given index in the given representation.booleanisExplicit()-
Methods inherited from class com.google.android.exoplayer2.source.dash.manifest.SegmentBase
getInitialization, getPresentationTimeOffsetUs
-
-
-
-
Constructor Detail
-
MultiSegmentBase
public MultiSegmentBase(@Nullable RangedUri initialization, long timescale, long presentationTimeOffset, long startNumber, long duration, @Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline, long availabilityTimeOffsetUs, long timeShiftBufferDepthUs, long periodStartUnixTimeUs)- Parameters:
initialization- ARangedUricorresponding 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 andtimescale.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 andtimescale. IfsegmentTimelineis 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 thedurationparameter.availabilityTimeOffsetUs- The offset to the current realtime at which segments become available in microseconds, orC.TIME_UNSETif not applicable.timeShiftBufferDepthUs- The time shift buffer depth in microseconds.periodStartUnixTimeUs- The start of the enclosing period in microseconds since the Unix epoch.
-
-
Method Detail
-
getSegmentNum
public long getSegmentNum(long timeUs, long periodDurationUs)
-
getSegmentDurationUs
public final long getSegmentDurationUs(long sequenceNumber, long periodDurationUs)
-
getSegmentTimeUs
public final long getSegmentTimeUs(long sequenceNumber)
-
getSegmentUrl
public abstract RangedUri getSegmentUrl(Representation representation, long index)
Returns aRangedUridefining the location of a segment for the given index in the given representation.
-
getFirstSegmentNum
public long getFirstSegmentNum()
-
getFirstAvailableSegmentNum
public long getFirstAvailableSegmentNum(long periodDurationUs, long nowUnixTimeUs)
-
getAvailableSegmentCount
public long getAvailableSegmentCount(long periodDurationUs, long nowUnixTimeUs)
-
getNextSegmentAvailableTimeUs
public long getNextSegmentAvailableTimeUs(long periodDurationUs, long nowUnixTimeUs)
-
isExplicit
public boolean isExplicit()
-
getSegmentCount
public abstract long getSegmentCount(long periodDurationUs)
-
-