|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
20 #ifndef _AAMP_DRM_HELPER_H
21 #define _AAMP_DRM_HELPER_H
31 #include <unordered_map>
47 std::shared_ptr<DrmData>
data;
59 AampLicenseRequest() : method(), url(), payload(), headers(),licenseAnonymousRequest(
false)
69 bool licenseAnonymousRequest;
72 std::unordered_map<std::string, std::vector<std::string>> headers;
82 const uint32_t TIMEOUT_SECONDS;
83 const std::string EMPTY_DRM_METADATA;
85 const std::string EMPTY_STRING;
87 AampDrmHelper(
const struct DrmInfo drmInfo,
AampLogManager *logObj) : mLogObj(logObj), mDrmInfo(drmInfo), TIMEOUT_SECONDS(5000U), EMPTY_DRM_METADATA(), EMPTY_STRING() ,bOutputProtectionEnabled(
false) {};
101 virtual void createInitData(std::vector<uint8_t>& initData)
const = 0;
109 virtual bool parsePssh(
const uint8_t* initData, uint32_t initDataLen) = 0;
167 virtual void getKey(std::vector<uint8_t>& keyID)
const = 0;
173 virtual void getKeys(std::map<
int, std::vector<uint8_t>>& keyIDs)
const {};
213 virtual bool compare(std::shared_ptr<AampDrmHelper> other);
230 virtual const std::string&
friendlyName()
const {
return EMPTY_STRING; }
242 bool bOutputProtectionEnabled;
265 virtual bool isDRM(
const struct DrmInfo& drmInfo)
const = 0;
279 virtual void appendSystemId(std::vector<std::string>& systemIds)
const = 0;
302 std::vector<AampDrmHelperFactory* > factories;
343 #endif //_AAMP_DRM_HELPER_H
virtual bool compare(std::shared_ptr< AampDrmHelper > other)
Compare against another helper instance.
virtual void appendSystemId(std::vector< std::string > &systemIds) const =0
Adds the system IDs supported by the DRM to a vector Used by the GStreamer plugins to advertise the D...
File holds DRM License data.
virtual bool isHdcp22Required() const
Determine whether HDCP 2.2 protection is required to be active.
static AampDrmHelperEngine & getInstance()
Get an instance of the DRM Helper Engine.
virtual const std::string & getUuid() const
Get the UUID.
virtual const std::string & friendlyName() const
Gets the friendly display name of the DRM.
virtual void transformLicenseResponse(std::shared_ptr< DrmData > licenseResponse) const
Transform the license response from the server into the necessary format for OCDM.
AampDrmHelperFactory(int weighting=DEFAULT_WEIGHTING)
AampDrmHelperFactory constructor.
virtual void generateLicenseRequest(const AampChallengeInfo &challengeInfo, AampLicenseRequest &licenseRequest) const =0
Generate the request details for the DRM license.
std::shared_ptr< DrmData > data
virtual uint32_t licenseGenerateTimeout() const
Get the amount of time in milliseconds to wait before aborting the wait for the license_challenge mes...
int getWeighting()
Get the weighting for this helper factory, which determines its priority.
virtual bool isExternalLicense() const
Determines if the DRM itself fetches the license or if AAMP should use its own internal HTTP client t...
static const int DEFAULT_WEIGHTING
Default weighting of a helper factory. Nominal scale of 0 to DEFAULT_WEIGHTING * 2 Larger weightings ...
DRM license information for Aamp.
Holds the data to get the License.
DRM information required to decrypt.
virtual void getKeys(std::map< int, std::vector< uint8_t >> &keyIDs) const
Get the key IDs.
virtual AAMPMemorySystem * getMemorySystem()
Get the memory system used to transform data for transmission.
virtual const std::string & ocdmSystemId() const =0
Returns the OCDM system ID of the helper.
virtual int getDrmCodecType() const
Returns the DRM codec type for the helper, used in trace.
virtual void setDrmMetaData(const std::string &metaData)
Sets the content specific DRM metadata.
virtual void cancelDrmSession()
Cancels a DRM session.
Helper Engine for Aamp DRM operations.
Context-free common utility functions.
Helper class to Maintain DRM data.
virtual bool isClearDecrypt() const =0
Determine if the DRM system needs to be in the clear or encrypted.
virtual bool parsePssh(const uint8_t *initData, uint32_t initDataLen)=0
Parse the optional PSSH data.
virtual bool isDRM(const struct DrmInfo &drmInfo) const =0
Determines if a helper class provides the identified DRM.
virtual std::shared_ptr< AampDrmHelper > createHelper(const struct DrmInfo &drmInfo, AampLogManager *logObj=NULL) const =0
Build a helper class to support the identified DRM.
virtual const std::string & getDrmMetaData() const
Returns the content specific DRM metadata.
virtual uint32_t keyProcessTimeout() const
Get the amount of time in milliseconds to wait before aborting the wait for the key_updated message t...
virtual void getKey(std::vector< uint8_t > &keyID) const =0
Get the key ID.
virtual void createInitData(std::vector< uint8_t > &initData) const =0
bool hasDRM(const struct DrmInfo &drmInfo) const
Determines whether the helper engine has a DRM helper available for the specified DrmInfo.
Memory handler for Aamp DRM process.
void setOutputProtectionFlag(bool bValue)
Set Output protection flag for the drmHelper.
virtual void setDefaultKeyID(const std::string &cencData)
Sets the defualt keyID.
void getSystemIds(std::vector< std::string > &ids) const
Get the supported OCDM system IDs.
AampDRM helper to handle DRM operations.
void registerFactory(AampDrmHelperFactory *factory)
Register a Helper Factory.
Handles the operations for AAMP memory managemnts.
Aamp challenge info to get the License.
AampDrmHelperEngine()
AampDrmHelperEngine constructor.
std::shared_ptr< AampDrmHelper > createHelper(const struct DrmInfo &drmInfo, AampLogManager *logObj=NULL) const
Build a helper class to support the identified DRM.
virtual bool canCancelDrmSession()
Checks if the helper can cancel a session, or if the caller should do it.