Representation.SingleSegmentRepresentation


public class Representation.SingleSegmentRepresentation extends Representation


A DASH representation consisting of a single segment.

Summary

Public fields

final @Nullable String
final long

The content length, or LENGTH_UNSET if unknown.

final @Nullable RangedUri
final Uri

The uri of the single segment.

Public constructors

SingleSegmentRepresentation(
    long revisionId,
    Format format,
    List<BaseUrl> baseUrls,
    SegmentBase.SingleSegmentBase segmentBase,
    @Nullable List<Descriptor> inbandEventStreams,
    List<Descriptor> essentialProperties,
    List<Descriptor> supplementalProperties,
    @Nullable String cacheKey,
    long contentLength
)

Public methods

@Nullable String

Returns a cache key for the representation if set, or null.

@Nullable DashSegmentIndex

Returns an index if the representation provides one directly, or null otherwise.

@Nullable RangedUri

Returns a RangedUri defining the location of the representation's segment index, or null if the representation provides an index directly.

static Representation.SingleSegmentRepresentation
newInstance(
    long revisionId,
    Format format,
    String uri,
    long initializationStart,
    long initializationEnd,
    long indexStart,
    long indexEnd,
    List<Descriptor> inbandEventStreams,
    @Nullable String cacheKey,
    long contentLength
)

Inherited Constants

From androidx.media3.exoplayer.dash.manifest.Representation
static final long

A default value for revisionId.

Inherited fields

From androidx.media3.exoplayer.dash.manifest.Representation
final ImmutableList<BaseUrl>

The base URLs of the representation.

final List<Descriptor>

Essential properties in the representation.

final Format

The format of the representation.

final List<Descriptor>

The in-band event streams in the representation.

final @Nullable RangedUri
final long

The offset of the presentation timestamps in the media stream relative to media time.

final long

Identifies the revision of the media contained within the representation.

final List<Descriptor>

Supplemental properties in the adaptation set.

Inherited methods

From androidx.media3.exoplayer.dash.manifest.Representation
@Nullable RangedUri

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

static Representation
newInstance(
    long revisionId,
    Format format,
    List<BaseUrl> baseUrls,
    SegmentBase segmentBase
)

Constructs a new instance.

static Representation
newInstance(
    long revisionId,
    Format format,
    List<BaseUrl> baseUrls,
    SegmentBase segmentBase,
    @Nullable List<Descriptor> inbandEventStreams,
    List<Descriptor> essentialProperties,
    List<Descriptor> supplementalProperties,
    @Nullable String cacheKey
)

Constructs a new instance.

Public fields

cacheKey

public final @Nullable String cacheKey

contentLength

public final long contentLength

The content length, or LENGTH_UNSET if unknown.

indexUri

public final @Nullable RangedUri indexUri

uri

public final Uri uri

The uri of the single segment.

Public constructors

SingleSegmentRepresentation

public SingleSegmentRepresentation(
    long revisionId,
    Format format,
    List<BaseUrl> baseUrls,
    SegmentBase.SingleSegmentBase segmentBase,
    @Nullable List<Descriptor> inbandEventStreams,
    List<Descriptor> essentialProperties,
    List<Descriptor> supplementalProperties,
    @Nullable String cacheKey,
    long contentLength
)
Parameters
long revisionId

Identifies the revision of the content.

Format format

The format of the representation.

List<BaseUrl> baseUrls

The base urls of the representation.

SegmentBase.SingleSegmentBase segmentBase

The segment base underlying the representation.

@Nullable List<Descriptor> inbandEventStreams

The in-band event streams in the representation. May be null.

List<Descriptor> essentialProperties

Essential properties in the representation. May be empty.

List<Descriptor> supplementalProperties

Supplemental properties in the representation. May be empty.

@Nullable String cacheKey

An optional key to be returned from getCacheKey, or null.

long contentLength

The content length, or LENGTH_UNSET if unknown.

Public methods

getCacheKey

public @Nullable String getCacheKey()

Returns a cache key for the representation if set, or null.

getIndex

public @Nullable DashSegmentIndex getIndex()

Returns an index if the representation provides one directly, or null otherwise.

getIndexUri

public @Nullable RangedUri getIndexUri()

Returns a RangedUri defining the location of the representation's segment index, or null if the representation provides an index directly.

newInstance

public static Representation.SingleSegmentRepresentation newInstance(
    long revisionId,
    Format format,
    String uri,
    long initializationStart,
    long initializationEnd,
    long indexStart,
    long indexEnd,
    List<Descriptor> inbandEventStreams,
    @Nullable String cacheKey,
    long contentLength
)
Parameters
long revisionId

Identifies the revision of the content.

Format format

The format of the representation.

String uri

The uri of the media.

long initializationStart

The offset of the first byte of initialization data.

long initializationEnd

The offset of the last byte of initialization data.

long indexStart

The offset of the first byte of index data.

long indexEnd

The offset of the last byte of index data.

List<Descriptor> inbandEventStreams

The in-band event streams in the representation. May be null.

@Nullable String cacheKey

An optional key to be returned from getCacheKey, or null.

long contentLength

The content length, or LENGTH_UNSET if unknown.