Back to Exoplayer

SsManifest.StreamElement (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifest.StreamElement.html

latest6.7 KB
Original Source

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

Class SsManifest.StreamElement

  • java.lang.Object

    • com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.StreamElement
  • 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.

Field Summary

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 | |

Constructor Summary

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) | |

Method Summary

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. |

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

type

public final @com.google.android.exoplayer2.C.TrackType int type
- 

subType

public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")subType
- 

timescale

public final long timescale
- 

name

public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name
- 

maxWidth

public final int maxWidth
- 

maxHeight

public final int maxHeight
- 

displayWidth

public final int displayWidth
- 

displayHeight

public final int displayHeight
- 

language

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

formats

public final[Format](../../../Format.html "class in com.google.android.exoplayer2")[] formats
- 

chunkCount

public final int chunkCount

Constructor Detail

- 

StreamElement

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)

Method Detail

- 

copy

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.

- 

getChunkIndex

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.

- 

getStartTimeUs

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.

- 

getChunkDurationUs

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.

- 

buildRequestUri

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.