Class StreamKey
- java.lang.Object
- 
- com.google.android.exoplayer2.offline.StreamKey
 
- 
- All Implemented Interfaces:
- Parcelable,- Bundleable,- Comparable<StreamKey>
 
 @Deprecated public final class StreamKey extends Object implements Comparable<StreamKey>, Parcelable, Bundleable Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.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.getDownloadRequestcan be used to generate download requests with the correct StreamKeys for the track selections that have been configured on the helper.MediaPeriod.getStreamKeysprovides a lower level way of generating StreamKeys corresponding to a particular track selection.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.BundleableBundleable.Creator<T extends Bundleable>
 - 
Nested classes/interfaces inherited from interface android.os.ParcelableParcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static Parcelable.Creator<StreamKey>CREATORDeprecated.intgroupIndexDeprecated.The group index.intperiodIndexDeprecated.The period index.intstreamIndexDeprecated.The stream index.- 
Fields inherited from interface android.os.ParcelableCONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
- 
 - 
Constructor SummaryConstructors Constructor Description StreamKey(int groupIndex, int streamIndex)Deprecated.Creates an instance withperiodIndexset to 0.StreamKey(int periodIndex, int groupIndex, int streamIndex)Deprecated.Creates an instance ofStreamKeyusing 3 indices.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(StreamKey o)Deprecated.intdescribeContents()Deprecated.booleanequals(Object o)Deprecated.static StreamKeyfromBundle(Bundle bundle)Deprecated.inthashCode()Deprecated.BundletoBundle()Deprecated.Returns aBundlerepresenting the information stored in this object.StringtoString()Deprecated.voidwriteToParcel(Parcel dest, int flags)Deprecated.
 
- 
- 
- 
Field Detail- 
periodIndexpublic final int periodIndex Deprecated.The period index.
 - 
groupIndexpublic final int groupIndex Deprecated.The group index.
 - 
streamIndexpublic final int streamIndex Deprecated.The stream index.
 - 
CREATORpublic static final Parcelable.Creator<StreamKey> CREATOR Deprecated.
 
- 
 - 
Constructor Detail- 
StreamKeypublic StreamKey(int groupIndex, int streamIndex)Deprecated.Creates an instance withperiodIndexset to 0.- Parameters:
- groupIndex- The group index.
- streamIndex- The stream index.
 
 - 
StreamKeypublic StreamKey(int periodIndex, int groupIndex, int streamIndex)Deprecated.Creates an instance ofStreamKeyusing 3 indices.- Parameters:
- periodIndex- The period index.
- groupIndex- The group index.
- streamIndex- The stream index.
 
 
- 
 - 
Method Detail- 
compareTopublic int compareTo(StreamKey o) Deprecated.- Specified by:
- compareToin interface- Comparable<StreamKey>
 
 - 
describeContentspublic int describeContents() Deprecated.- Specified by:
- describeContentsin interface- Parcelable
 
 - 
writeToParcelpublic void writeToParcel(Parcel dest, int flags) Deprecated.- Specified by:
- writeToParcelin interface- Parcelable
 
 - 
toBundlepublic Bundle toBundle() Deprecated.Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
- toBundlein interface- Bundleable
 
 
- 
 
-