docs/doc/reference/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifest.StreamElement.html
Package com.google.android.exoplayer2.source.smoothstreaming.manifest
Enclosing class:SsManifest
public static classSsManifest.StreamElementextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Represents a StreamIndex element.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | chunkCount | |
| int | displayHeight | |
| int | displayWidth | |
| Format[] | formats | |
| String | language | |
| int | maxHeight | |
| int | maxWidth | |
| String | name | |
| String | subType | |
| long | timescale | |
| @com.google.android.exoplayer2.C.TrackType int | type | |
Constructors | Constructor | Description |
| --- | --- |
| StreamElement(String baseUri, String chunkTemplate, @com.google.android.exoplayer2.C.TrackType int type, String subType, long timescale, String name, int maxWidth, int maxHeight, int displayWidth, int displayHeight, String language, Format[] formats, List<Long> chunkStartTimes, long lastChunkDuration) | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Uri | buildRequestUri(int track, int chunkIndex) |
Builds a uri for requesting the specified chunk of the specified track.
|
| SsManifest.StreamElement | copy(Format[] formats) |
Creates a copy of this stream element with the formats replaced with those specified.
|
| long | getChunkDurationUs(int chunkIndex) |
Returns the duration of the specified chunk.
|
| int | getChunkIndex(long timeUs) |
Returns the index of the chunk that contains the specified time.
|
| long | getStartTimeUs(int chunkIndex) |
Returns the start time of the specified chunk.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public final @com.google.android.exoplayer2.C.TrackType int type
-
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")subType
-
public final long timescale
-
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name
-
public final int maxWidth
-
public final int maxHeight
-
public final int displayWidth
-
public final int displayHeight
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")language
-
public final[Format](../../../Format.html "class in com.google.android.exoplayer2")[] formats
-
public final int chunkCount
-
public StreamElement([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")baseUri,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")chunkTemplate,
@com.google.android.exoplayer2.C.TrackType int type,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")subType,
long timescale,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,
int maxWidth,
int maxHeight,
int displayWidth,
int displayHeight,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")language,[Format](../../../Format.html "class in com.google.android.exoplayer2")[] formats,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Long](https://developer.android.com/reference/java/lang/Long.html?is-external=true "class or interface in java.lang")> chunkStartTimes,
long lastChunkDuration)
-
public[SsManifest.StreamElement](SsManifest.StreamElement.html "class in com.google.android.exoplayer2.source.smoothstreaming.manifest")copy([Format](../../../Format.html "class in com.google.android.exoplayer2")[] formats)
Creates a copy of this stream element with the formats replaced with those specified.
Parameters:formats - The formats to be included in the copy.Returns:A copy of this stream element with the formats replaced.Throws:IndexOutOfBoundsException - If a key has an invalid index.
-
public int getChunkIndex(long timeUs)
Returns the index of the chunk that contains the specified time.
Parameters:timeUs - The time in microseconds.Returns:The index of the corresponding chunk.
-
public long getStartTimeUs(int chunkIndex)
Returns the start time of the specified chunk.
Parameters:chunkIndex - The index of the chunk.Returns:The start time of the chunk, in microseconds.
-
public long getChunkDurationUs(int chunkIndex)
Returns the duration of the specified chunk.
Parameters:chunkIndex - The index of the chunk.Returns:The duration of the chunk, in microseconds.
-
public[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")buildRequestUri(int track,
int chunkIndex)
Builds a uri for requesting the specified chunk of the specified track.
Parameters:track - The index of the track for which to build the URL.chunkIndex - The index of the chunk for which to build the URL.Returns:The request uri.