Shaka Packager SDK
|
A key source that uses raw keys for encryption. More...
#include <raw_key_source.h>
Public Member Functions | |
KeySource implementation overrides. | |
Status | FetchKeys (EmeInitDataType init_data_type, const std::vector< uint8_t > &init_data) override |
Status | GetKey (const std::string &stream_label, EncryptionKey *key) override |
Status | GetKey (const std::vector< uint8_t > &key_id, EncryptionKey *key) override |
Status | GetCryptoPeriodKey (uint32_t crypto_period_index, const std::string &stream_label, EncryptionKey *key) override |
Public Member Functions inherited from shaka::media::KeySource | |
KeySource (int protection_systems_flags) | |
Static Public Member Functions | |
static std::unique_ptr< RawKeySource > | Create (const RawKeyParams &raw_key, int protection_system_flags) |
Additional Inherited Members | |
Protected Member Functions inherited from shaka::media::KeySource | |
Status | UpdateProtectionSystemInfo (EncryptionKeyMap *encryption_key_map) |
A key source that uses raw keys for encryption.
Definition at line 27 of file raw_key_source.h.
|
static |
Creates a new RawKeySource from the given data. Returns null if the parameter is malformed.
raw_key | contains parameters to setup the key source. |
Definition at line 99 of file raw_key_source.cc.
|
overridevirtual |
Fetch keys based on the specified encrypted media init data.
init_data_type | specifies the encrypted media init data type. |
init_data | contains the init data. |
Implements shaka::media::KeySource.
Definition at line 25 of file raw_key_source.cc.
|
overridevirtual |
Get encryption key of the specified track type at the specified index.
crypto_period_index | is the sequence number of the key rotation period for which the key is being retrieved. |
stream_label | is the label of stream for which retrieving the key. |
key | is a pointer to the EncryptionKey which will hold the retrieved key. Owner retains ownership, and may not be NULL. |
Implements shaka::media::KeySource.
Definition at line 62 of file raw_key_source.cc.
|
overridevirtual |
Get encryption key of the specified stream label.
stream_label | is the label of stream for which retrieving the key. |
key | is a pointer to the EncryptionKey which will hold the retrieved key. Owner retains ownership, and may not be NULL. |
Implements shaka::media::KeySource.
Definition at line 31 of file raw_key_source.cc.
|
overridevirtual |
Get the encryption key specified by the CENC key ID.
key_id | is the unique identifier for the key being retreived. |
key | is a pointer to the EncryptionKey which will hold the retrieved key. Owner retains ownership, and may not be NULL. |
Implements shaka::media::KeySource.
Definition at line 48 of file raw_key_source.cc.