TrackEncryptionBox


@UnstableApi
class TrackEncryptionBox


Encapsulates information parsed from a track encryption (tenc) box or sample group description (sgpd) box in an MP4 stream.

Summary

Public constructors

TrackEncryptionBox(
    isEncrypted: Boolean,
    schemeType: String?,
    perSampleIvSize: Int,
    keyId: ByteArray!,
    defaultEncryptedBlocks: Int,
    defaultClearBlocks: Int,
    defaultInitializationVector: ByteArray?
)

Public properties

TrackOutput.CryptoData!

A TrackOutput.CryptoData instance containing the encryption information from this TrackEncryptionBox.

ByteArray<Byte>?

If perSampleIvSize is 0, holds the default initialization vector as defined in the track encryption box or sample group description box.

Boolean

Indicates the encryption state of the samples in the sample group.

Int

The initialization vector size in bytes for the samples in the corresponding sample group.

String?

The protection scheme type, as defined by the 'schm' box, or null if unknown.

Public constructors

TrackEncryptionBox

TrackEncryptionBox(
    isEncrypted: Boolean,
    schemeType: String?,
    perSampleIvSize: Int,
    keyId: ByteArray!,
    defaultEncryptedBlocks: Int,
    defaultClearBlocks: Int,
    defaultInitializationVector: ByteArray?
)
Parameters
isEncrypted: Boolean

See isEncrypted.

schemeType: String?

See schemeType.

perSampleIvSize: Int

See perSampleIvSize.

keyId: ByteArray!

See encryptionKey.

defaultEncryptedBlocks: Int

See encryptedBlocks.

defaultClearBlocks: Int

See clearBlocks.

defaultInitializationVector: ByteArray?

See defaultInitializationVector.

Public properties

cryptoData

val cryptoDataTrackOutput.CryptoData!

A TrackOutput.CryptoData instance containing the encryption information from this TrackEncryptionBox.

defaultInitializationVector

val defaultInitializationVectorByteArray<Byte>?

If perSampleIvSize is 0, holds the default initialization vector as defined in the track encryption box or sample group description box. Null otherwise.

isEncrypted

val isEncryptedBoolean

Indicates the encryption state of the samples in the sample group.

perSampleIvSize

val perSampleIvSizeInt

The initialization vector size in bytes for the samples in the corresponding sample group.

schemeType

val schemeTypeString?

The protection scheme type, as defined by the 'schm' box, or null if unknown.