From 1e0ba7b29171ec5db0461e9dbce39456fb6ed15c Mon Sep 17 00:00:00 2001 From: "Adler, Douglas" Date: Sun, 17 May 2026 15:48:18 -0500 Subject: [PATCH 1/7] RDKEMW-18668 : Add retry loop to ocdm decrypt Reason for change: HCDP reauth retry logic needed Test Procedure: Hot pug hdmi and observe retry log messages Risks: Low Priority: High Signed-off-by: Adler, Douglas --- .../main/source/MediaKeysServerInternal.cpp | 21 ++++++- wrappers/include/OcdmSession.h | 2 + wrappers/source/OcdmSession.cpp | 57 +++++++++++++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/media/server/main/source/MediaKeysServerInternal.cpp b/media/server/main/source/MediaKeysServerInternal.cpp index 72240c3fc..74fd75f45 100644 --- a/media/server/main/source/MediaKeysServerInternal.cpp +++ b/media/server/main/source/MediaKeysServerInternal.cpp @@ -18,6 +18,8 @@ */ #include +#include +#include #include "MediaKeysServerInternal.h" #include "RialtoServerLogging.h" @@ -51,6 +53,9 @@ std::shared_ptr IMediaKeysFactory::createFactory() namespace firebolt::rialto::server { +constexpr std::chrono::milliseconds kOutputRestrictedRetryInterval{250}; +constexpr std::chrono::seconds kOutputRestrictedRetryTimeout{6}; + int32_t generateSessionId() { static int32_t keySessionId{0}; @@ -573,10 +578,20 @@ MediaKeyErrorStatus MediaKeysServerInternal::decrypt(int32_t keySessionId, GstBu { RIALTO_SERVER_LOG_DEBUG("entry:"); - MediaKeyErrorStatus status; - auto task = [&]() { status = decryptInternal(keySessionId, encrypted, caps); }; + MediaKeyErrorStatus status{MediaKeyErrorStatus::FAIL}; + const auto deadline = std::chrono::steady_clock::now() + kOutputRestrictedRetryTimeout; + do + { + auto task = [&]() { status = decryptInternal(keySessionId, encrypted, caps); }; + m_mainThread->enqueueTaskAndWait(m_mainThreadClientId, task); + if (status != MediaKeyErrorStatus::OUTPUT_RESTRICTED) + { + break; + } + RIALTO_SERVER_LOG_WARN("Decrypt returned OUTPUT_RESTRICTED, retrying after delay"); + std::this_thread::sleep_for(kOutputRestrictedRetryInterval); + } while (std::chrono::steady_clock::now() < deadline); - m_mainThread->enqueueTaskAndWait(m_mainThreadClientId, task); return status; } diff --git a/wrappers/include/OcdmSession.h b/wrappers/include/OcdmSession.h index 51841f701..c76716106 100644 --- a/wrappers/include/OcdmSession.h +++ b/wrappers/include/OcdmSession.h @@ -94,6 +94,7 @@ class OcdmSession : public IOcdmSession private: using OcdmGstSessionDecryptExFn = OpenCDMError (*)(struct OpenCDMSession *, GstBuffer *, GstBuffer *, const uint32_t, GstBuffer *, GstBuffer *, uint32_t, GstCaps *); + using OcdmGstSessionDecryptBufferOnceFn = OpenCDMError (*)(struct OpenCDMSession *, GstBuffer *, GstCaps *); /** * @brief The System handle. */ @@ -115,6 +116,7 @@ class OcdmSession : public IOcdmSession struct OpenCDMSession *m_session; static OcdmGstSessionDecryptExFn m_ocdmGstSessionDecryptEx; + static OcdmGstSessionDecryptBufferOnceFn m_ocdmGstSessionDecryptBufferOnce; /** * @brief Requests the processing of the challenge data. diff --git a/wrappers/source/OcdmSession.cpp b/wrappers/source/OcdmSession.cpp index a236826a9..0c5d801f4 100644 --- a/wrappers/source/OcdmSession.cpp +++ b/wrappers/source/OcdmSession.cpp @@ -23,6 +23,7 @@ #include "opencdm/open_cdm_ext.h" #include #include +#include namespace { @@ -109,6 +110,7 @@ const firebolt::rialto::KeyStatus convertKeyStatus(const KeyStatus &ocdmKeyStatu namespace firebolt::rialto::wrappers { OcdmSession::OcdmGstSessionDecryptExFn OcdmSession::m_ocdmGstSessionDecryptEx{nullptr}; +OcdmSession::OcdmGstSessionDecryptBufferOnceFn OcdmSession::m_ocdmGstSessionDecryptBufferOnce{nullptr}; OcdmSession::OcdmSession(struct OpenCDMSystem *systemHandle, IOcdmSessionClient *client) : m_systemHandle(systemHandle), m_ocdmSessionClient(client), m_session(nullptr) @@ -121,6 +123,8 @@ OcdmSession::OcdmSession(struct OpenCDMSystem *systemHandle, IOcdmSessionClient { m_ocdmGstSessionDecryptEx = (OcdmGstSessionDecryptExFn)dlsym(RTLD_DEFAULT, "opencdm_gstreamer_session_decrypt_ex"); + m_ocdmGstSessionDecryptBufferOnce = + (OcdmGstSessionDecryptBufferOnceFn)dlsym(RTLD_DEFAULT, "opencdm_gstreamer_session_decrypt_buffer_once"); }); } @@ -195,6 +199,59 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca return MediaKeyErrorStatus::FAIL; } + if (m_ocdmGstSessionDecryptBufferOnce) + { + // Extract key ID from the buffer's protection metadata + std::vector keyId; + GstProtectionMeta *pm = reinterpret_cast(gst_buffer_get_protection_meta(encrypted)); + if (pm) + { + const GValue *kidValue = gst_structure_get_value(pm->info, "kid"); + if (kidValue) + { + GstBuffer *kidBuf = gst_value_get_buffer(kidValue); + if (kidBuf) + { + GstMapInfo kidMap; + if (gst_buffer_map(kidBuf, &kidMap, GST_MAP_READ)) + { + keyId.assign(kidMap.data, kidMap.data + kidMap.size); + gst_buffer_unmap(kidBuf, &kidMap); + } + } + } + } + + // Pre-decrypt key status check: return OUTPUT_RESTRICTED immediately (no sleep) so + // the caller (MediaKeysServerInternal::decrypt) can retry from the GStreamer thread. + if (!keyId.empty()) + { + const KeyStatus preStatus = + opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); + if (preStatus == OutputRestricted || preStatus == OutputRestrictedHDCP22) + { + return MediaKeyErrorStatus::OUTPUT_RESTRICTED; + } + } + + OpenCDMError result = m_ocdmGstSessionDecryptBufferOnce(m_session, encrypted, caps); + + // Post-decrypt status check: a failed decrypt during HDCP reauth may not carry a + // specific error code, so confirm via key status before signalling the caller to retry. + if (result != ERROR_NONE && !keyId.empty()) + { + const KeyStatus postStatus = + opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); + if (postStatus == OutputRestricted || postStatus == OutputRestrictedHDCP22) + { + return MediaKeyErrorStatus::OUTPUT_RESTRICTED; + } + } + + return convertOpenCdmError(result); + } + + // Fallback: adapter without _once handles retries internally. OpenCDMError status = opencdm_gstreamer_session_decrypt_buffer(m_session, encrypted, caps); return convertOpenCdmError(status); } From d45e77d2b75b0c651eb3e8e6fef803bd264d66a6 Mon Sep 17 00:00:00 2001 From: Sasa Mudri Date: Mon, 18 May 2026 10:31:28 +0200 Subject: [PATCH 2/7] Fix build issues. --- media/client/ipc/source/MediaKeysIpc.cpp | 4 ++++ media/public/include/MediaCommon.h | 3 ++- media/server/ipc/source/MediaKeysModuleService.cpp | 4 ++++ media/server/main/source/MediaKeysCapabilities.cpp | 2 ++ wrappers/source/OcdmSession.cpp | 4 ++-- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/media/client/ipc/source/MediaKeysIpc.cpp b/media/client/ipc/source/MediaKeysIpc.cpp index 761566218..41e3b1b17 100644 --- a/media/client/ipc/source/MediaKeysIpc.cpp +++ b/media/client/ipc/source/MediaKeysIpc.cpp @@ -123,6 +123,10 @@ const char *toString(const firebolt::rialto::MediaKeyErrorStatus &errorStatus) { return "FAIL"; } + case firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED: + { + return "OUTPUT_RESTRICTED"; + } } return "UNKNOWN"; } diff --git a/media/public/include/MediaCommon.h b/media/public/include/MediaCommon.h index 0dd829f6a..16e1025ee 100644 --- a/media/public/include/MediaCommon.h +++ b/media/public/include/MediaCommon.h @@ -292,7 +292,8 @@ enum class MediaKeyErrorStatus NOT_SUPPORTED, /**< The request parameters are not supported. */ INVALID_STATE, /**< The object is in an invalid state for the operation. */ INTERFACE_NOT_IMPLEMENTED, /**< The interface is not implemented. */ - BUFFER_TOO_SMALL /**< The size of the buffer is too small. */ + BUFFER_TOO_SMALL, /**< The size of the buffer is too small. */ + OUTPUT_RESTRICTED }; /** diff --git a/media/server/ipc/source/MediaKeysModuleService.cpp b/media/server/ipc/source/MediaKeysModuleService.cpp index 6f69d69dd..6368f93ec 100644 --- a/media/server/ipc/source/MediaKeysModuleService.cpp +++ b/media/server/ipc/source/MediaKeysModuleService.cpp @@ -66,6 +66,10 @@ convertMediaKeyErrorStatus(const firebolt::rialto::MediaKeyErrorStatus &errorSta { return firebolt::rialto::ProtoMediaKeyErrorStatus::FAIL; } + case firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED: + { + // TODO + } } return firebolt::rialto::ProtoMediaKeyErrorStatus::FAIL; } diff --git a/media/server/main/source/MediaKeysCapabilities.cpp b/media/server/main/source/MediaKeysCapabilities.cpp index b22836fb5..56123ce91 100644 --- a/media/server/main/source/MediaKeysCapabilities.cpp +++ b/media/server/main/source/MediaKeysCapabilities.cpp @@ -47,6 +47,8 @@ const char *toString(const firebolt::rialto::MediaKeyErrorStatus &status) return "NOT_SUPPORTED"; case firebolt::rialto::MediaKeyErrorStatus::INVALID_STATE: return "INVALID_STATE"; + case firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED: + return "OUTPUT_RESTRICTED"; } return "Unknown"; } diff --git a/wrappers/source/OcdmSession.cpp b/wrappers/source/OcdmSession.cpp index 0c5d801f4..e407ca78b 100644 --- a/wrappers/source/OcdmSession.cpp +++ b/wrappers/source/OcdmSession.cpp @@ -226,7 +226,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca // the caller (MediaKeysServerInternal::decrypt) can retry from the GStreamer thread. if (!keyId.empty()) { - const KeyStatus preStatus = + const ::KeyStatus preStatus = opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); if (preStatus == OutputRestricted || preStatus == OutputRestrictedHDCP22) { @@ -240,7 +240,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca // specific error code, so confirm via key status before signalling the caller to retry. if (result != ERROR_NONE && !keyId.empty()) { - const KeyStatus postStatus = + const ::KeyStatus postStatus = opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); if (postStatus == OutputRestricted || postStatus == OutputRestrictedHDCP22) { From 5eee279616b3f35a5afdf513131aa830543d1e28 Mon Sep 17 00:00:00 2001 From: LekshmiMR Date: Mon, 18 May 2026 18:07:45 +0000 Subject: [PATCH 3/7] DecryptLoop adding logs --- wrappers/source/OcdmSession.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wrappers/source/OcdmSession.cpp b/wrappers/source/OcdmSession.cpp index e407ca78b..37fd134a9 100644 --- a/wrappers/source/OcdmSession.cpp +++ b/wrappers/source/OcdmSession.cpp @@ -125,6 +125,9 @@ OcdmSession::OcdmSession(struct OpenCDMSystem *systemHandle, IOcdmSessionClient (OcdmGstSessionDecryptExFn)dlsym(RTLD_DEFAULT, "opencdm_gstreamer_session_decrypt_ex"); m_ocdmGstSessionDecryptBufferOnce = (OcdmGstSessionDecryptBufferOnceFn)dlsym(RTLD_DEFAULT, "opencdm_gstreamer_session_decrypt_buffer_once"); + if(m_ocdmGstSessionDecryptBufferOnce != NULL){ + printf("DEBUG PURPOSE : m_ocdmGstSessionDecryptBufferOnce exists\n"); + } }); } @@ -194,6 +197,7 @@ MediaKeyErrorStatus OcdmSession::update(const uint8_t response[], uint32_t respo MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *caps) { + printf("DEBUG PURPOSE : OcdmSession::decryptBuffer()\n"); if (!m_session) { return MediaKeyErrorStatus::FAIL; @@ -230,6 +234,8 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); if (preStatus == OutputRestricted || preStatus == OutputRestrictedHDCP22) { + + printf("DEBUG PURPOSE : OcdmSession::decryptBuffer() : returning MediaKeyErrorStatus::OUTPUT_RESTRICTED(Pre decrypt)\n"); return MediaKeyErrorStatus::OUTPUT_RESTRICTED; } } @@ -244,6 +250,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); if (postStatus == OutputRestricted || postStatus == OutputRestrictedHDCP22) { + printf("DEBUG PURPOSE : OcdmSession::decryptBuffer() : returning MediaKeyErrorStatus::OUTPUT_RESTRICTED(Post decrypt)\n"); return MediaKeyErrorStatus::OUTPUT_RESTRICTED; } } From a6011f89f1dc5e8ead0d86d61018ee80f75faccd Mon Sep 17 00:00:00 2001 From: LekshmiMR Date: Wed, 20 May 2026 00:41:04 +0000 Subject: [PATCH 4/7] Add logging --- .../main/source/MediaKeysServerInternal.cpp | 59 ++++++++++++++++++- wrappers/CMakeLists.txt | 2 + wrappers/source/OcdmSession.cpp | 9 +-- 3 files changed, 65 insertions(+), 5 deletions(-) diff --git a/media/server/main/source/MediaKeysServerInternal.cpp b/media/server/main/source/MediaKeysServerInternal.cpp index 74fd75f45..8f6ca5a2f 100644 --- a/media/server/main/source/MediaKeysServerInternal.cpp +++ b/media/server/main/source/MediaKeysServerInternal.cpp @@ -24,6 +24,34 @@ #include "MediaKeysServerInternal.h" #include "RialtoServerLogging.h" +/*namespace +{ +const char *toString(const firebolt::rialto::MediaKeyErrorStatus &status) +{ + switch (status) + { + case firebolt::rialto::MediaKeyErrorStatus::OK: + return "OK"; + case firebolt::rialto::MediaKeyErrorStatus::FAIL: + return "FAIL"; + case firebolt::rialto::MediaKeyErrorStatus::BAD_SESSION_ID: + return "BAD_SESSION_ID"; + case firebolt::rialto::MediaKeyErrorStatus::INTERFACE_NOT_IMPLEMENTED: + return "INTERFACE_NOT_IMPLEMENTED"; + case firebolt::rialto::MediaKeyErrorStatus::BUFFER_TOO_SMALL: + return "BUFFER_TOO_SMALL"; + case firebolt::rialto::MediaKeyErrorStatus::NOT_SUPPORTED: + return "NOT_SUPPORTED"; + case firebolt::rialto::MediaKeyErrorStatus::INVALID_STATE: + return "INVALID_STATE"; + case firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED: + return "OUTPUT_RESTRICTED"; + } + return "Unknown"; +} +} */// namespace + + namespace firebolt::rialto { const char *mediaKeyErrorStatusToString(const MediaKeyErrorStatus &status) @@ -576,7 +604,7 @@ MediaKeyErrorStatus MediaKeysServerInternal::getCdmKeySessionIdInternal(int32_t MediaKeyErrorStatus MediaKeysServerInternal::decrypt(int32_t keySessionId, GstBuffer *encrypted, GstCaps *caps) { - RIALTO_SERVER_LOG_DEBUG("entry:"); + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE: entry:decrypt"); MediaKeyErrorStatus status{MediaKeyErrorStatus::FAIL}; const auto deadline = std::chrono::steady_clock::now() + kOutputRestrictedRetryTimeout; @@ -584,6 +612,35 @@ MediaKeyErrorStatus MediaKeysServerInternal::decrypt(int32_t keySessionId, GstBu { auto task = [&]() { status = decryptInternal(keySessionId, encrypted, caps); }; m_mainThread->enqueueTaskAndWait(m_mainThreadClientId, task); + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session id :%d", keySessionId); + switch (status) + { + case firebolt::rialto::MediaKeyErrorStatus::OK: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : OK"); + break; + case firebolt::rialto::MediaKeyErrorStatus::FAIL: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : FAIL"); + break; + case firebolt::rialto::MediaKeyErrorStatus::BAD_SESSION_ID: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : BAD_SESSION_ID"); + break; + case firebolt::rialto::MediaKeyErrorStatus::INTERFACE_NOT_IMPLEMENTED: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : INTERFACE_NOT_IMPLEMENTED"); + break; + case firebolt::rialto::MediaKeyErrorStatus::BUFFER_TOO_SMALL: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : BUFFER_TOO_SMALL"); + break; + case firebolt::rialto::MediaKeyErrorStatus::NOT_SUPPORTED: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : NOT_SUPPORTED"); + break; + case firebolt::rialto::MediaKeyErrorStatus::INVALID_STATE: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : INVALID_STATE"); + break; + case firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED: + RIALTO_SERVER_LOG_ERROR("DEBUG PURPOSE : Key session status : OUTPUT_RESTRICTED"); + break; + } + if (status != MediaKeyErrorStatus::OUTPUT_RESTRICTED) { break; diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt index 3be841fd1..d70a28037 100644 --- a/wrappers/CMakeLists.txt +++ b/wrappers/CMakeLists.txt @@ -110,6 +110,8 @@ target_include_directories( PRIVATE include + ../common/interface/ + ../logging/include/ ${GStreamerApp_INCLUDE_DIRS} $ ${WRAPPER_INCLUDES} diff --git a/wrappers/source/OcdmSession.cpp b/wrappers/source/OcdmSession.cpp index 37fd134a9..821cd3043 100644 --- a/wrappers/source/OcdmSession.cpp +++ b/wrappers/source/OcdmSession.cpp @@ -24,6 +24,7 @@ #include #include #include +#include "RialtoCommonLogging.h" namespace { @@ -126,7 +127,7 @@ OcdmSession::OcdmSession(struct OpenCDMSystem *systemHandle, IOcdmSessionClient m_ocdmGstSessionDecryptBufferOnce = (OcdmGstSessionDecryptBufferOnceFn)dlsym(RTLD_DEFAULT, "opencdm_gstreamer_session_decrypt_buffer_once"); if(m_ocdmGstSessionDecryptBufferOnce != NULL){ - printf("DEBUG PURPOSE : m_ocdmGstSessionDecryptBufferOnce exists\n"); + RIALTO_COMMON_LOG_ERROR("DEBUG PURPOSE : m_ocdmGstSessionDecryptBufferOnce exists\n"); } }); } @@ -197,7 +198,7 @@ MediaKeyErrorStatus OcdmSession::update(const uint8_t response[], uint32_t respo MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *caps) { - printf("DEBUG PURPOSE : OcdmSession::decryptBuffer()\n"); + RIALTO_COMMON_LOG_ERROR("DEBUG PURPOSE : OcdmSession::decryptBuffer()\n"); if (!m_session) { return MediaKeyErrorStatus::FAIL; @@ -235,7 +236,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca if (preStatus == OutputRestricted || preStatus == OutputRestrictedHDCP22) { - printf("DEBUG PURPOSE : OcdmSession::decryptBuffer() : returning MediaKeyErrorStatus::OUTPUT_RESTRICTED(Pre decrypt)\n"); + RIALTO_COMMON_LOG_ERROR("DEBUG PURPOSE : OcdmSession::decryptBuffer() : returning MediaKeyErrorStatus::OUTPUT_RESTRICTED(Pre decrypt)\n"); return MediaKeyErrorStatus::OUTPUT_RESTRICTED; } } @@ -250,7 +251,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca opencdm_session_status(m_session, keyId.data(), static_cast(keyId.size())); if (postStatus == OutputRestricted || postStatus == OutputRestrictedHDCP22) { - printf("DEBUG PURPOSE : OcdmSession::decryptBuffer() : returning MediaKeyErrorStatus::OUTPUT_RESTRICTED(Post decrypt)\n"); + RIALTO_COMMON_LOG_ERROR("DEBUG PURPOSE : OcdmSession::decryptBuffer() : returning MediaKeyErrorStatus::OUTPUT_RESTRICTED(Post decrypt)\n"); return MediaKeyErrorStatus::OUTPUT_RESTRICTED; } } From 41a1e4f892f8157fd7f620ffa353f45ada3c4e01 Mon Sep 17 00:00:00 2001 From: balasaraswathy-n Date: Wed, 20 May 2026 14:57:27 +0530 Subject: [PATCH 5/7] Update OcdmSession.cpp --- wrappers/source/OcdmSession.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrappers/source/OcdmSession.cpp b/wrappers/source/OcdmSession.cpp index 821cd3043..245abe811 100644 --- a/wrappers/source/OcdmSession.cpp +++ b/wrappers/source/OcdmSession.cpp @@ -204,7 +204,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca return MediaKeyErrorStatus::FAIL; } - if (m_ocdmGstSessionDecryptBufferOnce) + if (true) { // Extract key ID from the buffer's protection metadata std::vector keyId; @@ -241,7 +241,7 @@ MediaKeyErrorStatus OcdmSession::decryptBuffer(GstBuffer *encrypted, GstCaps *ca } } - OpenCDMError result = m_ocdmGstSessionDecryptBufferOnce(m_session, encrypted, caps); + OpenCDMError result = opencdm_gstreamer_session_decrypt_buffer_once(m_session, encrypted, caps); // Post-decrypt status check: a failed decrypt during HDCP reauth may not carry a // specific error code, so confirm via key status before signalling the caller to retry. From 00ffd6102ac8c12b26afe1c8bee937b2ab2e194b Mon Sep 17 00:00:00 2001 From: balasaraswathy-n Date: Wed, 20 May 2026 15:04:56 +0530 Subject: [PATCH 6/7] Update open_cdm_adapter.cpp --- stubs/opencdm/open_cdm_adapter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stubs/opencdm/open_cdm_adapter.cpp b/stubs/opencdm/open_cdm_adapter.cpp index 7ae4b48b0..db183d073 100644 --- a/stubs/opencdm/open_cdm_adapter.cpp +++ b/stubs/opencdm/open_cdm_adapter.cpp @@ -24,4 +24,10 @@ extern "C" { return ERROR_NONE; } + + OpenCDMError opencdm_gstreamer_session_decrypt_buffer_once(struct OpenCDMSession *session, GstBuffer *buffer, + GstCaps *caps) + { + return ERROR_NONE; + } } From ecab42f355350dee412f0816194495f28e67a866 Mon Sep 17 00:00:00 2001 From: balasaraswathy-n Date: Wed, 20 May 2026 15:05:46 +0530 Subject: [PATCH 7/7] Update open_cdm_adapter.cpp --- stubs/opencdm/open_cdm_adapter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/opencdm/open_cdm_adapter.cpp b/stubs/opencdm/open_cdm_adapter.cpp index db183d073..03808330a 100644 --- a/stubs/opencdm/open_cdm_adapter.cpp +++ b/stubs/opencdm/open_cdm_adapter.cpp @@ -26,8 +26,8 @@ extern "C" } OpenCDMError opencdm_gstreamer_session_decrypt_buffer_once(struct OpenCDMSession *session, GstBuffer *buffer, - GstCaps *caps) - { + GstCaps *caps) + { return ERROR_NONE; } }