26 #ifndef AampDrmSession_h
27 #define AampDrmSession_h
38 #define PLAYREADY_PROTECTION_SYSTEM_ID "9a04f079-9840-4286-ab92-e65be0885f95"
39 #define WIDEVINE_PROTECTION_SYSTEM_ID "edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
40 #define CLEARKEY_PROTECTION_SYSTEM_ID "1077efec-c0b2-4d02-ace3-3c1e52e2fb4b"
41 #define VERIMATRIX_PROTECTION_SYSTEM_ID "9a27dd82-fde2-4725-8cbc-4234aa06ec09"
43 #define PLAYREADY_KEY_SYSTEM_STRING "com.microsoft.playready"
44 #define WIDEVINE_KEY_SYSTEM_STRING "com.widevine.alpha"
45 #define CLEAR_KEY_SYSTEM_STRING "org.w3.clearkey"
46 #define VERIMATRIX_KEY_SYSTEM_STRING "com.verimatrix.ott"
48 #define HDCP_COMPLIANCE_CHECK_FAILURE 4327
49 #define HDCP_OUTPUT_PROTECTION_FAILURE 4427
72 std::string m_keySystem;
73 bool m_OutputProtectionEnabled;
84 virtual void generateAampDRMSession(
const uint8_t *f_pbInitData,uint32_t f_cbInitData, std::string &customData ) = 0;
93 virtual DrmData* aampGenerateKeyRequest(
string& destinationURL, uint32_t timeout) = 0;
101 virtual int aampDRMProcessKey(
DrmData* key, uint32_t timeout) = 0;
113 virtual int decrypt(GstBuffer* keyIDBuffer, GstBuffer* ivBuffer, GstBuffer* buffer,
unsigned subSampleCount, GstBuffer* subSamplesBuffer, GstCaps* caps = NULL);
124 virtual int decrypt(
const uint8_t *f_pbIV, uint32_t f_cbIV,
const uint8_t *payloadData, uint32_t payloadDataSize, uint8_t **ppOpaqueData);
145 virtual void clearDecryptContext() = 0;
171 string getKeySystem();
179 #if defined(USE_OPENCDM_ADAPTER)
180 virtual void setKeyId(
const std::vector<uint8_t>& keyId) {};
182 #ifdef USE_SECMANAGER
183 void setSessionId(int64_t sessionId);
184 int64_t getSessionId()
const {
return mSessionId; }