RDK Documentation (Open Sourced RDK Components)
|
Handles the operation for Play ready DRM operations. More...
#include <AampPlayReadyHelper.h>
Public Member Functions | |
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 | isHdcp22Required () const |
Determine whether HDCP 2.2 protection is required to be active. More... | |
void | setDrmMetaData (const std::string &metaData) |
Sets the content specific DRM metadata. More... | |
void | getKey (std::vector< uint8_t > &keyID) const |
Get the key ID. 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... | |
const std::string & | getDrmMetaData () const |
Returns the content specific DRM metadata. More... | |
virtual const std::string & | friendlyName () const override |
Gets the friendly display name of the DRM. More... | |
AampPlayReadyHelper (const struct DrmInfo &drmInfo, AampLogManager *logObj) | |
Public Member Functions inherited from AampDrmHelper | |
AampDrmHelper (const struct DrmInfo drmInfo, AampLogManager *logObj) | |
AampDrmHelper (const AampDrmHelper &)=delete | |
AampDrmHelper & | operator= (const AampDrmHelper &)=delete |
virtual void | setDefaultKeyID (const std::string &cencData) |
Sets the defualt keyID. 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 | 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 | transformLicenseResponse (std::shared_ptr< DrmData > licenseResponse) const |
Transform the license response from the server into the necessary format for OCDM. More... | |
virtual AAMPMemorySystem * | getMemorySystem () |
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 Member Functions | |
std::string | extractMetaData () |
Extract content meta data from given PSSH data. For example for content meta data, When strings are given as "ckm:policy xmlns:ckm="urn:ccp:ckm"" and "ckm:policy" <ckm:policy xmlns:ckm="urn:ccp:ckm">we need the contents from here</ckm:policy> | |
std::string | extrackKeyID () |
std::string | findSubstr (std::string &data, std::string start, std::string end) |
find sub string inbetween string More... | |
Private Attributes | |
const size_t | PLAYREADY_DECODED_KEY_ID_LEN |
const size_t | PLAYREADY_KEY_ID_LEN |
const std::string | FRIENDLY_NAME |
const int | CODEC_TYPE |
std::string | mPsshStr |
std::vector< uint8_t > | mInitData |
std::vector< uint8_t > | mKeyID |
std::string | mContentMetaData |
std::string | mStrInitDataFormated |
Static Private Attributes | |
static const std::string | PLAYREADY_OCDM_ID = "com.microsoft.playready" |
Friends | |
class | AampPlayReadyHelperFactory |
Additional Inherited Members | |
Data Fields inherited from AampDrmHelper | |
const uint32_t | TIMEOUT_SECONDS |
const std::string | EMPTY_DRM_METADATA |
const std::string | EMPTY_STRING |
AampLogManager * | mLogObj |
Protected Attributes inherited from AampDrmHelper | |
const DrmInfo | mDrmInfo |
bool | bOutputProtectionEnabled |
Handles the operation for Play ready DRM operations.
Definition at line 37 of file AampPlayReadyHelper.h.
|
virtual |
Returns the OCDM system ID of the helper.
Implements AampDrmHelper.
Definition at line 43 of file AampPlayReadyHelper.cpp.
|
virtual |
initData | the Init Data to send to the CDM |
Implements AampDrmHelper.
|
virtual |
Parse the optional PSSH data.
initData | The init data from the PSSH |
initDataLen | the length of initData |
Implements AampDrmHelper.
Definition at line 168 of file AampPlayReadyHelper.cpp.
|
inlinevirtual |
Determine if the DRM system needs to be in the clear or encrypted.
Implements AampDrmHelper.
Definition at line 48 of file AampPlayReadyHelper.h.
|
inlinevirtual |
Determine whether HDCP 2.2 protection is required to be active.
Reimplemented from AampDrmHelper.
Definition at line 50 of file AampPlayReadyHelper.h.
|
virtual |
Sets the content specific DRM metadata.
the | DRM metadata |
Reimplemented from AampDrmHelper.
Definition at line 240 of file AampPlayReadyHelper.cpp.
|
virtual |
Get the key ID.
keyID | The key ID as a vector of binary data |
Implements AampDrmHelper.
Definition at line 248 of file AampPlayReadyHelper.cpp.
|
inlinevirtual |
Returns the DRM codec type for the helper, used in trace.
Reimplemented from AampDrmHelper.
Definition at line 56 of file AampPlayReadyHelper.h.
|
virtual |
Generate the request details for the DRM license.
challengeInfo | challenge information from the DRM system necessary to construct the license request |
licenseRequest | license request data to populate |
Implements AampDrmHelper.
Definition at line 253 of file AampPlayReadyHelper.cpp.
|
inlinevirtual |
Returns the content specific DRM metadata.
Reimplemented from AampDrmHelper.
Definition at line 60 of file AampPlayReadyHelper.h.
|
inlineoverridevirtual |
Gets the friendly display name of the DRM.
Reimplemented from AampDrmHelper.
Definition at line 62 of file AampPlayReadyHelper.h.
|
private |
find sub string inbetween string
move to utiles
Definition at line 59 of file AampPlayReadyHelper.cpp.
|
private |
String init data after clean up
Definition at line 86 of file AampPlayReadyHelper.h.