public class

Representation.SingleSegmentRepresentation

extends Representation

 java.lang.Object

androidx.media3.exoplayer.dash.manifest.Representation

↳androidx.media3.exoplayer.dash.manifest.Representation.SingleSegmentRepresentation

Overview

A DASH representation consisting of a single segment.

Summary

Fields
public final longcontentLength

The content length, or C.LENGTH_UNSET if unknown.

public final Uriuri

The uri of the single segment.

from RepresentationbaseUrls, essentialProperties, format, inbandEventStreams, presentationTimeOffsetUs, REVISION_ID_DEFAULT, revisionId, supplementalProperties
Constructors
publicSingleSegmentRepresentation(long revisionId, Format format, java.util.List<BaseUrl> baseUrls, SegmentBase.SingleSegmentBase segmentBase, java.util.List<Descriptor> inbandEventStreams, java.util.List<Descriptor> essentialProperties, java.util.List<Descriptor> supplementalProperties, java.lang.String cacheKey, long contentLength)

Methods
public abstract java.lang.StringgetCacheKey()

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

public abstract DashSegmentIndexgetIndex()

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

public abstract RangedUrigetIndexUri()

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

public static Representation.SingleSegmentRepresentationnewInstance(long revisionId, Format format, java.lang.String uri, long initializationStart, long initializationEnd, long indexStart, long indexEnd, java.util.List<Descriptor> inbandEventStreams, java.lang.String cacheKey, long contentLength)

from RepresentationgetInitializationUri, newInstance, newInstance
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final Uri uri

The uri of the single segment.

public final long contentLength

The content length, or C.LENGTH_UNSET if unknown.

Constructors

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

Parameters:

revisionId: Identifies the revision of the content.
format: The format of the representation.
baseUrls: The base urls of the representation.
segmentBase: The segment base underlying the representation.
inbandEventStreams: The in-band event streams in the representation. May be null.
essentialProperties: Essential properties in the representation. May be empty.
supplementalProperties: Supplemental properties in the representation. May be empty.
cacheKey: An optional key to be returned from Representation.SingleSegmentRepresentation.getCacheKey(), or null.
contentLength: The content length, or C.LENGTH_UNSET if unknown.

Methods

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

Parameters:

revisionId: Identifies the revision of the content.
format: The format of the representation.
uri: The uri of the media.
initializationStart: The offset of the first byte of initialization data.
initializationEnd: The offset of the last byte of initialization data.
indexStart: The offset of the first byte of index data.
indexEnd: The offset of the last byte of index data.
inbandEventStreams: The in-band event streams in the representation. May be null.
cacheKey: An optional key to be returned from Representation.SingleSegmentRepresentation.getCacheKey(), or null.
contentLength: The content length, or C.LENGTH_UNSET if unknown.

public abstract RangedUri getIndexUri()

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

public abstract DashSegmentIndex getIndex()

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

public abstract java.lang.String getCacheKey()

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