@UnstableApi
class StreamKey : Comparable, Parcelable, Bundleable


A key for a subset of media that can be separately loaded (a "stream").

The stream key consists of a period index, a group index within the period and a stream index within the group. The interpretation of these indices depends on the type of media for which the stream key is used. Note that they are not the same as track group and track indices, because multiple tracks can be multiplexed into a single stream.

Application code should not generally attempt to build StreamKey instances directly. Instead, DownloadHelper.getDownloadRequest can be used to generate download requests with the correct StreamKeys for the track selections that have been configured on the helper. MediaPeriod.getStreamKeys provides a lower level way of generating StreamKeys corresponding to a particular track selection.

Summary

Constants

const Parcelable.Creator<StreamKey!>!

Public constructors

StreamKey(groupIndex: Int, streamIndex: Int)

Creates an instance with periodIndex set to 0.

StreamKey(periodIndex: Int, groupIndex: Int, streamIndex: Int)

Creates an instance of StreamKey using 3 indices.

Public functions

Int
Int
Boolean
equals(o: Any?)
java-static StreamKey!
fromBundle(bundle: Bundle!)

Constructs an instance of StreamKey from a Bundle produced by toBundle.

Int
Bundle!

Returns a Bundle representing the information stored in this object.

String!
Unit
writeToParcel(dest: Parcel!, flags: Int)

Public properties

Int

The group index.

Int

The period index.

Int

The stream index.

Constants

CREATOR

const val CREATORParcelable.Creator<StreamKey!>!

Public constructors

StreamKey

StreamKey(groupIndex: Int, streamIndex: Int)

Creates an instance with periodIndex set to 0.

Parameters
groupIndex: Int

The group index.

streamIndex: Int

The stream index.

StreamKey

StreamKey(periodIndex: Int, groupIndex: Int, streamIndex: Int)

Creates an instance of StreamKey using 3 indices.

Parameters
periodIndex: Int

The period index.

groupIndex: Int

The group index.

streamIndex: Int

The stream index.

Public functions

compareTo

fun compareTo(o: StreamKey!): Int

describeContents

fun describeContents(): Int

equals

fun equals(o: Any?): Boolean

fromBundle

java-static fun fromBundle(bundle: Bundle!): StreamKey!

Constructs an instance of StreamKey from a Bundle produced by toBundle.

hashCode

fun hashCode(): Int

toBundle

fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

toString

fun toString(): String!

writeToParcel

fun writeToParcel(dest: Parcel!, flags: Int): Unit

Public properties

groupIndex

val groupIndexInt

The group index.

periodIndex

val periodIndexInt

The period index.

streamIndex

val streamIndexInt

The stream index.