-
Notifications
You must be signed in to change notification settings - Fork 1
/
packaging_params.h
54 lines (39 loc) · 1.21 KB
/
packaging_params.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef PACKAGING_PARAMS_H
#define PACKAGING_PARAMS_H
#include <stdbool.h>
typedef enum drmKeyProvider
{
dynaNoKey,
dynaRawKey,
dynaWidevine,
dynaPlayReady
} drmKeyProvider_t;
typedef enum drmProtectionScheme
{
dyna_CENC,
dyna_CENS,
dyna_CBC1,
dyna_CBCS
} drmProtectionScheme_t;
typedef struct drmParams
{
drmKeyProvider_t keyProvider; // e.g. KeyProvider::kRawKey
drmProtectionScheme_t protection_scheme; // e.g. EncryptionParams::kProtectionSchemeCbcs
char pssh[2000]; // hex string, e.g. "000000317073736800000000EDEF8BA979D64ACEA3C827DCD51D21ED00000011220F7465737420636F6E74656E74206964"
char iv[100]; // hex string, e.g. "73fbe3277bdf0bfc5217125bde4ca589"
char key_id[100]; // hex string, e.g. "abba271e8bcf552bbd2e86a434a9a5d9"
char key[100]; // hex string, e.g. "69eaa802a6763af979e8d1940fb88392"
} drmParams_t;
// Corresponds to StreamDescriptor in Shaka
typedef struct streamDescriptor
{
char stream_selector[20]; // e.g, "video" | "audio"
} streamDescriptor_t;
typedef struct packagingParams
{
double segment_duration_in_seconds;
streamDescriptor_t stream_descriptor;
bool isProtected;
drmParams_t drm_params;
} packagingParams_t;
#endif