Shaka Packager SDK
|
A key source that uses playready for encryption. More...
#include <playready_key_source.h>
Public Member Functions | |
PlayReadyKeySource (const std::string &server_url) | |
PlayReadyKeySource (const std::string &server_url, const std::string &client_cert_file, const std::string &client_cert_private_key_file, const std::string &client_cert_private_key_password) | |
virtual Status | FetchKeysWithProgramIdentifier (const std::string &program_identifier) |
void | SetCaFile (const std::string &ca_file) |
Sets the Certificate Authority file for validating self-signed certificates. | |
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 |
Static Public Member Functions | |
static std::unique_ptr < PlayReadyKeySource > | CreateFromKeyAndKeyId (const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &key) |
A key source that uses playready for encryption.
Definition at line 24 of file playready_key_source.h.
shaka::media::PlayReadyKeySource::PlayReadyKeySource | ( | const std::string & | server_url | ) |
Creates a new PlayReadyKeySource from the given packaging information.
server_url | PlayReady packaging server url. |
Definition at line 160 of file playready_key_source.cc.
shaka::media::PlayReadyKeySource::PlayReadyKeySource | ( | const std::string & | server_url, |
const std::string & | client_cert_file, | ||
const std::string & | client_cert_private_key_file, | ||
const std::string & | client_cert_private_key_password | ||
) |
Creates a new PlayReadyKeySource from the given packaging information.
server_url | PlayReady packaging server url. |
client_cert_file | absolute path to a client certificate. |
client_cert_private_key_file | absolute path to the private file for the client certificate. |
client_cert_private_key_password | password for the private key. |
Definition at line 166 of file playready_key_source.cc.
|
static |
Creates a new PlayReadyKeySource from the given data. Returns null if the strings are invalid. Note: GetKey on the created key source will always return the same key for all track types.
Definition at line 184 of file playready_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 307 of file playready_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 334 of file playready_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 313 of file playready_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 324 of file playready_key_source.cc.