SegmentBase.SegmentList


public final class SegmentBase.SegmentList extends SegmentBase.MultiSegmentBase


A MultiSegmentBase that uses a SegmentList to define its segments.

Summary

Public constructors

SegmentList(
    RangedUri initialization,
    long timescale,
    long presentationTimeOffset,
    long startNumber,
    long duration,
    @Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline,
    long availabilityTimeOffsetUs,
    @Nullable List<RangedUri> mediaSegments,
    long timeShiftBufferDepthUs,
    long periodStartUnixTimeUs
)

Public methods

long
getSegmentCount(long periodDurationUs)

See getSegmentCount.

RangedUri
getSegmentUrl(Representation representation, long sequenceNumber)

Returns a RangedUri defining the location of a segment for the given index in the given representation.

boolean

See isExplicit

Inherited methods

From androidx.media3.exoplayer.dash.manifest.SegmentBase
@Nullable RangedUri
getInitialization(
    @UnderInitialization(value = Representation) @UnderInitialization(value = Representation) Representation representation
)

Returns the RangedUri defining the location of initialization data for a given representation, or null if no initialization data exists.

long

Returns the presentation time offset, in microseconds.

From androidx.media3.exoplayer.dash.manifest.SegmentBase.MultiSegmentBase
long
getAvailableSegmentCount(long periodDurationUs, long nowUnixTimeUs)

See getAvailableSegmentCount.

long
getFirstAvailableSegmentNum(long periodDurationUs, long nowUnixTimeUs)

See getFirstAvailableSegmentNum.

long

See getFirstSegmentNum.

long
getNextSegmentAvailableTimeUs(
    long periodDurationUs,
    long nowUnixTimeUs
)

See getNextSegmentAvailableTimeUs.

final long
getSegmentDurationUs(long sequenceNumber, long periodDurationUs)

See getDurationUs.

long
getSegmentNum(long timeUs, long periodDurationUs)

See getSegmentNum.

final long
getSegmentTimeUs(long sequenceNumber)

See getTimeUs.

Public constructors

SegmentList

public SegmentList(
    RangedUri initialization,
    long timescale,
    long presentationTimeOffset,
    long startNumber,
    long duration,
    @Nullable List<SegmentBase.SegmentTimelineElement> segmentTimeline,
    long availabilityTimeOffsetUs,
    @Nullable List<RangedUri> mediaSegments,
    long timeShiftBufferDepthUs,
    long periodStartUnixTimeUs
)
Parameters
RangedUri initialization

A RangedUri corresponding to initialization data, if such data exists.

long timescale

The timescale in units per second.

long presentationTimeOffset

The presentation time offset. The value in seconds is the division of this value and timescale.

long startNumber

The sequence number of the first segment.

long 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.

@Nullable List<SegmentBase.SegmentTimelineElement> 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.

long availabilityTimeOffsetUs

The offset to the current realtime at which segments become available in microseconds, or TIME_UNSET if not applicable.

@Nullable List<RangedUri> mediaSegments

A list of RangedUris indicating the locations of the segments.

long timeShiftBufferDepthUs

The time shift buffer depth in microseconds.

long periodStartUnixTimeUs

The start of the enclosing period in microseconds since the Unix epoch.

Public methods

getSegmentCount

public long getSegmentCount(long periodDurationUs)

See getSegmentCount.

getSegmentUrl

public RangedUri getSegmentUrl(Representation representation, long sequenceNumber)

Returns a RangedUri defining the location of a segment for the given index in the given representation.

See getSegmentUrl.

isExplicit

public boolean isExplicit()

See isExplicit