public abstract class Representation extends Object implements FormatWrapper
| 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 |
|---|---|
String |
baseUrl
The base URL of the representation.
|
String |
contentId
Identifies the piece of content to which this
Representation belongs. |
Format |
format
The format of the representation.
|
long |
presentationTimeOffsetUs
The offset of the presentation timestamps in the media stream relative to media time.
|
long |
revisionId
Identifies the revision of the content.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCacheKey()
A cache key for the
Representation, in the format
contentId + "." + format.id + "." + revisionId. |
Format |
getFormat()
Returns the wrapped format.
|
abstract DashSegmentIndex |
getIndex()
Gets a segment index, if the representation is able to provide one directly.
|
abstract RangedUri |
getIndexUri()
Gets a
RangedUri defining the location of the representation's segment index. |
RangedUri |
getInitializationUri()
Gets a
RangedUri defining the location of the representation's initialization data. |
static Representation |
newInstance(String contentId,
long revisionId,
Format format,
String baseUrl,
SegmentBase segmentBase)
Constructs a new instance.
|
static Representation |
newInstance(String contentId,
long revisionId,
Format format,
String baseUrl,
SegmentBase segmentBase,
String customCacheKey)
Constructs a new instance.
|
public final String contentId
Representation belongs.
For example, all Representations belonging to a video should have the same
contentId, which should uniquely identify 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 Format format
public final long presentationTimeOffsetUs
public final String baseUrl
public static Representation newInstance(String contentId, long revisionId, Format format, 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 - A base URL.segmentBase - A segment base element for the representation.public static Representation newInstance(String contentId, long revisionId, Format format, String baseUrl, SegmentBase segmentBase, 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.customCacheKey - A custom value to be returned from getCacheKey(), or null.public Format getFormat()
FormatWrappergetFormat in interface FormatWrapperpublic RangedUri getInitializationUri()
RangedUri defining the location of the representation's initialization data.
May be null if no initialization data exists.RangedUri defining the location of the initialization data, or null.public abstract RangedUri getIndexUri()
RangedUri defining the location of the representation's segment index. Null if
the representation provides an index directly.public abstract DashSegmentIndex getIndex()
public String getCacheKey()
Representation, in the format
contentId + "." + format.id + "." + revisionId.