public abstract class Representation extends 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 |
---|---|
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.
|
static long |
REVISION_ID_DEFAULT
A default value for
revisionId . |
long |
revisionId
Identifies the revision of the content.
|
Modifier and Type | Method and Description |
---|---|
String |
getCacheKey()
Returns a cache key for the representation, in the format
contentId + "." + format.id + "." + revisionId . |
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(String contentId,
long revisionId,
Format format,
SegmentBase segmentBase)
Constructs a new instance.
|
static Representation |
newInstance(String contentId,
long revisionId,
Format format,
SegmentBase segmentBase,
String customCacheKey)
Constructs a new instance.
|
public static final long REVISION_ID_DEFAULT
revisionId
.public final String contentId
Representation
belongs.
For example, all Representation
s 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 Format format
public final long presentationTimeOffsetUs
public static Representation newInstance(String contentId, long revisionId, Format format, 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.segmentBase
- A segment base element for the representation.public static Representation newInstance(String contentId, long revisionId, Format format, 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.segmentBase
- A segment base element for the representation.customCacheKey
- A custom value to be returned from getCacheKey()
, or null.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 String getCacheKey()
contentId + "." + format.id + "." + revisionId
.