Class DrmInitData.SchemeData
- java.lang.Object
-
- com.google.android.exoplayer2.drm.DrmInitData.SchemeData
-
- All Implemented Interfaces:
Parcelable
- Enclosing class:
- DrmInitData
public static final class DrmInitData.SchemeData extends Object implements Parcelable
Scheme initialization data.
-
-
Nested Class Summary
-
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.SchemeData>CREATORbyte[]dataThe initialization data.StringlicenseServerUrlThe URL of the server to which license requests should be made.StringmimeTypeThe mimeType ofdata.UUIDuuidTheUUIDof the DRM scheme, orC.UUID_NILif the data is universal (i.e.-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description SchemeData(UUID uuid, String mimeType, byte[] data)SchemeData(UUID uuid, String licenseServerUrl, String mimeType, byte[] data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanReplace(DrmInitData.SchemeData other)Returns whether thisDrmInitData.SchemeDatacan be used to replaceother.DrmInitData.SchemeDatacopyWithData(byte[] data)Returns a copy of this instance with the specified data.intdescribeContents()booleanequals(Object obj)booleanhasData()Returns whetherdatais non-null.inthashCode()booleanmatches(UUID schemeUuid)Returns whether this initialization data applies to the specified scheme.voidwriteToParcel(Parcel dest, int flags)
-
-
-
Field Detail
-
uuid
public final UUID uuid
TheUUIDof the DRM scheme, orC.UUID_NILif the data is universal (i.e. applies to all schemes).
-
licenseServerUrl
@Nullable public final String licenseServerUrl
The URL of the server to which license requests should be made. May be null if unknown.
-
data
@Nullable public final byte[] data
The initialization data. May be null for scheme support checks only.
-
CREATOR
public static final Parcelable.Creator<DrmInitData.SchemeData> CREATOR
-
-
Constructor Detail
-
SchemeData
public SchemeData(UUID uuid, String mimeType, @Nullable byte[] data)
- Parameters:
uuid- TheUUIDof the DRM scheme, orC.UUID_NILif the data is universal (i.e. applies to all schemes).mimeType- SeemimeType.data- Seedata.
-
SchemeData
public SchemeData(UUID uuid, @Nullable String licenseServerUrl, String mimeType, @Nullable byte[] data)
- Parameters:
uuid- TheUUIDof the DRM scheme, orC.UUID_NILif the data is universal (i.e. applies to all schemes).licenseServerUrl- SeelicenseServerUrl.mimeType- SeemimeType.data- Seedata.
-
-
Method Detail
-
matches
public boolean matches(UUID schemeUuid)
Returns whether this initialization data applies to the specified scheme.- Parameters:
schemeUuid- The schemeUUID.- Returns:
- Whether this initialization data applies to the specified scheme.
-
canReplace
public boolean canReplace(DrmInitData.SchemeData other)
Returns whether thisDrmInitData.SchemeDatacan be used to replaceother.- Parameters:
other- ADrmInitData.SchemeData.- Returns:
- Whether this
DrmInitData.SchemeDatacan be used to replaceother.
-
hasData
public boolean hasData()
Returns whetherdatais non-null.
-
copyWithData
@CheckResult public DrmInitData.SchemeData copyWithData(@Nullable byte[] data)
Returns a copy of this instance with the specified data.- Parameters:
data- The data to include in the copy.- Returns:
- The new instance.
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcelin interfaceParcelable
-
-