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 extends Object>, Parcelable.Creator<T extends Object>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parcelable.Creator<DrmInitData.SchemeData>
final byte[]
The initialization data.final UUID[]
Default key ids forConstants.COMMON_PSSH_UUID
ornull
final String
The URL of the server to which license requests should be made.final String
The 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 TypeMethodDescriptionboolean
canReplace
(DrmInitData.SchemeData other) Returns whether thisDrmInitData.SchemeData
can be used to replaceother
.copyWithData
(byte[] data) Returns a copy of this instance with the specified data.int
boolean
boolean
hasData()
Returns whetherdata
is non-null.int
hashCode()
boolean
Returns whether this initialization data applies to the specified scheme.boolean
void
writeToParcel
(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_UUID
ornull
-
CREATOR
-
-
Constructor Details
-
SchemeData
- Parameters:
uuid
- TheUUID
of the DRM scheme, orConstants.UUID_NIL
if 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
- TheUUID
of the DRM scheme, orConstants.UUID_NIL
if 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.SchemeData
can be used to replaceother
.- Parameters:
other
- ADrmInitData.SchemeData
.- Returns:
- Whether this
DrmInitData.SchemeData
can be used to replaceother
.
-
hasData
public boolean hasData()Returns whetherdata
is 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:
describeContents
in interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcel
in interfaceParcelable
-