Shaka Packager SDK
Classes | Public Attributes | Static Public Attributes | List of all members
shaka::EncryptionParams Struct Reference

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
 

Detailed Description

Encryption parameters.

Definition at line 112 of file crypto_params.h.

Member Data Documentation

◆ generate_common_pssh

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.

◆ generate_playready_pssh

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.

◆ generate_widevine_pssh

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.

◆ key_provider

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.

◆ kNoKeyRotation

constexpr double shaka::EncryptionParams::kNoKeyRotation = 0
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.

◆ stream_label_func

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.


The documentation for this struct was generated from the following file: