RDK Documentation (Open Sourced RDK Components)
AampDrmHelper Class Referenceabstract

AampDRM helper to handle DRM operations. More...

#include <AampDrmHelper.h>

Inheritance diagram for AampDrmHelper:
Inheritance graph
Collaboration diagram for AampDrmHelper:
Collaboration graph

Public Member Functions

 AampDrmHelper (const struct DrmInfo drmInfo, AampLogManager *logObj)
 
 AampDrmHelper (const AampDrmHelper &)=delete
 
AampDrmHelperoperator= (const AampDrmHelper &)=delete
 
virtual const std::string & ocdmSystemId () const =0
 Returns the OCDM system ID of the helper. More...
 
virtual void createInitData (std::vector< uint8_t > &initData) const =0
 
virtual bool parsePssh (const uint8_t *initData, uint32_t initDataLen)=0
 Parse the optional PSSH data. More...
 
virtual bool isClearDecrypt () const =0
 Determine if the DRM system needs to be in the clear or encrypted. More...
 
virtual bool isHdcp22Required () const
 Determine whether HDCP 2.2 protection is required to be active. More...
 
virtual const std::string & getDrmMetaData () const
 Returns the content specific DRM metadata. More...
 
virtual void setDrmMetaData (const std::string &metaData)
 Sets the content specific DRM metadata. More...
 
virtual void setDefaultKeyID (const std::string &cencData)
 Sets the defualt keyID. More...
 
virtual int getDrmCodecType () const
 Returns the DRM codec type for the helper, used in trace. More...
 
virtual uint32_t licenseGenerateTimeout () const
 Get the amount of time in milliseconds to wait before aborting the wait for the license_challenge message to be received Default is TWO Seconds - 2000. More...
 
virtual uint32_t keyProcessTimeout () const
 Get the amount of time in milliseconds to wait before aborting the wait for the key_updated message to be received Default is TWO Seconds - 2000. More...
 
virtual void getKey (std::vector< uint8_t > &keyID) const =0
 Get the key ID. More...
 
virtual void getKeys (std::map< int, std::vector< uint8_t >> &keyIDs) const
 Get the key IDs. More...
 
virtual const std::string & getUuid () const
 Get the UUID. More...
 
virtual bool isExternalLicense () const
 Determines if the DRM itself fetches the license or if AAMP should use its own internal HTTP client to fetch the license Returning 'true' removes AAMP calling generateLicenseRequest() on the CDM Default is to return false. More...
 
virtual void generateLicenseRequest (const AampChallengeInfo &challengeInfo, AampLicenseRequest &licenseRequest) const =0
 Generate the request details for the DRM license. More...
 
virtual void transformLicenseResponse (std::shared_ptr< DrmData > licenseResponse) const
 Transform the license response from the server into the necessary format for OCDM. More...
 
virtual AAMPMemorySystemgetMemorySystem ()
 Get the memory system used to transform data for transmission. More...
 
virtual bool compare (std::shared_ptr< AampDrmHelper > other)
 Compare against another helper instance. More...
 
virtual void cancelDrmSession ()
 Cancels a DRM session.
 
virtual bool canCancelDrmSession ()
 Checks if the helper can cancel a session, or if the caller should do it. More...
 
virtual const std::string & friendlyName () const
 Gets the friendly display name of the DRM. More...
 
void setOutputProtectionFlag (bool bValue)
 Set Output protection flag for the drmHelper. More...
 

Data Fields

const uint32_t TIMEOUT_SECONDS
 
const std::string EMPTY_DRM_METADATA
 
const std::string EMPTY_STRING
 
AampLogManagermLogObj
 

Protected Attributes

const DrmInfo mDrmInfo
 
bool bOutputProtectionEnabled
 

yes

AampDRM helper to handle DRM operations.

Definition at line 79 of file AampDrmHelper.h.

Member Function Documentation

◆ ocdmSystemId()

virtual const std::string& AampDrmHelper::ocdmSystemId ( ) const
pure virtual

Returns the OCDM system ID of the helper.

Returns
the OCDM system ID

Implemented in AampVgdrmHelper, AampWidevineDrmHelper, AampPlayReadyHelper, AampVanillaDrmHelper, AampClearKeyHelper, and AampVerimatrixHelper.

◆ createInitData()

virtual void AampDrmHelper::createInitData ( std::vector< uint8_t > &  initData) const
pure virtual
Parameters
initDatathe Init Data to send to the CDM

Implemented in AampVanillaDrmHelper, AampVgdrmHelper, AampWidevineDrmHelper, AampPlayReadyHelper, AampClearKeyHelper, and AampVerimatrixHelper.

◆ parsePssh()

virtual bool AampDrmHelper::parsePssh ( const uint8_t *  initData,
uint32_t  initDataLen 
)
pure virtual

Parse the optional PSSH data.

Parameters
initDataThe init data from the PSSH
initDataLenthe length of initData
Returns

Implemented in AampVgdrmHelper, AampWidevineDrmHelper, AampPlayReadyHelper, AampVanillaDrmHelper, AampClearKeyHelper, and AampVerimatrixHelper.

◆ isClearDecrypt()

virtual bool AampDrmHelper::isClearDecrypt ( ) const
pure virtual

Determine if the DRM system needs to be in the clear or encrypted.

Returns
true if the data is clear, false if it should remain in the TEE

Implemented in AampVanillaDrmHelper, AampVgdrmHelper, AampWidevineDrmHelper, AampPlayReadyHelper, AampClearKeyHelper, and AampVerimatrixHelper.

◆ isHdcp22Required()

virtual bool AampDrmHelper::isHdcp22Required ( ) const
inlinevirtual

Determine whether HDCP 2.2 protection is required to be active.

Returns
true if HDCP 2.2 protection is required, false otherwise

Reimplemented in AampVgdrmHelper, and AampPlayReadyHelper.

Definition at line 121 of file AampDrmHelper.h.

◆ getDrmMetaData()

virtual const std::string& AampDrmHelper::getDrmMetaData ( ) const
inlinevirtual

Returns the content specific DRM metadata.

Returns
the DRM metadata

Reimplemented in AampPlayReadyHelper, AampWidevineDrmHelper, and AampVerimatrixHelper.

Definition at line 127 of file AampDrmHelper.h.

◆ setDrmMetaData()

virtual void AampDrmHelper::setDrmMetaData ( const std::string &  metaData)
inlinevirtual

Sets the content specific DRM metadata.

Parameters
theDRM metadata

Reimplemented in AampWidevineDrmHelper, AampPlayReadyHelper, AampVanillaDrmHelper, and AampVerimatrixHelper.

Definition at line 133 of file AampDrmHelper.h.

◆ setDefaultKeyID()

virtual void AampDrmHelper::setDefaultKeyID ( const std::string &  cencData)
inlinevirtual

Sets the defualt keyID.

Parameters
theDRM cencData data

Reimplemented in AampWidevineDrmHelper.

Definition at line 139 of file AampDrmHelper.h.

◆ getDrmCodecType()

virtual int AampDrmHelper::getDrmCodecType ( ) const
inlinevirtual

Returns the DRM codec type for the helper, used in trace.

Returns
the DRM codec type

Reimplemented in AampWidevineDrmHelper, AampVgdrmHelper, AampPlayReadyHelper, AampVanillaDrmHelper, AampClearKeyHelper, and AampVerimatrixHelper.

Definition at line 145 of file AampDrmHelper.h.

◆ licenseGenerateTimeout()

virtual uint32_t AampDrmHelper::licenseGenerateTimeout ( ) const
inlinevirtual

Get the amount of time in milliseconds to wait before aborting the wait for the license_challenge message to be received Default is TWO Seconds - 2000.

Returns
the time to wait in milliseconds

Reimplemented in AampVgdrmHelper.

Definition at line 153 of file AampDrmHelper.h.

◆ keyProcessTimeout()

virtual uint32_t AampDrmHelper::keyProcessTimeout ( ) const
inlinevirtual

Get the amount of time in milliseconds to wait before aborting the wait for the key_updated message to be received Default is TWO Seconds - 2000.

Returns
the time to wait in milliseconds

Reimplemented in AampVgdrmHelper.

Definition at line 161 of file AampDrmHelper.h.

◆ getKey()

virtual void AampDrmHelper::getKey ( std::vector< uint8_t > &  keyID) const
pure virtual

Get the key ID.

Parameters
keyIDThe key ID as a vector of binary data

Implemented in AampVanillaDrmHelper, AampVgdrmHelper, AampWidevineDrmHelper, AampPlayReadyHelper, AampClearKeyHelper, and AampVerimatrixHelper.

◆ getKeys()

virtual void AampDrmHelper::getKeys ( std::map< int, std::vector< uint8_t >> &  keyIDs) const
inlinevirtual

Get the key IDs.

Parameters
keyIDsThe map containing Key ID vector of binary data

Reimplemented in AampWidevineDrmHelper.

Definition at line 173 of file AampDrmHelper.h.

◆ getUuid()

virtual const std::string& AampDrmHelper::getUuid ( ) const
inlinevirtual

Get the UUID.

Returns
the UUID

Definition at line 179 of file AampDrmHelper.h.

◆ isExternalLicense()

virtual bool AampDrmHelper::isExternalLicense ( ) const
inlinevirtual

Determines if the DRM itself fetches the license or if AAMP should use its own internal HTTP client to fetch the license Returning 'true' removes AAMP calling generateLicenseRequest() on the CDM Default is to return false.

Returns
true if the DRM acquires the license, false if AAMP should do it

Reimplemented in AampVgdrmHelper, AampVanillaDrmHelper, AampWidevineDrmHelper, and AampVerimatrixHelper.

Definition at line 188 of file AampDrmHelper.h.

◆ generateLicenseRequest()

virtual void AampDrmHelper::generateLicenseRequest ( const AampChallengeInfo challengeInfo,
AampLicenseRequest licenseRequest 
) const
pure virtual

Generate the request details for the DRM license.

Parameters
challengeInfochallenge information from the DRM system necessary to construct the license request
licenseRequestlicense request data to populate

Implemented in AampWidevineDrmHelper, AampVgdrmHelper, AampPlayReadyHelper, AampVanillaDrmHelper, AampClearKeyHelper, and AampVerimatrixHelper.

◆ transformLicenseResponse()

virtual void AampDrmHelper::transformLicenseResponse ( std::shared_ptr< DrmData licenseResponse) const
inlinevirtual

Transform the license response from the server into the necessary format for OCDM.

Parameters
licenseResponselicense response from the server to transform

Reimplemented in AampClearKeyHelper, and AampVerimatrixHelper.

Definition at line 201 of file AampDrmHelper.h.

◆ getMemorySystem()

virtual AAMPMemorySystem* AampDrmHelper::getMemorySystem ( )
inlinevirtual

Get the memory system used to transform data for transmission.

Returns
the memory system, or null if to send it as is to the ocdm wrapper

Reimplemented in AampVgdrmHelper.

Definition at line 207 of file AampDrmHelper.h.

◆ compare()

AampDrmHelper::compare ( std::shared_ptr< AampDrmHelper other)
virtual

Compare against another helper instance.

Returns
true if the two helpers can be considered the same, false otherwise

Definition at line 34 of file AampDrmHelper.cpp.

◆ canCancelDrmSession()

virtual bool AampDrmHelper::canCancelDrmSession ( )
inlinevirtual

Checks if the helper can cancel a session, or if the caller should do it.

Returns
true if the helper can cancel

Definition at line 224 of file AampDrmHelper.h.

◆ friendlyName()

virtual const std::string& AampDrmHelper::friendlyName ( ) const
inlinevirtual

Gets the friendly display name of the DRM.

Returns
friendly name

Reimplemented in AampVgdrmHelper, AampWidevineDrmHelper, AampPlayReadyHelper, AampVanillaDrmHelper, AampClearKeyHelper, and AampVerimatrixHelper.

Definition at line 230 of file AampDrmHelper.h.

◆ setOutputProtectionFlag()

void AampDrmHelper::setOutputProtectionFlag ( bool  bValue)
inline

Set Output protection flag for the drmHelper.

Returns
None

Definition at line 236 of file AampDrmHelper.h.


The documentation for this class was generated from the following files: