public final class CryptoInfo extends Object
MediaCodec.CryptoInfo.| Modifier and Type | Field | Description |
|---|---|---|
int |
clearBlocks |
|
int |
encryptedBlocks |
|
byte[] |
iv |
The 16 byte initialization vector.
|
byte[] |
key |
The 16 byte key id.
|
int |
mode |
The type of encryption that has been applied.
|
int[] |
numBytesOfClearData |
The number of leading unencrypted bytes in each sub-sample.
|
int[] |
numBytesOfEncryptedData |
The number of trailing encrypted bytes in each sub-sample.
|
int |
numSubSamples |
The number of subSamples that make up the buffer's contents.
|
| Constructor | Description |
|---|---|
CryptoInfo() |
| Modifier and Type | Method | Description |
|---|---|---|
MediaCodec.CryptoInfo |
getFrameworkCryptoInfo() |
Returns an equivalent
MediaCodec.CryptoInfo instance. |
MediaCodec.CryptoInfo |
getFrameworkCryptoInfoV16() |
Deprecated.
|
void |
increaseClearDataFirstSubSampleBy(int count) |
Increases the number of clear data for the first sub sample by
count. |
void |
set(int numSubSamples,
int[] numBytesOfClearData,
int[] numBytesOfEncryptedData,
byte[] key,
byte[] iv,
int mode,
int encryptedBlocks,
int clearBlocks) |
@Nullable public byte[] iv
MediaCodec.CryptoInfo.iv@Nullable public byte[] key
MediaCodec.CryptoInfo.key@CryptoMode public int mode
C.CryptoMode values.MediaCodec.CryptoInfo.mode@Nullable public int[] numBytesOfClearData
numBytesOfEncryptedData must be specified.@Nullable public int[] numBytesOfEncryptedData
numBytesOfClearData must be specified.public int numSubSamples
MediaCodec.CryptoInfo.numSubSamplespublic int encryptedBlocks
MediaCodec.CryptoInfo.Patternpublic int clearBlocks
MediaCodec.CryptoInfo.Patternpublic void set(int numSubSamples,
int[] numBytesOfClearData,
int[] numBytesOfEncryptedData,
byte[] key,
byte[] iv,
@CryptoMode
int mode,
int encryptedBlocks,
int clearBlocks)
public MediaCodec.CryptoInfo getFrameworkCryptoInfo()
MediaCodec.CryptoInfo instance.
Successive calls to this method on a single CryptoInfo will return the same
instance. Changes to the CryptoInfo will be reflected in the returned object. The
return object should not be modified directly.
MediaCodec.CryptoInfo instance.@Deprecated public MediaCodec.CryptoInfo getFrameworkCryptoInfoV16()
public void increaseClearDataFirstSubSampleBy(int count)
count.
If count is 0, this method is a no-op. Otherwise, it adds count to numBytesOfClearData[0].
If numBytesOfClearData is null (which is permitted), this method will instantiate
it to a new int[1].
count - The number of bytes to be added to the first subSample of numBytesOfClearData.