RDK Documentation (Open Sourced RDK Components)
AampDrmSession Class Referenceabstract

Base class for DRM sessions. More...

#include <AampDrmSession.h>

Inheritance diagram for AampDrmSession:
Inheritance graph
Collaboration diagram for AampDrmSession:
Collaboration graph

Public Member Functions

virtual void generateAampDRMSession (const uint8_t *f_pbInitData, uint32_t f_cbInitData, std::string &customData)=0
 Create drm session with given init data. More...
 
virtual DrmDataaampGenerateKeyRequest (string &destinationURL, uint32_t timeout)=0
 Generate key request from DRM session Caller function should free the returned memory. More...
 
virtual int aampDRMProcessKey (DrmData *key, uint32_t timeout)=0
 Updates the received key to DRM session. More...
 
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.
 
virtual KeyState getState ()=0
 Get the current state of DRM Session. More...
 
virtual bool waitForState (KeyState state, const uint32_t timeout)
 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...
 
virtual void clearDecryptContext ()=0
 Clear the current session context So that new init data can be bound.
 
 AampDrmSession (AampLogManager *logObj, const string &keySystem)
 Constructor for AampDrmSession.
 
 AampDrmSession (const AampDrmSession &)=delete
 Copy constructor disabled. More...
 
AampDrmSessionoperator= (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

AampLogManagermLogObj
 

Protected Attributes

std::string m_keySystem
 
bool m_OutputProtectionEnabled
 

yes

Base class for DRM sessions.

Definition at line 69 of file AampDrmSession.h.

Constructor & Destructor Documentation

◆ AampDrmSession()

AampDrmSession::AampDrmSession ( const AampDrmSession )
delete

Copy constructor disabled.

Member Function Documentation

◆ generateAampDRMSession()

virtual void AampDrmSession::generateAampDRMSession ( const uint8_t *  f_pbInitData,
uint32_t  f_cbInitData,
std::string &  customData 
)
pure virtual

Create drm session with given init data.

Parameters
f_pbInitData: pointer to initdata
f_cbInitData: init data size

Implemented in AAMPOCDMSessionAdapter, PlayReadyDRMSession, ClearKeySession, and AAMPOCDMSession.

◆ aampGenerateKeyRequest()

virtual DrmData* AampDrmSession::aampGenerateKeyRequest ( string &  destinationURL,
uint32_t  timeout 
)
pure virtual

Generate key request from DRM session Caller function should free the returned memory.

Parameters
destinationURL: gets updated with license server url
timeoutmax timeout untill which to wait for cdm key generation.
Return values
Pointerto DrmData containing license request.

Implemented in AAMPOCDMSessionAdapter, PlayReadyDRMSession, ClearKeySession, and AAMPOCDMSession.

◆ aampDRMProcessKey()

virtual int AampDrmSession::aampDRMProcessKey ( DrmData key,
uint32_t  timeout 
)
pure virtual

Updates the received key to DRM session.

Parameters
key: License key from license server.
timeoutmax timeout untill which to wait for cdm key processing.
Return values
returnsstatus of update request

Implemented in AAMPOCDMSessionAdapter, PlayReadyDRMSession, ClearKeySession, and AAMPOCDMSession.

◆ getState()

virtual KeyState AampDrmSession::getState ( )
pure virtual

Get the current state of DRM Session.

Return values
KeyState

Implemented in ClearKeySession, PlayReadyDRMSession, AAMPOCDMSessionAdapter, and AAMPOCDMSession.

◆ waitForState()

virtual bool AampDrmSession::waitForState ( KeyState  state,
const uint32_t  timeout 
)
inlinevirtual

Waits for the current state of DRM Session to match required.. Timeout is that from the helper. Only used by OCDM Adapter for now.

Parameters
statethe KeyState to achieve
timeouthow long to wait in mSecs
Returns
true if obtained, false otherwise

Reimplemented in AAMPOCDMSessionAdapter.

Definition at line 139 of file AampDrmSession.h.

◆ operator=()

AampDrmSession& AampDrmSession::operator= ( const AampDrmSession )
delete

assignment operator disabled

◆ getKeySystem()

AampDrmSession::getKeySystem ( )

Get the DRM System, ie, UUID for PlayReady WideVine etc..

Return values
DRMsystem uuid

Definition at line 47 of file AampDrmSession.cpp.

◆ setOutputProtection()

void AampDrmSession::setOutputProtection ( bool  bValue)
inline

Set the OutputProtection for DRM Session.

Parameters
bValue: Enable/Disable flag
Return values
void

Definition at line 178 of file AampDrmSession.h.


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