Back to Exoplayer

TrackEncryptionBox (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/mp4/TrackEncryptionBox.html

latest5.1 KB
Original Source

Package com.google.android.exoplayer2.extractor.mp4

Class TrackEncryptionBox

  • java.lang.Object

    • com.google.android.exoplayer2.extractor.mp4.TrackEncryptionBox

[@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.

Field Summary

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. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | TrackEncryptionBox​(boolean isEncrypted, String schemeType, int perSampleIvSize, byte[] keyId, int defaultEncryptedBlocks, int defaultClearBlocks, byte[] defaultInitializationVector) | Deprecated. |

Method Summary

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

isEncrypted

public final boolean isEncrypted

Deprecated.

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

- 

schemeType

@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.

- 

cryptoData

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.

- 

perSampleIvSize

public final int perSampleIvSize

Deprecated.

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

- 

defaultInitializationVector

@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.

Constructor Detail

- 

TrackEncryptionBox

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.