Class Representation.SingleSegmentRepresentation
- java.lang.Object
-
- com.google.android.exoplayer2.source.dash.manifest.Representation
-
- com.google.android.exoplayer2.source.dash.manifest.Representation.SingleSegmentRepresentation
-
- Enclosing class:
- Representation
public static class Representation.SingleSegmentRepresentation extends Representation
A DASH representation consisting of a single segment.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.source.dash.manifest.Representation
Representation.MultiSegmentRepresentation, Representation.SingleSegmentRepresentation
-
-
Field Summary
Fields Modifier and Type Field Description long
contentLength
The content length, orC.LENGTH_UNSET
if unknown.Uri
uri
The uri of the single segment.-
Fields inherited from class com.google.android.exoplayer2.source.dash.manifest.Representation
baseUrls, essentialProperties, format, inbandEventStreams, presentationTimeOffsetUs, REVISION_ID_DEFAULT, revisionId, supplementalProperties
-
-
Constructor Summary
Constructors Constructor Description SingleSegmentRepresentation(long revisionId, Format format, List<BaseUrl> baseUrls, SegmentBase.SingleSegmentBase segmentBase, List<Descriptor> inbandEventStreams, List<Descriptor> essentialProperties, List<Descriptor> supplementalProperties, String cacheKey, long contentLength)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCacheKey()
Returns a cache key for the representation if set, or null.DashSegmentIndex
getIndex()
Returns an index if the representation provides one directly, or null otherwise.RangedUri
getIndexUri()
Returns aRangedUri
defining the location of the representation's segment index, or null if the representation provides an index directly.static Representation.SingleSegmentRepresentation
newInstance(long revisionId, Format format, String uri, long initializationStart, long initializationEnd, long indexStart, long indexEnd, List<Descriptor> inbandEventStreams, String cacheKey, long contentLength)
-
Methods inherited from class com.google.android.exoplayer2.source.dash.manifest.Representation
getInitializationUri, newInstance, newInstance
-
-
-
-
Field Detail
-
uri
public final Uri uri
The uri of the single segment.
-
contentLength
public final long contentLength
The content length, orC.LENGTH_UNSET
if unknown.
-
-
Constructor Detail
-
SingleSegmentRepresentation
public SingleSegmentRepresentation(long revisionId, Format format, List<BaseUrl> baseUrls, SegmentBase.SingleSegmentBase segmentBase, @Nullable List<Descriptor> inbandEventStreams, List<Descriptor> essentialProperties, List<Descriptor> supplementalProperties, @Nullable 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 fromgetCacheKey()
, or null.contentLength
- The content length, orC.LENGTH_UNSET
if unknown.
-
-
Method Detail
-
newInstance
public static Representation.SingleSegmentRepresentation newInstance(long revisionId, Format format, String uri, long initializationStart, long initializationEnd, long indexStart, long indexEnd, List<Descriptor> inbandEventStreams, @Nullable 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 fromgetCacheKey()
, or null.contentLength
- The content length, orC.LENGTH_UNSET
if unknown.
-
getIndexUri
@Nullable public RangedUri getIndexUri()
Description copied from class:Representation
Returns aRangedUri
defining the location of the representation's segment index, or null if the representation provides an index directly.- Specified by:
getIndexUri
in classRepresentation
-
getIndex
@Nullable public DashSegmentIndex getIndex()
Description copied from class:Representation
Returns an index if the representation provides one directly, or null otherwise.- Specified by:
getIndex
in classRepresentation
-
getCacheKey
@Nullable public String getCacheKey()
Description copied from class:Representation
Returns a cache key for the representation if set, or null.- Specified by:
getCacheKey
in classRepresentation
-
-