Shaka Packager SDK
|
Encryption parameters. More...
#include <crypto_params.h>
Classes | |
struct | EncryptedStreamAttributes |
Encrypted stream information that is used to determine stream label. More... | |
Public Attributes | |
KeyProvider | key_provider = KeyProvider::kNone |
WidevineEncryptionParams | widevine |
PlayReadyEncryptionParams | playready |
RawKeyParams | raw_key |
bool | generate_common_pssh = false |
bool | generate_playready_pssh = false |
bool | generate_widevine_pssh = false |
double | clear_lead_in_seconds = 0 |
Clear lead duration in seconds. | |
uint32_t | protection_scheme = kProtectionSchemeCenc |
double | crypto_period_duration_in_seconds = kNoKeyRotation |
bool | vp9_subsample_encryption = true |
Enable/disable subsample encryption for VP9. | |
std::function< std::string(const EncryptedStreamAttributes &stream_attributes)> | stream_label_func |
Static Public Attributes | |
static constexpr uint32_t | kProtectionSchemeCenc = 0x63656E63 |
The protection scheme: "cenc", "cens", "cbc1", "cbcs". | |
static constexpr uint32_t | kProtectionSchemeCbc1 = 0x63626331 |
static constexpr uint32_t | kProtectionSchemeCens = 0x63656E73 |
static constexpr uint32_t | kProtectionSchemeCbcs = 0x63626373 |
static constexpr double | kNoKeyRotation = 0 |
Encryption parameters.
Definition at line 112 of file crypto_params.h.
bool shaka::EncryptionParams::generate_common_pssh = false |
When it is true, generate a v1 PSSH box for the common system ID. See: https://goo.gl/s8RIhr. The flag is default to be true if –enable_raw_key_encryption is set and no other pssh flags are specified.
Definition at line 126 of file crypto_params.h.
bool shaka::EncryptionParams::generate_playready_pssh = false |
When it is true, include a PlayReady PSSH box. A playready PSSH is always generated regardless of the value of –generate_playready_pssh for –enable_playready_encryption.
Definition at line 130 of file crypto_params.h.
bool shaka::EncryptionParams::generate_widevine_pssh = false |
When it is true, include a widevine PSSH box. A widevine PSSH is always generated regardless of the value of –generate_widevine_pssh for –enable_widevine_encryption.
Definition at line 134 of file crypto_params.h.
KeyProvider shaka::EncryptionParams::key_provider = KeyProvider::kNone |
Specifies the key provider, which determines which key provider is used and which encryption params is valid. 'kNone' means not to encrypt the streams.
Definition at line 116 of file crypto_params.h.
|
static |
Crypto period duration in seconds. A positive value means key rotation is enabled, the key provider must support key rotation in this case.
Definition at line 146 of file crypto_params.h.
std::function<std::string(const EncryptedStreamAttributes& stream_attributes)> shaka::EncryptionParams::stream_label_func |
Stream label function assigns a stream label to the stream to be encrypted. Stream label is used to associate KeyPair with streams. Streams with the same stream label always uses the same keyPair; Streams with different stream label could use the same or different KeyPairs. A default stream label function will be generated if not set.
Definition at line 181 of file crypto_params.h.