RDK Documentation (Open Sourced RDK Components)
AampDRMSessionManager.cpp File Reference

Source file for DrmSessionManager. More...

#include "AampDRMSessionManager.h"
#include "priv_aamp.h"
#include <pthread.h>
#include "_base64.h"
#include <iostream>
#include "AampMutex.h"
#include "AampDrmHelper.h"
#include "AampJsonObject.h"
#include "AampUtils.h"
#include "AampRfc.h"
#include <inttypes.h>
#include "AampCurlStore.h"
Include dependency graph for AampDRMSessionManager.cpp:

Go to the source code of this file.

Macros

#define LICENCE_REQUEST_HEADER_ACCEPT   "Accept:"
 
#define LICENCE_REQUEST_HEADER_CONTENT_TYPE   "Content-Type:"
 
#define LICENCE_RESPONSE_JSON_LICENCE_KEY   "license"
 
#define DRM_METADATA_TAG_START   "<ckm:policy xmlns:ckm=\"urn:ccp:ckm\">"
 
#define DRM_METADATA_TAG_END   "</ckm:policy>"
 
#define SESSION_TOKEN_URL   "http://localhost:50050/authService/getSessionToken"
 
#define INVALID_SESSION_SLOT   -1
 
#define DEFUALT_CDM_WAIT_TIMEOUT_MS   2000
 
#define CURL_EASY_SETOPT(curl, CURLoption, option)
 

Functions

void * CreateDRMSession (void *arg)
 Thread function to create DRM Session which would be invoked in thread from HLS , PlayReady or from pipeline
More...
 
int SpawnDRMLicenseAcquireThread (PrivateInstanceAAMP *aamp, DrmSessionDataInfo *drmData)
 Function to spawn the DrmSession Thread based on the preferred drm set.
More...
 
void ReleaseDRMLicenseAcquireThread (PrivateInstanceAAMP *aamp)
 Function to release the DrmSession if it running. More...
 
string _extractSubstring (string parentStr, string startStr, string endStr)
 Extract substring between (excluding) two string delimiters. More...
 

Variables

static const char * sessionTypeName [] = {"video", "audio", "subtitle", "aux-audio"}
 
static pthread_mutex_t drmSessionMutex = PTHREAD_MUTEX_INITIALIZER
 

yes

Source file for DrmSessionManager.

Definition in file AampDRMSessionManager.cpp.

Macro Definition Documentation

◆ CURL_EASY_SETOPT

#define CURL_EASY_SETOPT (   curl,
  CURLoption,
  option 
)
Value:
if (curl_easy_setopt(curl, CURLoption, option) != 0) {\
AAMPLOG_WARN("Failed at curl_easy_setopt ");\
}

Definition at line 56 of file AampDRMSessionManager.cpp.

Function Documentation

◆ CreateDRMSession()

void * CreateDRMSession ( void *  arg)

Thread function to create DRM Session which would be invoked in thread from HLS , PlayReady or from pipeline

Parameters
[out]arg- DrmSessionParams structure with filled data
Returns
None.

Definition at line 1803 of file AampDRMSessionManager.cpp.

◆ SpawnDRMLicenseAcquireThread()

int SpawnDRMLicenseAcquireThread ( PrivateInstanceAAMP aamp,
DrmSessionDataInfo drmData 
)

Function to spawn the DrmSession Thread based on the preferred drm set.

Parameters
[out]drmDataprivate aamp instance
Returns
None.

Definition at line 1763 of file AampDRMSessionManager.cpp.

◆ ReleaseDRMLicenseAcquireThread()

void ReleaseDRMLicenseAcquireThread ( PrivateInstanceAAMP aamp)

Function to release the DrmSession if it running.

Parameters
[out]aampprivate aamp instance
Returns
None.

Definition at line 1741 of file AampDRMSessionManager.cpp.

◆ _extractSubstring()

string _extractSubstring ( string  parentStr,
string  startStr,
string  endStr 
)

Extract substring between (excluding) two string delimiters.

Parameters
[in]parentStr- Parent string from which substring is extracted.
[in]startStr,endStr- String delimiters.
Returns
Returns the extracted substring; Empty string if delimiters not found.

Definition at line 369 of file AampDRMSessionManager.cpp.