docs/doc/reference/com/google/android/exoplayer2/extractor/mp4/TrackEncryptionBox.html
Package com.google.android.exoplayer2.extractor.mp4
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTrackEncryptionBoxextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Encapsulates information parsed from a track encryption (tenc) box or sample group description (sgpd) box in an MP4 stream.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| TrackOutput.CryptoData | cryptoData |
Deprecated.
A TrackOutput.CryptoData instance containing the encryption information from this TrackEncryptionBox.
|
| byte[] | defaultInitializationVector |
Deprecated.
If perSampleIvSize is 0, holds the default initialization vector as defined in the track encryption box or sample group description box.
|
| boolean | isEncrypted |
Deprecated.
Indicates the encryption state of the samples in the sample group.
|
| int | perSampleIvSize |
Deprecated.
The initialization vector size in bytes for the samples in the corresponding sample group.
|
| String | schemeType |
Deprecated.
The protection scheme type, as defined by the 'schm' box, or null if unknown. |
Constructors | Constructor | Description |
| --- | --- |
| TrackEncryptionBox(boolean isEncrypted, String schemeType, int perSampleIvSize, byte[] keyId, int defaultEncryptedBlocks, int defaultClearBlocks, byte[] defaultInitializationVector) |
Deprecated.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public final boolean isEncrypted
Deprecated.
Indicates the encryption state of the samples in the sample group.
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")schemeType
Deprecated.
The protection scheme type, as defined by the 'schm' box, or null if unknown.
-
public final[TrackOutput.CryptoData](../TrackOutput.CryptoData.html "class in com.google.android.exoplayer2.extractor")cryptoData
Deprecated.
A TrackOutput.CryptoData instance containing the encryption information from this TrackEncryptionBox.
-
public final int perSampleIvSize
Deprecated.
The initialization vector size in bytes for the samples in the corresponding sample group.
-
@Nullable
public final byte[] defaultInitializationVector
Deprecated.
If perSampleIvSize is 0, holds the default initialization vector as defined in the track encryption box or sample group description box. Null otherwise.
-
public TrackEncryptionBox(boolean isEncrypted,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")schemeType,
int perSampleIvSize,
byte[] keyId,
int defaultEncryptedBlocks,
int defaultClearBlocks,
@Nullable
byte[] defaultInitializationVector)
Deprecated.
Parameters:isEncrypted - See isEncrypted.schemeType - See schemeType.perSampleIvSize - See perSampleIvSize.keyId - See TrackOutput.CryptoData.encryptionKey.defaultEncryptedBlocks - See TrackOutput.CryptoData.encryptedBlocks.defaultClearBlocks - See TrackOutput.CryptoData.clearBlocks.defaultInitializationVector - See defaultInitializationVector.