@UnstableApi
class DrmInitData : Comparator, Parcelable


Initialization data for one or more DRM schemes.

Summary

Nested types

Scheme initialization data.

Public constructors

DrmInitData(
    schemeType: String?,
    schemeDatas: Array<DrmInitData.SchemeData!>!
)
DrmInitData(
    schemeType: String?,
    schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!
)

Public functions

Int
DrmInitData!
copyWithSchemeType(schemeType: String?)

Returns a copy with the specified protection scheme type.

java-static DrmInitData?
createSessionCreationData(
    manifestData: DrmInitData?,
    mediaData: DrmInitData?
)

Merges DrmInitData obtained from a media manifest and a media stream.

Int
Boolean
equals(obj: Any?)
DrmInitData.SchemeData!
get(index: Int)

Retrieves the SchemeData at a given index.

Int
DrmInitData!
merge(drmInitData: DrmInitData!)

Returns an instance containing the schemeDatas from both this and other.

Unit
writeToParcel(dest: Parcel!, flags: Int)

Public properties

Int

Number of SchemeDatas.

String?

The protection scheme type, or null if not applicable or unknown.

Inherited functions

From java.util.Comparator
java-static Comparator<T!>!
<T, U> comparing(
    keyExtractor: Function<T!, U!>!,
    keyComparator: Comparator<U!>!
)
java-static Comparator<T!>!
<T> comparingDouble(keyExtractor: ToDoubleFunction<T!>!)
java-static Comparator<T!>!
<T> comparingInt(keyExtractor: ToIntFunction<T!>!)
java-static Comparator<T!>!
<T> comparingLong(keyExtractor: ToLongFunction<T!>!)
java-static Comparator<T!>!
<T : Comparable<T!>?> naturalOrder()
java-static Comparator<T!>!
<T> nullsFirst(comparator: Comparator<T!>!)
java-static Comparator<T!>!
<T> nullsLast(comparator: Comparator<T!>!)
java-static Comparator<T!>!
<T : Comparable<T!>?> reverseOrder()
Comparator<T!>!
Comparator<T!>!
Comparator<T!>!
Comparator<T!>!
thenComparingInt(keyExtractor: ToIntFunction<T!>!)
Comparator<T!>!
thenComparingLong(keyExtractor: ToLongFunction<T!>!)

Constants

CREATOR

const val CREATORParcelable.Creator<DrmInitData!>!

Public constructors

DrmInitData

DrmInitData(schemeDatas: Array<DrmInitData.SchemeData!>!)
Parameters
schemeDatas: Array<DrmInitData.SchemeData!>!

Scheme initialization data for possibly multiple DRM schemes.

DrmInitData

DrmInitData(schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!)
Parameters
schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!

Scheme initialization data for possibly multiple DRM schemes.

DrmInitData

DrmInitData(
    schemeType: String?,
    schemeDatas: Array<DrmInitData.SchemeData!>!
)
Parameters
schemeType: String?

See schemeType.

schemeDatas: Array<DrmInitData.SchemeData!>!

Scheme initialization data for possibly multiple DRM schemes.

DrmInitData

DrmInitData(
    schemeType: String?,
    schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!
)
Parameters
schemeType: String?

See schemeType.

schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!

Scheme initialization data for possibly multiple DRM schemes.

Public functions

compare

fun compare(first: DrmInitData.SchemeData!, second: DrmInitData.SchemeData!): Int

copyWithSchemeType

fun copyWithSchemeType(schemeType: String?): DrmInitData!

Returns a copy with the specified protection scheme type.

Parameters
schemeType: String?

A protection scheme type. May be null.

Returns
DrmInitData!

A copy with the specified protection scheme type.

createSessionCreationData

java-static fun createSessionCreationData(
    manifestData: DrmInitData?,
    mediaData: DrmInitData?
): DrmInitData?

Merges DrmInitData obtained from a media manifest and a media stream.

The result is generated as follows.

  1. Include all SchemeDatas from manifestData where hasData is true.
  2. Include all SchemeDatas in mediaData where hasData is true and for which we did not include an entry from the manifest targeting the same UUID.
  3. If available, the scheme type from the manifest is used. If not, the scheme type from the media is used.
Parameters
manifestData: DrmInitData?

DRM session acquisition data obtained from the manifest.

mediaData: DrmInitData?

DRM session acquisition data obtained from the media.

Returns
DrmInitData?

A DrmInitData obtained from merging a media manifest and a media stream.

describeContents

fun describeContents(): Int

equals

fun equals(obj: Any?): Boolean

get

fun get(index: Int): DrmInitData.SchemeData!

Retrieves the SchemeData at a given index.

Parameters
index: Int

The index of the scheme to return. Must not exceed schemeDataCount.

Returns
DrmInitData.SchemeData!

The SchemeData at the specified index.

hashCode

fun hashCode(): Int

merge

fun merge(drmInitData: DrmInitData!): DrmInitData!

Returns an instance containing the schemeDatas from both this and other. The schemeType of the instances being merged must either match, or at least one scheme type must be null.

Parameters
drmInitData: DrmInitData!

The instance to merge.

Returns
DrmInitData!

The merged result.

writeToParcel

fun writeToParcel(dest: Parcel!, flags: Int): Unit

Public properties

schemeDataCount

val schemeDataCountInt

Number of SchemeDatas.

schemeType

val schemeTypeString?

The protection scheme type, or null if not applicable or unknown.