Class DrmInitData.SchemeData
java.lang.Object
com.castlabs.sdk.base.subtitles.utilities.DrmInitData.SchemeData
- All Implemented Interfaces:
Parcelable
- Enclosing class:
DrmInitData
Scheme initialization data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parcelable.Creator<DrmInitData.SchemeData> final byte[]The initialization data.final UUID[]Default key ids forConstants.COMMON_PSSH_UUIDornullfinal StringThe URL of the server to which license requests should be made.final StringThe mimeType ofdata.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionSchemeData(UUID uuid, String mimeType, byte[] data) SchemeData(UUID uuid, String licenseServerUrl, String mimeType, byte[] data) SchemeData(UUID uuid, String licenseServerUrl, String mimeType, byte[] data, UUID[] keyIds) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanReplace(DrmInitData.SchemeData other) Returns whether thisDrmInitData.SchemeDatacan be used to replaceother.copyWithData(byte[] data) Returns a copy of this instance with the specified data.intbooleanbooleanhasData()Returns whetherdatais non-null.inthashCode()booleanReturns whether this initialization data applies to the specified scheme.booleanvoidwriteToParcel(Parcel dest, int flags)
-
Field Details
-
licenseServerUrl
The URL of the server to which license requests should be made. May be null if unknown. -
mimeType
The mimeType ofdata. -
data
@Nullable public final byte[] dataThe initialization data. May be null for scheme support checks only. -
keyIds
Default key ids forConstants.COMMON_PSSH_UUIDornull -
CREATOR
-
-
Constructor Details
-
SchemeData
- Parameters:
uuid- TheUUIDof the DRM scheme, orConstants.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, orConstants.UUID_NILif the data is universal (i.e. applies to all schemes).licenseServerUrl- SeelicenseServerUrl.mimeType- SeemimeType.data- Seedata.
-
SchemeData
-
-
Method Details
-
matchesUUID
-
matches
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
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
Returns a copy of this instance with the specified data.- Parameters:
data- The data to include in the copy.- Returns:
- The new instance.
-
equals
-
hashCode
public int hashCode() -
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcelin interfaceParcelable
-