class SsManifest.StreamElement


Represents a StreamIndex element.

Summary

Public constructors

StreamElement(
    baseUri: String!,
    chunkTemplate: String!,
    @C.TrackType type: Int,
    subType: String!,
    timescale: Long,
    name: String!,
    maxWidth: Int,
    maxHeight: Int,
    displayWidth: Int,
    displayHeight: Int,
    language: String?,
    formats: Array<Format!>!,
    chunkStartTimes: (Mutable)List<Long!>!,
    lastChunkDuration: Long
)

Public functions

Uri!
buildRequestUri(track: Int, chunkIndex: Int)

Builds a uri for requesting the specified chunk of the specified track.

SsManifest.StreamElement!
copy(formats: Array<Format!>!)

Creates a copy of this stream element with the formats replaced with those specified.

Long
getChunkDurationUs(chunkIndex: Int)

Returns the duration of the specified chunk.

Int

Returns the index of the chunk that contains the specified time.

Long
getStartTimeUs(chunkIndex: Int)

Returns the start time of the specified chunk.

Public constructors

StreamElement

StreamElement(
    baseUri: String!,
    chunkTemplate: String!,
    @C.TrackType type: Int,
    subType: String!,
    timescale: Long,
    name: String!,
    maxWidth: Int,
    maxHeight: Int,
    displayWidth: Int,
    displayHeight: Int,
    language: String?,
    formats: Array<Format!>!,
    chunkStartTimes: (Mutable)List<Long!>!,
    lastChunkDuration: Long
)

Public functions

buildRequestUri

fun buildRequestUri(track: Int, chunkIndex: Int): Uri!

Builds a uri for requesting the specified chunk of the specified track.

Parameters
track: Int

The index of the track for which to build the URL.

chunkIndex: Int

The index of the chunk for which to build the URL.

Returns
Uri!

The request uri.

copy

fun copy(formats: Array<Format!>!): SsManifest.StreamElement!

Creates a copy of this stream element with the formats replaced with those specified.

Parameters
formats: Array<Format!>!

The formats to be included in the copy.

Returns
SsManifest.StreamElement!

A copy of this stream element with the formats replaced.

Throws
java.lang.IndexOutOfBoundsException

If a key has an invalid index.

getChunkDurationUs

fun getChunkDurationUs(chunkIndex: Int): Long

Returns the duration of the specified chunk.

Parameters
chunkIndex: Int

The index of the chunk.

Returns
Long

The duration of the chunk, in microseconds.

getChunkIndex

fun getChunkIndex(timeUs: Long): Int

Returns the index of the chunk that contains the specified time.

Parameters
timeUs: Long

The time in microseconds.

Returns
Int

The index of the corresponding chunk.

getStartTimeUs

fun getStartTimeUs(chunkIndex: Int): Long

Returns the start time of the specified chunk.

Parameters
chunkIndex: Int

The index of the chunk.

Returns
Long

The start time of the chunk, in microseconds.

Public properties

chunkCount

val chunkCountInt

displayHeight

val displayHeightInt

displayWidth

val displayWidthInt

formats

val formatsArray<Format!>!

language

val languageString?

maxHeight

val maxHeightInt

maxWidth

val maxWidthInt

name

val nameString!

subType

val subTypeString!

timescale

val timescaleLong

type

@C.TrackType
val typeInt