@UnstableApi
public abstract class Representation

Known direct subclasses
Representation.MultiSegmentRepresentation

A DASH representation consisting of multiple segments.

Representation.SingleSegmentRepresentation

A DASH representation consisting of a single segment.


A DASH representation.

Summary

Nested types

A DASH representation consisting of multiple segments.

A DASH representation consisting of a single segment.

Constants

static final long

A default value for revisionId.

Public fields

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.

Public methods

abstract @Nullable String

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

abstract @Nullable DashSegmentIndex

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

abstract @Nullable RangedUri

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

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

Constants

REVISION_ID_DEFAULT

public static final long REVISION_ID_DEFAULT = -1

A default value for revisionId.

Public fields

baseUrls

public final ImmutableList<BaseUrlbaseUrls

The base URLs of the representation.

essentialProperties

public final List<DescriptoressentialProperties

Essential properties in the representation. May be empty.

format

public final Format format

The format of the representation.

inbandEventStreams

public final List<DescriptorinbandEventStreams

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

initializationUri

public final @Nullable RangedUri initializationUri

presentationTimeOffsetUs

public final long presentationTimeOffsetUs

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

revisionId

public final long revisionId

Identifies the revision of the media contained within the representation. If the media can change over time (e.g. as a result of it being re-encoded), then this identifier can be set to uniquely identify the revision of the media. The timestamp at which the media was encoded is often a suitable.

supplementalProperties

public final List<DescriptorsupplementalProperties

Supplemental properties in the adaptation set. May be empty.

Public methods

getCacheKey

public abstract @Nullable String getCacheKey()

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

getIndex

public abstract @Nullable DashSegmentIndex getIndex()

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

getIndexUri

public abstract @Nullable RangedUri getIndexUri()

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

getInitializationUri

public @Nullable RangedUri getInitializationUri()

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

newInstance

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

Constructs a new instance.

Parameters
long revisionId

Identifies the revision of the content.

Format format

The format of the representation.

List<BaseUrl> baseUrls

The list of base URLs of the representation.

SegmentBase segmentBase

A segment base element for the representation.

Returns
Representation

The constructed instance.

newInstance

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

Parameters
long revisionId

Identifies the revision of the content.

Format format

The format of the representation.

List<BaseUrl> baseUrls

The list of base URLs of the representation.

SegmentBase segmentBase

A segment base element for 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. This parameter is ignored if segmentBase consists of multiple segments.

Returns
Representation

The constructed instance.