RDK Documentation (Open Sourced RDK Components)
|
Class to get License from Sec Manager. More...
#include <AampSecManager.h>
Public Member Functions | |
bool | AcquireLicense (PrivateInstanceAAMP *aamp, const char *licenseUrl, const char *moneyTraceMetdata[][2], const char *accessAttributes[][2], const char *contentMetadata, size_t contentMetadataLen, const char *licenseRequest, size_t licenseRequestLen, const char *keySystemId, const char *mediaUsage, const char *accessToken, size_t accessTokenLen, int64_t *sessionId, char **licenseResponse, size_t *licenseResponseLength, int32_t *statusCode, int32_t *reasonCode, int32_t *businessStatus) |
To acquire license from SecManager. More... | |
void | UpdateSessionState (int64_t sessionId, bool active) |
To update session state to SecManager. More... | |
void | ReleaseSession (int64_t sessionId) |
To notify SecManager to release a session. More... | |
bool | setVideoWindowSize (int64_t sessionId, int64_t video_width, int64_t video_height) |
To update session state to SecManager. More... | |
bool | setPlaybackSpeedState (int64_t sessionId, int64_t playback_speed, int64_t playback_position, bool delayNeeded=false) |
To set Playback Speed State to SecManager. More... | |
bool | loadClutWatermark (int64_t sessionId, int64_t graphicId, int64_t watermarkClutBufferKey, int64_t watermarkImageBufferKey, int64_t clutPaletteSize, const char *clutPaletteFormat, int64_t watermarkWidth, int64_t watermarkHeight, float aspectRatio) |
To Load ClutWatermark. More... | |
Public Member Functions inherited from AampScheduler | |
AampScheduler () | |
AampScheduler Constructor. | |
AampScheduler (const AampScheduler &)=delete | |
AampScheduler & | operator= (const AampScheduler &)=delete |
virtual | ~AampScheduler () |
AampScheduler Destructor. | |
int | ScheduleTask (AsyncTaskObj obj) |
To schedule a task to be executed later. More... | |
void | RemoveAllTasks () |
To remove all scheduled tasks and prevent further tasks from scheduling. More... | |
bool | RemoveTask (int id) |
To remove a scheduled tasks with ID. More... | |
void | StartScheduler () |
To start scheduler thread. More... | |
void | StopScheduler () |
To stop scheduler and associated resources. More... | |
void | SuspendScheduler () |
To acquire execution lock for synchronisation purposes. More... | |
void | ResumeScheduler () |
To release execution lock. More... | |
void | EnableScheduleTask () |
To enable scheduler to queue new tasks. More... | |
void | SetState (PrivAAMPState sstate) |
To player state to Scheduler. More... | |
void | SetLogger (AampLogManager *logObj) |
Set the logger instance for the Scheduler. More... | |
Static Public Member Functions | |
static AampSecManager * | GetInstance () |
To get AampSecManager instance. More... | |
static void | DestroyInstance () |
To release AampSecManager singelton instance. | |
Private Member Functions | |
AampSecManager () | |
AampScheduler Constructor. | |
~AampSecManager () | |
AampScheduler Destructor. | |
AampSecManager (const AampSecManager &)=delete | |
Copy constructor disabled. More... | |
AampSecManager * | operator= (const AampSecManager &)=delete |
assignment operator disabled More... | |
void | RegisterEvent (string eventName, std::function< void(const WPEFramework::Core::JSON::VariantContainer &)> functionHandler) |
Registers Event to input plugin and to mRegisteredEvents list for later use. More... | |
void | RegisterAllEvents () |
Registers all Events to input plugin. | |
void | UnRegisterAllEvents () |
UnRegisters all Events from plugin. | |
void | watermarkSessionHandler (const JsonObject ¶meters) |
Detects watermarking session conditions. More... | |
void | addWatermarkHandler (const JsonObject ¶meters) |
Gets watermark image details and manages watermark rendering. More... | |
void | updateWatermarkHandler (const JsonObject ¶meters) |
Gets updated watermark image details and manages watermark rendering. More... | |
void | removeWatermarkHandler (const JsonObject ¶meters) |
Removes watermark image. More... | |
void | showWatermarkHandler (const JsonObject ¶meters) |
Handles watermark calls to be only once. More... | |
void | ShowWatermark (bool show) |
Show watermark image. | |
void | CreateWatermark (int graphicId, int zIndex) |
Create Watermark. | |
void | DeleteWatermark (int graphicId) |
Delete Watermark. | |
void | UpdateWatermark (int graphicId, int smKey, int smSize) |
Update Wateramrk. | |
void | AlwaysShowWatermarkOnTop (bool show) |
Show watermark image This method need to be used only when RDKShell is used for rendering. Not supported by Watermark Plugin. | |
void | GetWaterMarkPalette (int sessionId, int graphicId) |
GetWaterMarkPalette. | |
void | ModifyWatermarkPalette (int graphicId, int clutKey, int imageKey) |
ModifyWatermarkPalette. | |
Private Attributes | |
PrivateInstanceAAMP * | mAamp |
ThunderAccessAAMP | mSecManagerObj |
ThunderAccessAAMP | mWatermarkPluginObj |
std::mutex | mSecMutex |
std::mutex | mWatMutex |
std::mutex | mSpeedStateMutex |
std::list< std::string > | mRegisteredEvents |
bool | mSchedulerStarted |
Static Private Attributes | |
static AampSecManager * | mInstance = NULL |
Additional Inherited Members | |
Protected Member Functions inherited from AampScheduler | |
void | ExecuteAsyncTask () |
Executes scheduled tasks - invoked by thread. More... | |
Protected Attributes inherited from AampScheduler | |
AampLogManager * | mLogObj |
std::deque< AsyncTaskObj > | mTaskQueue |
std::mutex | mQMutex |
std::condition_variable | mQCond |
bool | mSchedulerRunning |
std::thread | mSchedulerThread |
std::mutex | mExMutex |
std::unique_lock< std::mutex > | mExLock |
int | mNextTaskId |
int | mCurrentTaskId |
bool | mLockOut |
PrivAAMPState | mState |
Class to get License from Sec Manager.
Definition at line 41 of file AampSecManager.h.
|
privatedelete |
Copy constructor disabled.
|
static |
To get AampSecManager instance.
Definition at line 35 of file AampSecManager.cpp.
AampSecManager::AcquireLicense | ( | PrivateInstanceAAMP * | aamp, |
const char * | licenseUrl, | ||
const char * | moneyTraceMetdata[][2], | ||
const char * | accessAttributes[][2], | ||
const char * | contentMetadata, | ||
size_t | contentMetadataLen, | ||
const char * | licenseRequest, | ||
size_t | licenseRequestLen, | ||
const char * | keySystemId, | ||
const char * | mediaUsage, | ||
const char * | accessToken, | ||
size_t | accessTokenLen, | ||
int64_t * | sessionId, | ||
char ** | licenseResponse, | ||
size_t * | licenseResponseLength, | ||
int32_t * | statusCode, | ||
int32_t * | reasonCode, | ||
int32_t * | businessStatus | ||
) |
To acquire license from SecManager.
[in] | licenseUrl | - url to fetch license from |
[in] | moneyTraceMetdata | - moneytrace info |
[in] | accessAttributes | - accessAttributes info |
[in] | contentMetadata | - content metadata info |
[in] | licenseRequest | - license challenge info |
[in] | keySystemId | - unique system ID of drm |
[in] | mediaUsage | - indicates whether its stream or download license request |
[in] | accessToken | - access token info |
[out] | sessionId | - ID of current session |
[out] | licenseResponse | - license response |
[out] | licenseResponseLength | - len of license response |
[out] | statusCode | - license fetch status code |
[out] | reasonCode | - license fetch reason code |
Definition at line 100 of file AampSecManager.cpp.
AampSecManager::UpdateSessionState | ( | int64_t | sessionId, |
bool | active | ||
) |
To update session state to SecManager.
[in] | sessionId | - session id |
[in] | active | - true if session is active, false otherwise |
Definition at line 314 of file AampSecManager.cpp.
AampSecManager::ReleaseSession | ( | int64_t | sessionId | ) |
To notify SecManager to release a session.
[in] | sessionId | - session id |
Definition at line 354 of file AampSecManager.cpp.
AampSecManager::setVideoWindowSize | ( | int64_t | sessionId, |
int64_t | video_width, | ||
int64_t | video_height | ||
) |
To update session state to SecManager.
[in] | sessionId | - session id |
[in] | video_width | - video width |
[in] | video_height | - video height |
Definition at line 388 of file AampSecManager.cpp.
AampSecManager::setPlaybackSpeedState | ( | int64_t | sessionId, |
int64_t | playback_speed, | ||
int64_t | playback_position, | ||
bool | delayNeeded = false |
||
) |
To set Playback Speed State to SecManager.
[in] | sessionId | - session id |
[in] | playback_speed | - playback speed |
[in] | playback_position | - playback position |
[in] | delayNeeded | - if delay is required, to avoid any wm flash before tune |
Definition at line 425 of file AampSecManager.cpp.
AampSecManager::loadClutWatermark | ( | int64_t | sessionId, |
int64_t | graphicId, | ||
int64_t | watermarkClutBufferKey, | ||
int64_t | watermarkImageBufferKey, | ||
int64_t | clutPaletteSize, | ||
const char * | clutPaletteFormat, | ||
int64_t | watermarkWidth, | ||
int64_t | watermarkHeight, | ||
float | aspectRatio | ||
) |
To Load ClutWatermark.
[in] | sessionId | - session id |
Definition at line 469 of file AampSecManager.cpp.
|
privatedelete |
assignment operator disabled
|
private |
Registers Event to input plugin and to mRegisteredEvents list for later use.
Definition at line 514 of file AampSecManager.cpp.
|
private |
Detects watermarking session conditions.
parameters | - i/p JsonObject params |
Definition at line 565 of file AampSecManager.cpp.
|
private |
Gets watermark image details and manages watermark rendering.
parameters | - i/p JsonObject params |
Definition at line 579 of file AampSecManager.cpp.
|
private |
Gets updated watermark image details and manages watermark rendering.
parameters | - i/p JsonObject params |
Definition at line 636 of file AampSecManager.cpp.
|
private |
Removes watermark image.
parameters | - i/p JsonObject params |
Definition at line 655 of file AampSecManager.cpp.
|
private |
Handles watermark calls to be only once.
parameters | - i/p JsonObject params |
Definition at line 686 of file AampSecManager.cpp.
|
staticprivate |
singleton instance
Definition at line 214 of file AampSecManager.h.
|
private |
Pointer to the PrivateInstanceAAMP
Definition at line 215 of file AampSecManager.h.
|
private |
ThunderAccessAAMP object for communicating with SecManager
Definition at line 216 of file AampSecManager.h.
|
private |
ThunderAccessAAMP object for communicating with Watermark Plugin Obj
Definition at line 217 of file AampSecManager.h.
|
private |
Lock for accessing mSecManagerObj
Definition at line 218 of file AampSecManager.h.
|
private |
Lock for accessing mWatermarkPluginObj
Definition at line 219 of file AampSecManager.h.
|
private |
Lock for accessing mWatermarkPluginObj
Definition at line 220 of file AampSecManager.h.