Skip to content

Commit

Permalink
Support widevine
Browse files Browse the repository at this point in the history
Tracked-On: OAM-120419
Signed-off-by: Nana Zhang <nana.zhang@intel.com>
  • Loading branch information
kkkuangzh committed Feb 27, 2025
1 parent c9dc3b9 commit 952eaf3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions api/vpl/mfxstructures.h
Original file line number Diff line number Diff line change
Expand Up @@ -2453,6 +2453,14 @@ enum {
See the mfxExtAlphaChannelSurface structure for more details.
*/
MFX_EXTBUFF_ALPHA_CHANNEL_SURFACE = MFX_MAKEFOURCC('A', 'C', 'S', 'F'),
/*!
See the mfxExtDecryptConfig structure for more details.
*/
MFX_EXTBUFF_DECRYPT_CONFIG = MFX_MAKEFOURCC('D', 'E', 'C', 'R'),
/*!
See the mfxExtSecureCodec structure for more details.
*/
MFX_EXTBUFF_SECURE_CODEC = MFX_MAKEFOURCC('S', 'E', 'C', 'U'),
};

/* VPP Conf: Do not use certain algorithms */
Expand Down Expand Up @@ -5132,6 +5140,39 @@ typedef struct {
MFX_PACK_END()
#endif

enum struct EncryptionScheme {
kUnencrypted = 0,
kCenc, // 'cenc' subsample encryption using AES-CTR mode.
kCbcs, // 'cbcs' pattern encryption using AES-CBC mode.
kMaxValue = kCbcs
};

typedef struct {
mfxU32 clear_bytes;
mfxU32 cypher_bytes;
} SubsampleEntry;

typedef struct {
mfxU32 clear_byte_block;
mfxU32 cypher_byte_block;
} EncryptionPattern;

typedef struct {
mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_DECRYPT_CONFIG. */
EncryptionScheme encryption_scheme;
mfxU8 hw_key_id[16];
mfxU8 iv[16];
mfxU32 session;
EncryptionPattern pattern;
mfxU32 num_subsamples;
SubsampleEntry *subsamples;
} mfxExtDecryptConfig;

typedef struct {
mfxExtBuffer Header;
mfxU8 on;
} mfxExtSecureCodec;

/*! The mfxAISuperResolutionMode enumerator specifies the mode of AI based super resolution. */
typedef enum {
MFX_AI_SUPER_RESOLUTION_MODE_DISABLED = 0, /*!< Super Resolution is disabled.*/
Expand Down

0 comments on commit 952eaf3

Please sign in to comment.