Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ff6014a
RDKEMW-18059 : Notified the key status notification to player
varatharajan568 May 5, 2026
d881a95
RDKEMW-18059 : Removed the interface added to retrieve the key status
varatharajan568 May 5, 2026
aa7da6a
Update AampDRMLicManager.cpp
varatharajan568 May 5, 2026
aee6dc3
Update AampDRMLicManager.h
varatharajan568 May 5, 2026
11fd423
Removed the GetKeyStatus api from DRM
varatharajan568 May 5, 2026
1a14a3c
Update AampDRMLicManager.h
varatharajan568 May 6, 2026
0e42b88
Update Fakeopencdmsessionadapter.cpp
varatharajan568 May 6, 2026
c5f8f24
Update AampConfig.cpp
varatharajan568 May 6, 2026
75ad1cb
Update aampMocks.cpp
varatharajan568 May 6, 2026
ee95b90
Potential fix for pull request finding
varatharajan568 May 7, 2026
14d05bc
Update opencdmsessionadapter.cpp
varatharajan568 May 7, 2026
a0f2e06
Addressed review comment
varatharajan568 May 7, 2026
2a36017
Modified the player status enum name
varatharajan568 May 7, 2026
7b88cdf
Merge branch 'dev_sprint_25_2' into feature/RDKEMW-18059
varatharajan568 May 8, 2026
6bdf5e0
Update AampConfig.cpp
varatharajan568 May 8, 2026
4a1f6e1
Update opencdmsessionadapter.cpp
varatharajan568 May 8, 2026
52974bf
Merge branch 'dev_sprint_25_2' into feature/RDKEMW-18059
varatharajan568 May 11, 2026
90add06
Added an var in-order to maintain the session key status
varatharajan568 May 11, 2026
2dad9e4
Merge branch 'dev_sprint_25_2' into feature/RDKEMW-18059
varatharajan568 May 12, 2026
3afbb3f
Merge branch 'dev_sprint_25_2' into feature/RDKEMW-18059
varatharajan568 May 14, 2026
254b86e
Removed the debug logs
varatharajan568 May 14, 2026
5336a69
Merge branch 'dev_sprint_25_2' into feature/RDKEMW-18059
varatharajan568 May 15, 2026
9a0dbc4
Potential fix for pull request finding
varatharajan568 May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions middleware/drm/DrmCallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/

#include <string>
#include "DrmSession.h"

/**
* @class DrmCallbacks
Expand All @@ -36,6 +37,7 @@ class DrmCallbacks
public:
virtual void Individualization(const std::string& payload) = 0;
virtual void LicenseRenewal(DrmHelperPtr drmHelper, void* userData) = 0;
virtual void NotifyKeyStatus(PlayerKeyStatus keyStatus) = 0;
virtual ~DrmCallbacks() {};
Comment thread
varatharajan568 marked this conversation as resolved.
Comment thread
varatharajan568 marked this conversation as resolved.
};

Expand Down
16 changes: 16 additions & 0 deletions middleware/drm/DrmSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@
#include "DrmUtils.h"
#include "ContentSecurityManagerSession.h"

/**
* @enum PlayerKeyStatus
* @brief DRM key status values, independent of OCDM.
*/
typedef enum {
Comment thread
Vinish100 marked this conversation as resolved.
PLAYER_KEY_Usable = 0,
PLAYER_KEY_Expired,
PLAYER_KEY_Released,
PLAYER_KEY_OutputRestricted,
PLAYER_KEY_OutputRestrictedHDCP22,
PLAYER_KEY_OutputDownscaled,
PLAYER_KEY_StatusPending,
PLAYER_KEY_InternalError,
PLAYER_KEY_HWError
} PlayerKeyStatus;

Comment thread
varatharajan568 marked this conversation as resolved.
using namespace std;

#define PLAYREADY_KEY_SYSTEM_STRING "com.microsoft.playready"
Expand Down
21 changes: 21 additions & 0 deletions middleware/drm/ocdm/opencdmsessionadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@
#include "opencdmsessionadapter.h"

#include "DrmHelper.h"

/**
* @brief Convert OCDM KeyStatus to PlayerKeyStatus.
*/
static PlayerKeyStatus toPlayerKeyStatus(KeyStatus ocdmStatus) {
switch (ocdmStatus) {
case Usable: return PlayerKeyStatus::PLAYER_KEY_Usable;
case Expired: return PlayerKeyStatus::PLAYER_KEY_Expired;
case Released: return PlayerKeyStatus::PLAYER_KEY_Released;
case OutputRestricted: return PlayerKeyStatus::PLAYER_KEY_OutputRestricted;
case OutputRestrictedHDCP22: return PlayerKeyStatus::PLAYER_KEY_OutputRestrictedHDCP22;
case OutputDownscaled: return PlayerKeyStatus::PLAYER_KEY_OutputDownscaled;
case StatusPending: return PlayerKeyStatus::PLAYER_KEY_StatusPending;
case HWError: return PlayerKeyStatus::PLAYER_KEY_HWError;
case InternalError: default: return PlayerKeyStatus::PLAYER_KEY_InternalError;
}
}
#include "PlayerUtils.h"

#include "ProcessHandler.h"
Comment thread
varatharajan568 marked this conversation as resolved.
Expand Down Expand Up @@ -248,6 +265,10 @@ void OCDMSessionAdapter::keyUpdateOCDM(const uint8_t key[], const uint8_t keySiz
void OCDMSessionAdapter::keysUpdatedOCDM() {
MW_LOG_INFO("at %p, with %p, %p", this , m_pOpenCDMSystem, m_pOpenCDMSession);
m_keyStatusReady.signal();
if (m_drmCallbacks && ((m_keyStatus == OutputRestricted) || (m_keyStatus == Usable) || (m_keyStatus == OutputRestrictedHDCP22) || (m_keyStatus == OutputDownscaled)))
{
m_drmCallbacks->NotifyKeyStatus(toPlayerKeyStatus(m_keyStatus));
Comment thread
varatharajan568 marked this conversation as resolved.
Outdated
}
}


Expand Down
8 changes: 8 additions & 0 deletions priv_aamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11455,6 +11455,14 @@ void PrivateInstanceAAMP::Individualization(const std::string& payload)
SendEvent(event,AAMP_EVENT_ASYNC_MODE);
}

/**
* @brief DRM key status notification callback
*/
void PrivateInstanceAAMP::NotifyKeyStatus(PlayerKeyStatus keyStatus)
{
AAMPLOG_WARN("NotifyKeyStatus: keyStatus=%d", static_cast<int>(keyStatus));
}
Comment on lines +11468 to +11471
Comment on lines +11465 to +11471

/**
* @brief Get current initial buffer duration in seconds
*/
Expand Down
7 changes: 7 additions & 0 deletions priv_aamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,13 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_
* @return void
*/
void LicenseRenewal(DrmHelperPtr drmHelper,void* userData) override;
/**
* @fn NotifyKeyStatus
*
* @param[in] keyStatus - Key status received from OCDM
* @return void
*/
void NotifyKeyStatus(PlayerKeyStatus keyStatus) override;
/**
* @fn CurlTerm
*
Expand Down
5 changes: 5 additions & 0 deletions test/utests/drm/mocks/aampMocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ void PrivateInstanceAAMP::UnlockGetPositionMilliseconds()
{
}

void PrivateInstanceAAMP::NotifyKeyStatus(PlayerKeyStatus keyStatus)
{
(void)keyStatus;
}

void PrivateInstanceAAMP::SetPreferredLanguages(const char *, const char *, const char *,
const char *, const char *, const Accessibility *,
const char *)
Expand Down
6 changes: 5 additions & 1 deletion test/utests/fakes/FakePrivateInstanceAAMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ void PrivateInstanceAAMP::UnlockGetPositionMilliseconds()
{
}

void PrivateInstanceAAMP::NotifyKeyStatus(PlayerKeyStatus keyStatus)
{
Comment thread
varatharajan568 marked this conversation as resolved.
}

void PrivateInstanceAAMP::SetPreferredLanguages(char const*, char const*, char const*, char const*, char const*, const Accessibility*, char const*)
{
}
Expand Down Expand Up @@ -1913,4 +1917,4 @@ bool PrivateInstanceAAMP::CheckForChunkEarlyAbort(CurlCallbackContext *context)

void PrivateInstanceAAMP::EnableLatencyMonitor(bool enabled)
{
}
}
Loading