RDK Documentation (Open Sourced RDK Components)
AampWidevineDrmHelper Class Reference

Handles the operation for Wide vine DRM operation. More...

#include <AampWidevineDrmHelper.h>

Inheritance diagram for AampWidevineDrmHelper:
Inheritance graph
Collaboration diagram for AampWidevineDrmHelper:
Collaboration graph

Public Member Functions

virtual const std::string & ocdmSystemId () const
 Returns the OCDM system ID of the helper. More...
 
void createInitData (std::vector< uint8_t > &initData) const
 
bool parsePssh (const uint8_t *initData, uint32_t initDataLen)
 Parse the optional PSSH data. More...
 
bool isClearDecrypt () const
 Determine if the DRM system needs to be in the clear or encrypted. More...
 
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...
 
void getKey (std::vector< uint8_t > &keyID) const
 Get the key ID. More...
 
void getKeys (std::map< int, std::vector< uint8_t >> &keyIDs) const
 Get the key IDs. More...
 
const std::string & getDrmMetaData () const
 Returns the content specific DRM metadata. More...
 
void setDrmMetaData (const std::string &metaData)
 Sets the content specific DRM metadata. More...
 
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...
 
void generateLicenseRequest (const AampChallengeInfo &challengeInfo, AampLicenseRequest &licenseRequest) const
 Generate the request details for the DRM license. More...
 
virtual const std::string & friendlyName () const override
 Gets the friendly display name of the DRM. More...
 
 AampWidevineDrmHelper (const struct DrmInfo &drmInfo, AampLogManager *logObj)
 
- Public Member Functions inherited from AampDrmHelper
 AampDrmHelper (const struct DrmInfo drmInfo, AampLogManager *logObj)
 
 AampDrmHelper (const AampDrmHelper &)=delete
 
AampDrmHelperoperator= (const AampDrmHelper &)=delete
 
virtual bool isHdcp22Required () const
 Determine whether HDCP 2.2 protection is required to be active. 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 const std::string & getUuid () const
 Get the UUID. 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...
 
void setOutputProtectionFlag (bool bValue)
 Set Output protection flag for the drmHelper. More...
 

Private Attributes

const std::string FRIENDLY_NAME
 
const int CODEC_TYPE
 
const uint8_t WIDEVINE_KEY_ID_SIZE_INDICATOR
 
const size_t WIDEVINE_DASH_KEY_ID_OFFSET
 
const uint8_t WIDEVINE_CONTENT_METADATA_OFFSET
 
const uint8_t WIDEVINE_PSSH_DATA_VERSION_POSITION
 
const uint8_t WIDEVINE_PSSH_KEYID_SIZE_OFFSET
 
const uint8_t WIDEVINE_PSSH_KEYID_SIZE_OFFSET_WITH_AUTHOR
 
const uint8_t WIDEVINE_PSSH_VER1_KEY_ID_SIZE
 
std::vector< uint8_t > mInitData
 
std::vector< uint8_t > mKeyID
 
std::map< int, std::vector< uint8_t > > mKeyIDs
 
std::string mContentMetadata
 
int mDefaultKeySlot
 

Static Private Attributes

static const std::string WIDEVINE_OCDM_ID = "com.widevine.alpha"
 

Friends

class AampWidevineDrmHelperFactory
 

Additional Inherited Members

- Data Fields inherited from AampDrmHelper
const uint32_t TIMEOUT_SECONDS
 
const std::string EMPTY_DRM_METADATA
 
const std::string EMPTY_STRING
 
AampLogManagermLogObj
 
- Protected Attributes inherited from AampDrmHelper
const DrmInfo mDrmInfo
 
bool bOutputProtectionEnabled
 

yes

Handles the operation for Wide vine DRM operation.

Definition at line 40 of file AampWidevineDrmHelper.h.

Member Function Documentation

◆ ocdmSystemId()

const std::string & AampWidevineDrmHelper::ocdmSystemId ( ) const
virtual

Returns the OCDM system ID of the helper.

Returns
the OCDM system ID

Implements AampDrmHelper.

Definition at line 195 of file AampWidevineDrmHelper.cpp.

◆ createInitData()

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

Implements AampDrmHelper.

Definition at line 200 of file AampWidevineDrmHelper.cpp.

◆ parsePssh()

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

Parse the optional PSSH data.

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

Implements AampDrmHelper.

Definition at line 37 of file AampWidevineDrmHelper.cpp.

◆ isClearDecrypt()

bool AampWidevineDrmHelper::isClearDecrypt ( ) const
inlinevirtual

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

Implements AampDrmHelper.

Definition at line 51 of file AampWidevineDrmHelper.h.

◆ isExternalLicense()

bool AampWidevineDrmHelper::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 from AampDrmHelper.

Definition at line 53 of file AampWidevineDrmHelper.h.

◆ getKey()

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

Get the key ID.

Parameters
keyIDThe key ID as a vector of binary data

Implements AampDrmHelper.

Definition at line 205 of file AampWidevineDrmHelper.cpp.

◆ getKeys()

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

Get the key IDs.

Parameters
keyIDsThe map containing Key ID vector of binary data

Reimplemented from AampDrmHelper.

Definition at line 222 of file AampWidevineDrmHelper.cpp.

◆ getDrmMetaData()

const std::string& AampWidevineDrmHelper::getDrmMetaData ( ) const
inlinevirtual

Returns the content specific DRM metadata.

Returns
the DRM metadata

Reimplemented from AampDrmHelper.

Definition at line 59 of file AampWidevineDrmHelper.h.

◆ setDrmMetaData()

void AampWidevineDrmHelper::setDrmMetaData ( const std::string &  metaData)
virtual

Sets the content specific DRM metadata.

Parameters
theDRM metadata

Reimplemented from AampDrmHelper.

Definition at line 173 of file AampWidevineDrmHelper.cpp.

◆ setDefaultKeyID()

void AampWidevineDrmHelper::setDefaultKeyID ( const std::string &  cencData)
virtual

Sets the defualt keyID.

Parameters
theDRM cencData data

Reimplemented from AampDrmHelper.

Definition at line 178 of file AampWidevineDrmHelper.cpp.

◆ getDrmCodecType()

virtual int AampWidevineDrmHelper::getDrmCodecType ( ) const
inlinevirtual

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

Returns
the DRM codec type

Reimplemented from AampDrmHelper.

Definition at line 65 of file AampWidevineDrmHelper.h.

◆ generateLicenseRequest()

void AampWidevineDrmHelper::generateLicenseRequest ( const AampChallengeInfo challengeInfo,
AampLicenseRequest licenseRequest 
) const
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

Implements AampDrmHelper.

Definition at line 227 of file AampWidevineDrmHelper.cpp.

◆ friendlyName()

virtual const std::string& AampWidevineDrmHelper::friendlyName ( ) const
inlineoverridevirtual

Gets the friendly display name of the DRM.

Returns
friendly name

Reimplemented from AampDrmHelper.

Definition at line 69 of file AampWidevineDrmHelper.h.


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