Representation
@UnstableApi
public abstract class Representation
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 |
|---|
public class Representation.MultiSegmentRepresentation extends Representation implements DashSegmentIndexA DASH representation consisting of multiple segments. |
public class Representation.SingleSegmentRepresentation extends RepresentationA DASH representation consisting of a single segment. |
Constants |
|
|---|---|
static final long |
REVISION_ID_DEFAULT = -1A default value for |
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 |
getIndex()Returns an index if the representation provides one directly, or null otherwise. |
abstract @Nullable RangedUri |
Returns a |
@Nullable RangedUri |
Returns a |
static Representation |
newInstance(Constructs a new instance. |
static Representation |
newInstance(Constructs a new instance. |
Constants
REVISION_ID_DEFAULT
public static final long REVISION_ID_DEFAULT = -1
A default value for revisionId.
Public fields
essentialProperties
public final List<Descriptor> essentialProperties
Essential properties in the representation. May be empty.
inbandEventStreams
public final List<Descriptor> inbandEventStreams
The in-band event streams in the representation. May be empty.
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<Descriptor> supplementalProperties
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 |
| Returns | |
|---|---|
Representation |
The constructed instance. |