Shaka Packager SDK
Classes | Public Types | 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 Types

enum  ProtectionSystem { kCommonSystem, kFairPlay, kPlayReady, kWidevine }
 Supported protection systems.
 

Public Attributes

KeyProvider key_provider = KeyProvider::kNone
 
WidevineEncryptionParams widevine
 
PlayReadyEncryptionParams playready
 
RawKeyParams raw_key
 
std::vector< ProtectionSystemprotection_systems
 Protection systems to be generated.
 
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 108 of file crypto_params.h.

Member Data Documentation

◆ 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 112 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 138 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 173 of file crypto_params.h.


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