RDK Documentation (Open Sourced RDK Components)
AesDec Class Reference

Vanilla AES based DRM management. More...

#include <aamp_aes.h>

Inheritance diagram for AesDec:
Inheritance graph
Collaboration diagram for AesDec:
Collaboration graph

Public Member Functions

DrmReturn SetMetaData (PrivateInstanceAAMP *aamp, void *metadata, int trackType, AampLogManager *logObj=NULL)
 Set DRM meta-data. Stub implementation. More...
 
DRMState GetState ()
 GetState Function to get current DRM State. More...
 
void AcquireKey (class PrivateInstanceAAMP *aamp, void *metadata, int trackType, AampLogManager *logObj=NULL)
 AcquireKey Function to acquire key . Stub implementation.
 
DrmReturn SetDecryptInfo (PrivateInstanceAAMP *aamp, const struct DrmInfo *drmInfo, AampLogManager *logObj=NULL)
 Set information required for decryption. More...
 
DrmReturn Decrypt (ProfilerBucketType bucketType, void *encryptedDataPtr, size_t encryptedDataLen, int timeInMs)
 Decrypts an encrypted buffer. More...
 
void Release ()
 Release drm session.
 
void CancelKeyWait ()
 Cancel timed_wait operation drm_Decrypt. More...
 
void RestoreKeyState ()
 Restore key state post cleanup of audio/video TrackState in case DRM data is persisted.
 
void AcquireKey ()
 Acquire drm key from URI. More...
 
void SignalKeyAcquired ()
 Signal key acquired event.
 
void NotifyDRMError (AAMPTuneFailure drmFailure)
 Notify drm error. More...
 
void SignalDrmError ()
 Signal drm error.
 
void WaitForKeyAcquireCompleteUnlocked (int timeInMs, DrmReturn &err)
 Wait for key acquisition completion. More...
 
 AesDec ()
 AesDec Constructor. More...
 
 ~AesDec ()
 AesDec Destructor.
 
 AesDec (const AesDec &)=delete
 
AesDecoperator= (const AesDec &)=delete
 
- Public Member Functions inherited from HlsDrmBase
virtual ~HlsDrmBase ()
 HlsDrmBase Destructor.
 

Static Public Member Functions

static std::shared_ptr< AesDecGetInstance ()
 Get singleton instance.
 

Private Attributes

PrivateInstanceAAMPmpAamp
 
pthread_cond_t mCond
 
pthread_mutex_t mMutex
 
EVP_CIPHER_CTX mOpensslCtx
 
DrmInfo mDrmInfo
 
GrowableBuffer mAesKeyBuf
 
DRMState mDrmState
 
DRMState mPrevDrmState
 
std::string mDrmUrl
 
int mCurlInstance
 
int mAcquireKeyWaitTime
 
pthread_t licenseAcquisitionThreadId
 
bool licenseAcquisitionThreadStarted
 

Static Private Attributes

static std::shared_ptr< AesDecmInstance = nullptr
 

yes

Vanilla AES based DRM management.

Definition at line 37 of file aamp_aes.h.

Constructor & Destructor Documentation

◆ AesDec()

AesDec::AesDec ( )

AesDec Constructor.

Definition at line 422 of file aamp_aes.cpp.

Member Function Documentation

◆ SetMetaData()

AesDec::SetMetaData ( PrivateInstanceAAMP aamp,
void *  metadata,
int  trackType,
AampLogManager mLogObj = NULL 
)
virtual

Set DRM meta-data. Stub implementation.

Parameters
aampAAMP instance to be associated with this decryptor
metadata- Ignored
Return values
eDRM_SUCCESS

Implements HlsDrmBase.

Definition at line 164 of file aamp_aes.cpp.

◆ GetState()

AesDec::GetState ( )
virtual

GetState Function to get current DRM State.

Return values
DRMState

Implements HlsDrmBase.

Definition at line 181 of file aamp_aes.cpp.

◆ SetDecryptInfo()

AesDec::SetDecryptInfo ( PrivateInstanceAAMP aamp,
const struct DrmInfo drmInfo,
AampLogManager mLogObj = NULL 
)
virtual

Set information required for decryption.

Parameters
aampAAMP instance to be associated with this decryptor
drmInfoDrm information
Return values
eDRM_SUCCESSon success

Implements HlsDrmBase.

Definition at line 190 of file aamp_aes.cpp.

◆ Decrypt()

AesDec::Decrypt ( ProfilerBucketType  bucketType,
void *  encryptedDataPtr,
size_t  encryptedDataLen,
int  timeInMs 
)
virtual

Decrypts an encrypted buffer.

Parameters
bucketTypeType of bucket for profiling
encryptedDataPtrpointer to encyrpted payload
encryptedDataLenlength in bytes of data pointed to by encryptedDataPtr
timeInMswait time

Implements HlsDrmBase.

Definition at line 271 of file aamp_aes.cpp.

◆ CancelKeyWait()

AesDec::CancelKeyWait ( )
virtual

Cancel timed_wait operation drm_Decrypt.

Implements HlsDrmBase.

Definition at line 373 of file aamp_aes.cpp.

◆ AcquireKey()

AesDec::AcquireKey ( )

Acquire drm key from URI.

Parameters
[in]aampAAMP instance to be associated with this decryptor
[in]metadataIgnored
Return values
None

Definition at line 107 of file aamp_aes.cpp.

◆ NotifyDRMError()

AesDec::NotifyDRMError ( AAMPTuneFailure  drmFailure)

Notify drm error.

Parameters
drmFailuredrm error type

Definition at line 59 of file aamp_aes.cpp.

◆ WaitForKeyAcquireCompleteUnlocked()

AesDec::WaitForKeyAcquireCompleteUnlocked ( int  timeInMs,
DrmReturn err 
)

Wait for key acquisition completion.

Parameters
[in]timeInMstimeout
[out]errerror on failure

Definition at line 255 of file aamp_aes.cpp.


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