Source release 16.4.0
This commit is contained in:
@@ -42,25 +42,25 @@ class CDM_EXPORT ITimerClient {
|
||||
class CDM_EXPORT Cdm : public ITimerClient {
|
||||
public:
|
||||
// Session types defined by EME.
|
||||
typedef enum {
|
||||
enum SessionType : int32_t {
|
||||
kTemporary = 0,
|
||||
kPersistentLicense = 1,
|
||||
kPersistent = kPersistentLicense, // deprecated name from June 1 draft
|
||||
kPersistentUsageRecord = 2,
|
||||
} SessionType;
|
||||
};
|
||||
|
||||
// Message types defined by EME.
|
||||
typedef enum {
|
||||
enum MessageType : int32_t {
|
||||
kLicenseRequest = 0,
|
||||
kLicenseRenewal = 1,
|
||||
kLicenseRelease = 2,
|
||||
kIndividualizationRequest = 3, // Not used. Direct Individualization
|
||||
// is used instead of App-Assisted
|
||||
} MessageType;
|
||||
};
|
||||
|
||||
// Status codes returned by CDM functions.
|
||||
//
|
||||
typedef enum {
|
||||
enum Status : int32_t {
|
||||
kSuccess = 0,
|
||||
|
||||
// These are analogous to the exceptions defined in the EME specification.
|
||||
@@ -94,27 +94,27 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
|
||||
// This covers errors that we do not expect (see logs for details):
|
||||
kUnexpectedError = 99999,
|
||||
} Status;
|
||||
};
|
||||
|
||||
// These are the init data types defined by EME.
|
||||
typedef enum {
|
||||
enum InitDataType : int32_t {
|
||||
kCenc = 0,
|
||||
kKeyIds = 1, // NOTE: not supported by Widevine at this time
|
||||
kWebM = 2,
|
||||
|
||||
// This type is not defined by EME but is supported by Widevine
|
||||
kHls = 10000,
|
||||
} InitDataType;
|
||||
};
|
||||
|
||||
// These are the crypto schemes supported by CENC 3.0.
|
||||
typedef enum {
|
||||
enum EncryptionScheme : int32_t {
|
||||
kClear = 0,
|
||||
kAesCtr = 1, // AES-CTR, for use with the "cenc" schema
|
||||
kAesCbc = 2, // AES-CBC, for use with the "cbcs" schema
|
||||
} EncryptionScheme;
|
||||
};
|
||||
|
||||
// These are key statuses defined by EME.
|
||||
typedef enum {
|
||||
enum KeyStatus : int32_t {
|
||||
kUsable = 0,
|
||||
kExpired = 1,
|
||||
kOutputRestricted = 2,
|
||||
@@ -122,18 +122,18 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
kStatusPending = 3,
|
||||
kInternalError = 4,
|
||||
kReleased = 5,
|
||||
} KeyStatus;
|
||||
};
|
||||
|
||||
// These are the possible HDCP levels supported by Widevine.
|
||||
// For ease of comparison, these values are kept in ascending order by version
|
||||
// number.
|
||||
typedef enum {
|
||||
enum HdcpVersion : int32_t {
|
||||
kHdcp1_x = 0,
|
||||
kHdcp2_0 = 1,
|
||||
kHdcp2_1 = 2,
|
||||
kHdcp2_2 = 3,
|
||||
kHdcp2_3 = 4,
|
||||
} HdcpVersion;
|
||||
};
|
||||
|
||||
// Permissible usages for a key. Returned as a set of flags; multiple
|
||||
// flags may be set. The specific settings are defined in the license
|
||||
@@ -150,7 +150,7 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
|
||||
// These are defined by Widevine. The CDM can be configured to decrypt in
|
||||
// three modes (dependent on OEMCrypto support).
|
||||
typedef enum {
|
||||
enum SecureOutputType : int32_t {
|
||||
// Data is decrypted to an opaque handle.
|
||||
// Translates to OEMCrypto's OEMCrypto_BufferType_Secure.
|
||||
kOpaqueHandle = 0,
|
||||
@@ -164,35 +164,35 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
// clear buffer in main memory.
|
||||
// Translates to OEMCrypto's OEMCrypto_BufferType_Clear.
|
||||
kNoSecureOutput = 2,
|
||||
} SecureOutputType;
|
||||
};
|
||||
|
||||
// Logging levels defined by Widevine.
|
||||
// See Cdm::initialize().
|
||||
typedef enum {
|
||||
enum LogLevel : int32_t {
|
||||
kSilent = -1,
|
||||
kErrors = 0,
|
||||
kWarnings = 1,
|
||||
kInfo = 2,
|
||||
kDebug = 3,
|
||||
kVerbose = 4,
|
||||
} LogLevel;
|
||||
};
|
||||
|
||||
// Types of service defined by Widevine.
|
||||
// The service certificate installation methods - Cdm::setServiceCertificate()
|
||||
// and Cdm::parseAndLoadServiceCertificateResponse() - use these to identify
|
||||
// which service the certificate is intended for.
|
||||
typedef enum {
|
||||
enum ServiceRole : int32_t {
|
||||
kAllServices = 0,
|
||||
kProvisioningService = 1,
|
||||
kLicensingService = 2,
|
||||
} ServiceRole;
|
||||
};
|
||||
|
||||
// These are the available Widevine robustness levels.
|
||||
typedef enum {
|
||||
enum RobustnessLevel : int32_t {
|
||||
kL1 = 1,
|
||||
kL2 = 2,
|
||||
kL3 = 3,
|
||||
} RobustnessLevel;
|
||||
};
|
||||
|
||||
// A map of key statuses.
|
||||
// See Cdm::getKeyStatuses().
|
||||
@@ -788,15 +788,15 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
// Generic crypto - functions for applying crypto operations to
|
||||
// app-level data (outside the content stream).
|
||||
|
||||
typedef enum {
|
||||
enum GenericEncryptionAlgorithmType : int32_t {
|
||||
kEncryptionAlgorithmUnknown,
|
||||
kEncryptionAlgorithmAesCbc128,
|
||||
} GenericEncryptionAlgorithmType;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
enum GenericSigningAlgorithmType : int32_t {
|
||||
kSigningAlgorithmUnknown,
|
||||
kSigningAlgorithmHmacSha256
|
||||
} GenericSigningAlgorithmType;
|
||||
};
|
||||
|
||||
// Encrypts a buffer of app-level data.
|
||||
virtual Status genericEncrypt(const std::string& session_id,
|
||||
|
||||
Reference in New Issue
Block a user