Class DrmInitData
- java.lang.Object
-
- com.google.android.exoplayer2.drm.DrmInitData
-
- All Implemented Interfaces:
Parcelable
,Comparator<DrmInitData.SchemeData>
@Deprecated public final class DrmInitData extends Object implements Comparator<DrmInitData.SchemeData>, Parcelable
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.Initialization data for one or more DRM schemes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DrmInitData.SchemeData
Deprecated.Scheme initialization data.-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<DrmInitData>
CREATOR
Deprecated.int
schemeDataCount
Deprecated.Number ofDrmInitData.SchemeData
s.String
schemeType
Deprecated.The protection scheme type, or null if not applicable or unknown.-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description DrmInitData(DrmInitData.SchemeData... schemeDatas)
Deprecated.DrmInitData(String schemeType, DrmInitData.SchemeData... schemeDatas)
Deprecated.DrmInitData(String schemeType, List<DrmInitData.SchemeData> schemeDatas)
Deprecated.DrmInitData(List<DrmInitData.SchemeData> schemeDatas)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compare(DrmInitData.SchemeData first, DrmInitData.SchemeData second)
Deprecated.DrmInitData
copyWithSchemeType(String schemeType)
Deprecated.Returns a copy with the specified protection scheme type.static DrmInitData
createSessionCreationData(DrmInitData manifestData, DrmInitData mediaData)
Deprecated.MergesDrmInitData
obtained from a media manifest and a media stream.int
describeContents()
Deprecated.boolean
equals(Object obj)
Deprecated.DrmInitData.SchemeData
get(int index)
Deprecated.Retrieves theDrmInitData.SchemeData
at a given index.int
hashCode()
Deprecated.DrmInitData
merge(DrmInitData drmInitData)
Deprecated.Returns an instance containing theschemeDatas
from both this andother
.void
writeToParcel(Parcel dest, int flags)
Deprecated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
schemeType
@Nullable public final String schemeType
Deprecated.The protection scheme type, or null if not applicable or unknown.
-
schemeDataCount
public final int schemeDataCount
Deprecated.Number ofDrmInitData.SchemeData
s.
-
CREATOR
public static final Parcelable.Creator<DrmInitData> CREATOR
Deprecated.
-
-
Constructor Detail
-
DrmInitData
public DrmInitData(List<DrmInitData.SchemeData> schemeDatas)
Deprecated.- Parameters:
schemeDatas
- Scheme initialization data for possibly multiple DRM schemes.
-
DrmInitData
public DrmInitData(@Nullable String schemeType, List<DrmInitData.SchemeData> schemeDatas)
Deprecated.- Parameters:
schemeType
- SeeschemeType
.schemeDatas
- Scheme initialization data for possibly multiple DRM schemes.
-
DrmInitData
public DrmInitData(DrmInitData.SchemeData... schemeDatas)
Deprecated.- Parameters:
schemeDatas
- Scheme initialization data for possibly multiple DRM schemes.
-
DrmInitData
public DrmInitData(@Nullable String schemeType, DrmInitData.SchemeData... schemeDatas)
Deprecated.- Parameters:
schemeType
- SeeschemeType
.schemeDatas
- Scheme initialization data for possibly multiple DRM schemes.
-
-
Method Detail
-
createSessionCreationData
@Nullable public static DrmInitData createSessionCreationData(@Nullable DrmInitData manifestData, @Nullable DrmInitData mediaData)
Deprecated.MergesDrmInitData
obtained from a media manifest and a media stream.The result is generated as follows.
- Include all
DrmInitData.SchemeData
s frommanifestData
whereDrmInitData.SchemeData.hasData()
is true. - Include all
DrmInitData.SchemeData
s inmediaData
whereDrmInitData.SchemeData.hasData()
is true and for which we did not include an entry from the manifest targeting the same UUID. - If available, the scheme type from the manifest is used. If not, the scheme type from the media is used.
- Parameters:
manifestData
- DRM session acquisition data obtained from the manifest.mediaData
- DRM session acquisition data obtained from the media.- Returns:
- A
DrmInitData
obtained from merging a media manifest and a media stream.
- Include all
-
get
public DrmInitData.SchemeData get(int index)
Deprecated.Retrieves theDrmInitData.SchemeData
at a given index.- Parameters:
index
- The index of the scheme to return. Must not exceedschemeDataCount
.- Returns:
- The
DrmInitData.SchemeData
at the specified index.
-
copyWithSchemeType
@CheckResult public DrmInitData copyWithSchemeType(@Nullable String schemeType)
Deprecated.Returns a copy with the specified protection scheme type.- Parameters:
schemeType
- A protection scheme type. May be null.- Returns:
- A copy with the specified protection scheme type.
-
merge
public DrmInitData merge(DrmInitData drmInitData)
Deprecated.Returns an instance containing theschemeDatas
from both this andother
. TheschemeType
of the instances being merged must either match, or at least one scheme type must benull
.- Parameters:
drmInitData
- The instance to merge.- Returns:
- The merged result.
-
equals
public boolean equals(@Nullable Object obj)
Deprecated.- Specified by:
equals
in interfaceComparator<DrmInitData.SchemeData>
- Overrides:
equals
in classObject
-
compare
public int compare(DrmInitData.SchemeData first, DrmInitData.SchemeData second)
Deprecated.- Specified by:
compare
in interfaceComparator<DrmInitData.SchemeData>
-
describeContents
public int describeContents()
Deprecated.- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
Deprecated.- Specified by:
writeToParcel
in interfaceParcelable
-
-