Back to Exoplayer

TrackOutput.CryptoData (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/TrackOutput.CryptoData.html

latest3.3 KB
Original Source

Package com.google.android.exoplayer2.extractor

Class TrackOutput.CryptoData


public static final classTrackOutput.CryptoDataextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Holds data required to decrypt a sample.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | int | clearBlocks | The number of clear blocks in the encryption pattern, 0 if pattern encryption does not apply. | | @com.google.android.exoplayer2.C.CryptoMode int | cryptoMode | The encryption mode used for the sample. | | int | encryptedBlocks | The number of encrypted blocks in the encryption pattern, 0 if pattern encryption does not apply. | | byte[] | encryptionKey | The encryption key associated with the sample. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | CryptoData​(@com.google.android.exoplayer2.C.CryptoMode int cryptoMode, byte[] encryptionKey, int encryptedBlocks, int clearBlocks) | |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | equals​(Object obj) | | | int | hashCode() | |

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

cryptoMode

public final @com.google.android.exoplayer2.C.CryptoMode int cryptoMode

The encryption mode used for the sample.

- 

encryptionKey

public final byte[] encryptionKey

The encryption key associated with the sample. Its contents must not be modified.

- 

encryptedBlocks

public final int encryptedBlocks

The number of encrypted blocks in the encryption pattern, 0 if pattern encryption does not apply.

- 

clearBlocks

public final int clearBlocks

The number of clear blocks in the encryption pattern, 0 if pattern encryption does not apply.

Constructor Detail

- 

CryptoData

public CryptoData​(@com.google.android.exoplayer2.C.CryptoMode int cryptoMode,
                  byte[] encryptionKey,
                  int encryptedBlocks,
                  int clearBlocks)

Parameters:cryptoMode - See cryptoMode.encryptionKey - See encryptionKey.encryptedBlocks - See encryptedBlocks.clearBlocks - See clearBlocks.

Method Detail

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Overrides:equals in class Object

- 

hashCode

public int hashCode()

Overrides:hashCode in class Object