Pattern
class Pattern
kotlin.Any | |
↳ | android.media.MediaCodec.CryptoInfo.Pattern |
Metadata describing an encryption pattern for the protected bytes in a subsample. An encryption pattern consists of a repeating sequence of crypto blocks comprised of a number of encrypted blocks followed by a number of unencrypted, or skipped, blocks.
Summary
Public constructors | |
---|---|
Construct a sample encryption pattern given the number of blocks to encrypt and skip in the pattern. |
Public methods | |
---|---|
Int |
Return the number of blocks to encrypt in a sample encryption pattern. |
Int |
Return the number of blocks to skip in a sample encryption pattern. |
Unit |
Set the number of blocks to encrypt and skip in a sample encryption pattern. |
Public constructors
Pattern
Pattern(
blocksToEncrypt: Int,
blocksToSkip: Int)
Construct a sample encryption pattern given the number of blocks to encrypt and skip in the pattern. If both parameters are zero, pattern encryption is inoperative.
Public methods
getEncryptBlocks
fun getEncryptBlocks(): Int
Return the number of blocks to encrypt in a sample encryption pattern.
getSkipBlocks
fun getSkipBlocks(): Int
Return the number of blocks to skip in a sample encryption pattern.
set
fun set(
blocksToEncrypt: Int,
blocksToSkip: Int
): Unit
Set the number of blocks to encrypt and skip in a sample encryption pattern. If both parameters are zero, pattern encryption is inoperative.