TrackEncryptionBox
@UnstableApi
public final class TrackEncryptionBox
Encapsulates information parsed from a track encryption (tenc) box or sample group description (sgpd) box in an MP4 stream.
Summary
Public fields |
|
|---|---|
final TrackOutput.CryptoData |
A |
final @Nullable byte[] |
If |
final boolean |
Indicates the encryption state of the samples in the sample group. |
final int |
The initialization vector size in bytes for the samples in the corresponding sample group. |
final @Nullable String |
The protection scheme type, as defined by the 'schm' box, or null if unknown. |
Public constructors |
|---|
TrackEncryptionBox( |
Public fields
cryptoData
public final TrackOutput.CryptoData cryptoData
A TrackOutput.CryptoData instance containing the encryption information from this TrackEncryptionBox.
defaultInitializationVector
public final @Nullable byte[] defaultInitializationVector
If perSampleIvSize is 0, holds the default initialization vector as defined in the track encryption box or sample group description box. Null otherwise.
isEncrypted
public final boolean isEncrypted
Indicates the encryption state of the samples in the sample group.
perSampleIvSize
public final int perSampleIvSize
The initialization vector size in bytes for the samples in the corresponding sample group.
schemeType
public final @Nullable String schemeType
The protection scheme type, as defined by the 'schm' box, or null if unknown.
Public constructors
TrackEncryptionBox
public TrackEncryptionBox(
boolean isEncrypted,
@Nullable String schemeType,
int perSampleIvSize,
byte[] keyId,
int defaultEncryptedBlocks,
int defaultClearBlocks,
@Nullable byte[] defaultInitializationVector
)
| Parameters | |
|---|---|
boolean isEncrypted |
See |
@Nullable String schemeType |
See |
int perSampleIvSize |
See |
byte[] keyId |
See |
int defaultEncryptedBlocks |
See |
int defaultClearBlocks |
See |
@Nullable byte[] defaultInitializationVector |