Group license support

This commit is contained in:
Lu Chen
2021-03-05 16:09:59 -08:00
parent 00785b2ccd
commit 5c81c1aa9e
30 changed files with 1236 additions and 585 deletions

View File

@@ -49,16 +49,15 @@ class WidevineCasSession {
CasStatus initialize(std::shared_ptr<CryptoSession> crypto_session,
CasEventListener* event_listener, uint32_t* session_id);
// Get the current key information. This method will be used by a descrambler
// plugin to obtain the current key information.
const KeySlot& key(KeySlotId slot_id) const;
// Process an ecm and extract the key slot data. Extracted data will be used
// to update |current_ecm_| and |entitlement_key_id_| and |keys_|.
// |parental_control_age| (if non-zero) must be greater or equal to the
// age_restriction field specified in |ecm|. Otherwise, ECM will not be
// processed and error will be returned.
virtual CasStatus processEcm(const CasEcm& ecm, uint8_t parental_control_age);
// |license_group_id| if non empty, processEcm will decrypt content keys that
// are specified by |license_group_id|.
virtual CasStatus processEcm(const CasEcm& ecm, uint8_t parental_control_age,
const std::string& license_group_id);
// Returns the security level retrieved from OEMCrypto.
const char* securityLevel();
@@ -71,8 +70,7 @@ class WidevineCasSession {
private:
// Creates an EcmParser.
virtual std::unique_ptr<const EcmParser> getEcmParser(
const CasEcm& ecm) const;
virtual std::unique_ptr<EcmParser> getEcmParser(const CasEcm& ecm) const;
CasKeySlotData keys_; // Odd and even key slots.
std::string entitlement_key_id_;