public abstract class Representation
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Representation.MultiSegmentRepresentation
A DASH representation consisting of multiple segments.
|
static class |
Representation.SingleSegmentRepresentation
A DASH representation consisting of a single segment.
|
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
baseUrl
The base URL of the representation.
|
java.lang.String |
contentId
Identifies the piece of content to which this
Representation belongs. |
com.google.android.exoplayer2.Format |
format
The format of the representation.
|
java.util.List<Descriptor> |
inbandEventStreams
The in-band event streams in the representation.
|
long |
presentationTimeOffsetUs
The offset of the presentation timestamps in the media stream relative to media time.
|
static long |
REVISION_ID_DEFAULT
A default value for
revisionId. |
long |
revisionId
Identifies the revision of the content.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
getCacheKey()
Returns a cache key for the representation if a custom cache key or content id has been
provided and there is only single segment.
|
abstract DashSegmentIndex |
getIndex()
Returns an index if the representation provides one directly, or null otherwise.
|
abstract RangedUri |
getIndexUri()
Returns a
RangedUri defining the location of the representation's segment index, or
null if the representation provides an index directly. |
RangedUri |
getInitializationUri()
Returns a
RangedUri defining the location of the representation's initialization data,
or null if no initialization data exists. |
static Representation |
newInstance(java.lang.String contentId,
long revisionId,
com.google.android.exoplayer2.Format format,
java.lang.String baseUrl,
SegmentBase segmentBase)
Constructs a new instance.
|
static Representation |
newInstance(java.lang.String contentId,
long revisionId,
com.google.android.exoplayer2.Format format,
java.lang.String baseUrl,
SegmentBase segmentBase,
java.util.List<Descriptor> inbandEventStreams)
Constructs a new instance.
|
static Representation |
newInstance(java.lang.String contentId,
long revisionId,
com.google.android.exoplayer2.Format format,
java.lang.String baseUrl,
SegmentBase segmentBase,
java.util.List<Descriptor> inbandEventStreams,
java.lang.String customCacheKey)
Constructs a new instance.
|
public static final long REVISION_ID_DEFAULT
revisionId.public final java.lang.String contentId
Representation belongs.
For example, all Representations belonging to a video should have the same content
identifier that uniquely identifies that video.
public final long revisionId
If the media for a given (contentId can change over time without a change to the
format's Format.id (e.g. as a result of re-encoding the media with an
updated encoder), then this identifier must uniquely identify the revision of the media. The
timestamp at which the media was encoded is often a suitable.
public final com.google.android.exoplayer2.Format format
public final java.lang.String baseUrl
public final long presentationTimeOffsetUs
public final java.util.List<Descriptor> inbandEventStreams
public static Representation newInstance(java.lang.String contentId, long revisionId, com.google.android.exoplayer2.Format format, java.lang.String baseUrl, SegmentBase segmentBase)
contentId - Identifies the piece of content to which this representation belongs.revisionId - Identifies the revision of the content.format - The format of the representation.baseUrl - The base URL.segmentBase - A segment base element for the representation.public static Representation newInstance(java.lang.String contentId, long revisionId, com.google.android.exoplayer2.Format format, java.lang.String baseUrl, SegmentBase segmentBase, java.util.List<Descriptor> inbandEventStreams)
contentId - Identifies the piece of content to which this representation belongs.revisionId - Identifies the revision of the content.format - The format of the representation.baseUrl - The base URL.segmentBase - A segment base element for the representation.inbandEventStreams - The in-band event streams in the representation. May be null.public static Representation newInstance(java.lang.String contentId, long revisionId, com.google.android.exoplayer2.Format format, java.lang.String baseUrl, SegmentBase segmentBase, java.util.List<Descriptor> inbandEventStreams, java.lang.String customCacheKey)
contentId - Identifies the piece of content to which this representation belongs.revisionId - Identifies the revision of the content.format - The format of the representation.baseUrl - The base URL of the representation.segmentBase - A segment base element for the representation.inbandEventStreams - The in-band event streams in the representation. May be null.customCacheKey - A custom value to be returned from getCacheKey(), or null. This
parameter is ignored if segmentBase consists of multiple segments.public RangedUri getInitializationUri()
RangedUri defining the location of the representation's initialization data,
or null if no initialization data exists.public abstract RangedUri getIndexUri()
RangedUri defining the location of the representation's segment index, or
null if the representation provides an index directly.public abstract DashSegmentIndex getIndex()
public abstract java.lang.String getCacheKey()