@UnstableApi
public abstract class SegmentBase

Known direct subclasses
SegmentBase.MultiSegmentBase

A SegmentBase that consists of multiple segments.

SegmentBase.SingleSegmentBase

A SegmentBase that defines a single segment.

Known indirect 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.


An approximate representation of a SegmentBase manifest element.

Summary

Nested types

public abstract class SegmentBase.MultiSegmentBase extends SegmentBase

A SegmentBase that consists of multiple segments.

A MultiSegmentBase that uses a SegmentList to define its segments.

A MultiSegmentBase that uses a SegmentTemplate to define its segments.

Represents a timeline segment from the MPD's SegmentTimeline list.

A SegmentBase that defines a single segment.

Public constructors

SegmentBase(
    @Nullable RangedUri initialization,
    long timescale,
    long presentationTimeOffset
)

Public methods

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

Public constructors

SegmentBase

public SegmentBase(
    @Nullable RangedUri initialization,
    long timescale,
    long presentationTimeOffset
)
Parameters
@Nullable 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.

Public methods

getInitialization

public @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.

Parameters
@UnderInitialization(value = Representation) @UnderInitialization(value = Representation) Representation representation

The Representation for which initialization data is required.

Returns
@Nullable RangedUri

A RangedUri defining the location of the initialization data, or null.

getPresentationTimeOffsetUs

public long getPresentationTimeOffsetUs()

Returns the presentation time offset, in microseconds.