19 #ifndef _AAMP_WIDEVINE_DRM_HELPER_H
20 #define _AAMP_WIDEVINE_DRM_HELPER_H
31 #define KEYID_MARKER 0x12
32 #define CONTENTID_MARKER 0x22
33 #define DATA_LENGTH_FIELD_SIZE 2
49 bool parsePssh(
const uint8_t* initData, uint32_t initDataLen);
55 void getKey(std::vector<uint8_t>& keyID)
const;
57 void getKeys(std::map<
int, std::vector<uint8_t>>& keyIDs)
const;
69 virtual const std::string&
friendlyName()
const override {
return FRIENDLY_NAME; };
72 CODEC_TYPE(1), WIDEVINE_KEY_ID_SIZE_INDICATOR(0x12), WIDEVINE_DASH_KEY_ID_OFFSET(32u),
73 WIDEVINE_CONTENT_METADATA_OFFSET(28u), mInitData(), mKeyID(), mKeyIDs(), mContentMetadata()
74 ,WIDEVINE_PSSH_DATA_VERSION_POSITION(8u), WIDEVINE_PSSH_KEYID_SIZE_OFFSET(32u),
75 WIDEVINE_PSSH_KEYID_SIZE_OFFSET_WITH_AUTHOR(34u), WIDEVINE_PSSH_VER1_KEY_ID_SIZE(16u)
82 static const std::string WIDEVINE_OCDM_ID;
83 const std::string FRIENDLY_NAME;
85 const uint8_t WIDEVINE_KEY_ID_SIZE_INDICATOR;
86 const size_t WIDEVINE_DASH_KEY_ID_OFFSET;
87 const uint8_t WIDEVINE_CONTENT_METADATA_OFFSET;
88 const uint8_t WIDEVINE_PSSH_DATA_VERSION_POSITION;
89 const uint8_t WIDEVINE_PSSH_KEYID_SIZE_OFFSET;
90 const uint8_t WIDEVINE_PSSH_KEYID_SIZE_OFFSET_WITH_AUTHOR;
91 const uint8_t WIDEVINE_PSSH_VER1_KEY_ID_SIZE;
93 std::vector<uint8_t> mInitData;
94 std::vector<uint8_t> mKeyID;
95 std::map<int,std::vector<uint8_t>> mKeyIDs;
96 std::string mContentMetadata;
114 #endif //_AAMP_WIDEVINE_DRM_HELPER_H