SegmentBase.MultiSegmentBase


abstract class SegmentBase.MultiSegmentBase : SegmentBase

Known direct subclasses
SegmentBase.SegmentList

A MultiSegmentBase that uses a SegmentList to define its segments.

SegmentBase.SegmentTemplate

A MultiSegmentBase that uses a SegmentTemplate to define its segments.


A SegmentBase that consists of multiple segments.

Summary

Public constructors

MultiSegmentBase(
    initialization: RangedUri?,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    duration: Long,
    segmentTimeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>?,
    availabilityTimeOffsetUs: Long,
    timeShiftBufferDepthUs: Long,
    periodStartUnixTimeUs: Long
)

Public functions

Long
getAvailableSegmentCount(periodDurationUs: Long, nowUnixTimeUs: Long)

See getAvailableSegmentCount.

Long
getFirstAvailableSegmentNum(periodDurationUs: Long, nowUnixTimeUs: Long)

See getFirstAvailableSegmentNum.

Long

See getFirstSegmentNum.

Long
getNextSegmentAvailableTimeUs(
    periodDurationUs: Long,
    nowUnixTimeUs: Long
)

See getNextSegmentAvailableTimeUs.

abstract Long
getSegmentCount(periodDurationUs: Long)

See getSegmentCount.

Long
getSegmentDurationUs(sequenceNumber: Long, periodDurationUs: Long)

See getDurationUs.

Long
getSegmentNum(timeUs: Long, periodDurationUs: Long)

See getSegmentNum.

Long
getSegmentTimeUs(sequenceNumber: Long)

See getTimeUs.

abstract RangedUri!
getSegmentUrl(representation: Representation!, index: Long)

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

Boolean

See isExplicit

Inherited functions

From androidx.media3.exoplayer.dash.manifest.SegmentBase
RangedUri?
getInitialization(
    @UnderInitialization(value = Representation) representation: @UnderInitialization(value = 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.

Public constructors

MultiSegmentBase

MultiSegmentBase(
    initialization: RangedUri?,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    duration: Long,
    segmentTimeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>?,
    availabilityTimeOffsetUs: Long,
    timeShiftBufferDepthUs: Long,
    periodStartUnixTimeUs: Long
)
Parameters
initialization: RangedUri?

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

timescale: Long

The timescale in units per second.

presentationTimeOffset: Long

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

startNumber: Long

The sequence number of the first segment.

duration: Long

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: (Mutable)List<SegmentBase.SegmentTimelineElement!>?

A segment timeline corresponding to the segments. If null, then segments are assumed to be of fixed duration as specified by the duration parameter.

availabilityTimeOffsetUs: Long

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

timeShiftBufferDepthUs: Long

The time shift buffer depth in microseconds.

periodStartUnixTimeUs: Long

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

Public functions

getAvailableSegmentCount

fun getAvailableSegmentCount(periodDurationUs: Long, nowUnixTimeUs: Long): Long

See getAvailableSegmentCount.

getFirstAvailableSegmentNum

fun getFirstAvailableSegmentNum(periodDurationUs: Long, nowUnixTimeUs: Long): Long

See getFirstAvailableSegmentNum.

getFirstSegmentNum

fun getFirstSegmentNum(): Long

See getFirstSegmentNum.

getNextSegmentAvailableTimeUs

fun getNextSegmentAvailableTimeUs(
    periodDurationUs: Long,
    nowUnixTimeUs: Long
): Long

See getNextSegmentAvailableTimeUs.

getSegmentCount

abstract fun getSegmentCount(periodDurationUs: Long): Long

See getSegmentCount.

getSegmentDurationUs

fun getSegmentDurationUs(sequenceNumber: Long, periodDurationUs: Long): Long

See getDurationUs.

getSegmentNum

fun getSegmentNum(timeUs: Long, periodDurationUs: Long): Long

See getSegmentNum.

getSegmentTimeUs

fun getSegmentTimeUs(sequenceNumber: Long): Long

See getTimeUs.

getSegmentUrl

abstract fun getSegmentUrl(representation: Representation!, index: Long): RangedUri!

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

See getSegmentUrl.

isExplicit

fun isExplicit(): Boolean

See isExplicit