Back to Exoplayer

Representation.SingleSegmentRepresentation (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/dash/manifest/Representation.SingleSegmentRepresentation.html

latest9.3 KB
Original Source

Package com.google.android.exoplayer2.source.dash.manifest

Class Representation.SingleSegmentRepresentation


public static classRepresentation.SingleSegmentRepresentationextends[Representation](Representation.html "class in com.google.android.exoplayer2.source.dash.manifest")

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, or C.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 a RangedUri 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

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

uri

public final[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri

The uri of the single segment.

- 

contentLength

public final long contentLength

The content length, or C.LENGTH_UNSET if unknown.

Constructor Detail

- 

SingleSegmentRepresentation

public SingleSegmentRepresentation​(long revisionId,[Format](../../../Format.html "class in com.google.android.exoplayer2")format,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[BaseUrl](BaseUrl.html "class in com.google.android.exoplayer2.source.dash.manifest")> baseUrls,[SegmentBase.SingleSegmentBase](SegmentBase.SingleSegmentBase.html "class in com.google.android.exoplayer2.source.dash.manifest")segmentBase,
                                   @Nullable[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Descriptor](Descriptor.html "class in com.google.android.exoplayer2.source.dash.manifest")> inbandEventStreams,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Descriptor](Descriptor.html "class in com.google.android.exoplayer2.source.dash.manifest")> essentialProperties,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Descriptor](Descriptor.html "class in com.google.android.exoplayer2.source.dash.manifest")> supplementalProperties,
                                   @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")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 from getCacheKey(), or null.contentLength - The content length, or C.LENGTH_UNSET if unknown.

Method Detail

- 

newInstance

public static[Representation.SingleSegmentRepresentation](Representation.SingleSegmentRepresentation.html "class in com.google.android.exoplayer2.source.dash.manifest")newInstance​(long revisionId,[Format](../../../Format.html "class in com.google.android.exoplayer2")format,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")uri,
                                                                     long initializationStart,
                                                                     long initializationEnd,
                                                                     long indexStart,
                                                                     long indexEnd,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Descriptor](Descriptor.html "class in com.google.android.exoplayer2.source.dash.manifest")> inbandEventStreams,
                                                                     @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")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 from getCacheKey(), or null.contentLength - The content length, or C.LENGTH_UNSET if unknown.

- 

getIndexUri

@Nullable
public[RangedUri](RangedUri.html "class in com.google.android.exoplayer2.source.dash.manifest")getIndexUri()

Description copied from class: Representation

Returns a RangedUri defining the location of the representation's segment index, or null if the representation provides an index directly. Specified by:getIndexUri in class Representation

- 

getIndex

@Nullable
public[DashSegmentIndex](../DashSegmentIndex.html "interface in com.google.android.exoplayer2.source.dash")getIndex()

Description copied from class: Representation

Returns an index if the representation provides one directly, or null otherwise. Specified by:getIndex in class Representation

- 

getCacheKey

@Nullable
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getCacheKey()

Description copied from class: Representation

Returns a cache key for the representation if set, or null. Specified by:getCacheKey in class Representation