RDK Documentation (Open Sourced RDK Components)
|
Open CDM DRM session. More...
#include <opencdmsessionadapter.h>
Public Member Functions | |
void | processOCDMChallenge (const char destUrl[], const uint8_t challenge[], const uint16_t challengeSize) |
void | keysUpdatedOCDM () |
void | keyUpdateOCDM (const uint8_t key[], const uint8_t keySize) |
AAMPOCDMSessionAdapter (AampLogManager *logObj, std::shared_ptr< AampDrmHelper > drmHelper, AampDrmCallbacks *callbacks=nullptr) | |
AAMPOCDMSessionAdapter (const AAMPOCDMSessionAdapter &)=delete | |
AAMPOCDMSessionAdapter & | operator= (const AAMPOCDMSessionAdapter &)=delete |
void | generateAampDRMSession (const uint8_t *f_pbInitData, uint32_t f_cbInitData, std::string &customData) |
Create drm session with given init data. More... | |
DrmData * | aampGenerateKeyRequest (string &destinationURL, uint32_t timeout) |
Generate key request from DRM session Caller function should free the returned memory. More... | |
int | aampDRMProcessKey (DrmData *key, uint32_t timeout) |
Updates the received key to DRM session. More... | |
KeyState | getState () |
Get the current state of DRM Session. More... | |
void | clearDecryptContext () |
Clear the current session context So that new init data can be bound. | |
void | setKeyId (const std::vector< uint8_t > &keyId) |
bool | waitForState (KeyState state, const uint32_t timeout) override |
Waits for the current state of DRM Session to match required.. Timeout is that from the helper. Only used by OCDM Adapter for now. More... | |
Public Member Functions inherited from AampDrmSession | |
virtual int | decrypt (GstBuffer *keyIDBuffer, GstBuffer *ivBuffer, GstBuffer *buffer, unsigned subSampleCount, GstBuffer *subSamplesBuffer, GstCaps *caps=NULL) |
Function to decrypt GStreamer stream buffer. | |
virtual int | decrypt (const uint8_t *f_pbIV, uint32_t f_cbIV, const uint8_t *payloadData, uint32_t payloadDataSize, uint8_t **ppOpaqueData) |
Function to decrypt stream buffer. | |
AampDrmSession (AampLogManager *logObj, const string &keySystem) | |
Constructor for AampDrmSession. | |
AampDrmSession (const AampDrmSession &)=delete | |
Copy constructor disabled. More... | |
AampDrmSession & | operator= (const AampDrmSession &)=delete |
assignment operator disabled More... | |
virtual | ~AampDrmSession () |
Destructor for AampDrmSession.. | |
string | getKeySystem () |
Get the DRM System, ie, UUID for PlayReady WideVine etc.. More... | |
void | setOutputProtection (bool bValue) |
Set the OutputProtection for DRM Session. More... | |
Data Fields | |
long long | timeBeforeCallback |
Data Fields inherited from AampDrmSession | |
AampLogManager * | mLogObj |
Protected Member Functions | |
bool | verifyOutputProtection () |
Protected Attributes | |
pthread_mutex_t | decryptMutex |
KeyState | m_eKeyState |
OpenCDMSession * | m_pOpenCDMSession |
struct OpenCDMAccessor * | m_pOpenCDMSystem |
OpenCDMSessionCallbacks | m_OCDMSessionCallbacks |
AampOutputProtection * | m_pOutputProtection |
std::string | m_challenge |
uint16_t | m_challengeSize |
std::string | m_destUrl |
KeyStatus | m_keyStatus |
bool | m_keyStateIndeterminate |
std::vector< uint8_t > | m_keyStored |
Event | m_challengeReady |
Event | m_keyStatusReady |
Event | m_keyStatusWait |
string | m_sessionID |
std::vector< uint8_t > | m_keyId |
std::shared_ptr< AampDrmHelper > | m_drmHelper |
AampDrmCallbacks * | m_drmCallbacks |
Protected Attributes inherited from AampDrmSession | |
std::string | m_keySystem |
bool | m_OutputProtectionEnabled |
Private Member Functions | |
void | initAampDRMSystem () |
Open CDM DRM session.
Definition at line 82 of file opencdmsessionadapter.h.
|
virtual |
Create drm session with given init data.
f_pbInitData | : pointer to initdata |
f_cbInitData | : init data size |
Implements AampDrmSession.
Definition at line 104 of file opencdmsessionadapter.cpp.
|
virtual |
Generate key request from DRM session Caller function should free the returned memory.
destinationURL | : gets updated with license server url |
timeout | max timeout untill which to wait for cdm key generation. |
Pointer | to DrmData containing license request. |
Implements AampDrmSession.
Definition at line 219 of file opencdmsessionadapter.cpp.
|
virtual |
Updates the received key to DRM session.
key | : License key from license server. |
timeout | max timeout untill which to wait for cdm key processing. |
returns | status of update request |
Implements AampDrmSession.
Definition at line 249 of file opencdmsessionadapter.cpp.
|
virtual |
Get the current state of DRM Session.
KeyState |
Implements AampDrmSession.
Definition at line 382 of file opencdmsessionadapter.cpp.
|
overridevirtual |
Waits for the current state of DRM Session to match required.. Timeout is that from the helper. Only used by OCDM Adapter for now.
state | the KeyState to achieve |
timeout | how long to wait in mSecs |
Reimplemented from AampDrmSession.
Definition at line 370 of file opencdmsessionadapter.cpp.