RDKEMW-19064: Implementation of OCDM api's to be able to query Key Sy…#545
RDKEMW-19064: Implementation of OCDM api's to be able to query Key Sy…#545kkanag314 wants to merge 2 commits into
Conversation
…stem Robustness Level Reason for change: Implement a interfaces in webkit to query the robustness level from CDM Test Procedure: Check the Widevine L1 DRM support on Glass/Stream with the test URL and regression tsting of webapps Priority: P1 Risks: None
|
Pull request must be merged with a description containing the required fields, Summary: If there is no jira releated to this change, please put 'Jira: NO-JIRA'. Description can be changed by editing the top comment on your pull request and making a new commit. |
|
media/client/ipc/source/MediaKeysCapabilitiesIpc.cpp:251:1: error: Unmatched '}'. Configuration: ''. [syntaxError] |
There was a problem hiding this comment.
Pull request overview
This PR adds an end-to-end API (wrapper → server service → IPC → client) to query the robustness levels supported by the underlying CDM for a given key system, enabling WebKit (and other consumers) to determine DRM robustness (e.g., Widevine L1 support).
Changes:
- Added
getSupportedRobustnessLevelsto the public/media capabilities interfaces and implementations (client + server). - Extended the MediaKeysCapabilities IPC protobuf/service with a new
getSupportedRobustnessLevelsRPC. - Implemented the OpenCDM wrapper call to retrieve supported robustness levels from the CDM.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| wrappers/source/OcdmSystem.cpp | Adds OpenCDM wrapper method to retrieve robustness levels from the system handle. |
| wrappers/interface/IOcdmSystem.h | Exposes robustness-level query in the wrapper interface. |
| wrappers/include/OcdmSystem.h | Declares the new wrapper method on OcdmSystem. |
| media/server/main/source/MediaKeysCapabilities.cpp | Implements server-side robustness-level query via IOcdmSystemFactory. |
| media/server/main/include/MediaKeysCapabilities.h | Declares the new server-side capabilities method. |
| media/server/service/source/CdmService.cpp | Adds ICdmService entrypoint forwarding to MediaKeysCapabilities. |
| media/server/service/source/CdmService.h | Declares the new ICdmService override on CdmService. |
| media/server/service/include/ICdmService.h | Extends the service interface with the new query method. |
| media/server/ipc/source/MediaKeysCapabilitiesModuleService.cpp | Implements the new protobuf RPC on the server. |
| media/server/ipc/include/MediaKeysCapabilitiesModuleService.h | Declares the new protobuf RPC handler. |
| media/client/ipc/source/MediaKeysCapabilitiesIpc.cpp | Implements client-side IPC call + response unmarshalling. |
| media/client/ipc/include/MediaKeysCapabilitiesIpc.h | Declares the client IPC method. |
| media/client/main/source/MediaKeysCapabilities.cpp | Adds client-side convenience method forwarding to IPC. |
| media/client/main/include/MediaKeysCapabilities.h | Declares the new client capabilities method. |
| media/public/include/IMediaKeysCapabilities.h | Extends the public client-facing interface with the new method. |
| proto/mediakeyscapabilitiesmodule.proto | Adds request/response messages + RPC for robustness levels. |
| patch.patch | Adds a tracked git-format patch file containing the same changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return response.is_supported(); | ||
| } | ||
|
|
||
| } |
| bool OcdmSystem::getSupportedRobustnessLevels(std::vector<std::string> &robustnessLevels) | ||
| { | ||
| char **buffer = nullptr; | ||
| uint16_t count = 0; | ||
| OpenCDMError status = opencdm_system_supported_robustness(m_systemHandle, &buffer, &count); |
| char **buffer = nullptr; | ||
| uint16_t count = 0; | ||
| OpenCDMError status = opencdm_system_supported_robustness(m_systemHandle, &buffer, &count); | ||
| if (status == ERROR_NONE && buffer != nullptr && count > 0) |
| bool MediaKeysCapabilities::getSupportedRobustnessLevels(const std::string &keySystem, std::vector<std::string> &robustnessLevels) | ||
| { | ||
| std::shared_ptr<firebolt::rialto::wrappers::IOcdmSystem> ocdmSystem = |
| /** | ||
| * @brief Gets the robustness levels supported by the underlying CDM for this key system. | ||
| * | ||
| * @param[out] robustnessLevels : The supported robustness levels. | ||
| * | ||
| * @retval true if robustness levels were retrieved successfully | ||
| */ | ||
| virtual bool getSupportedRobustnessLevels(std::vector<std::string> &robustnessLevels) = 0; | ||
|
|
| /** | ||
| * @brief Gets the robustness levels supported by the specified key system. | ||
| * | ||
| * @param[in] keySystem : The key system. | ||
| * @param[out] robustnessLevels : The supported robustness levels. | ||
| * | ||
| * @retval true if operation was successful | ||
| */ | ||
| virtual bool getSupportedRobustnessLevels(const std::string &keySystem, std::vector<std::string> &robustnessLevels) = 0; | ||
| }; |
| virtual std::vector<std::string> getSupportedKeySystems() = 0; | ||
| virtual bool supportsKeySystem(const std::string &keySystem) = 0; | ||
| virtual bool getSupportedKeySystemVersion(const std::string &keySystem, std::string &version) = 0; | ||
| virtual bool isServerCertificateSupported(const std::string &keySystem) = 0; | ||
| virtual bool getSupportedRobustnessLevels(const std::string &keySystem, std::vector<std::string> &robustnessLevels) = 0; | ||
|
|
| bool MediaKeysCapabilitiesIpc::getSupportedRobustnessLevels(const std::string &keySystem, | ||
| std::vector<std::string> &robustnessLevels) | ||
| { | ||
| if (!reattachChannelIfRequired()) | ||
| { | ||
| RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected"); | ||
| return false; | ||
| } | ||
|
|
||
| firebolt::rialto::GetSupportedRobustnessLevelsRequest request; | ||
| request.set_key_system(keySystem); | ||
|
|
||
| firebolt::rialto::GetSupportedRobustnessLevelsResponse response; | ||
| auto ipcController = m_ipc.createRpcController(); | ||
| auto blockingClosure = m_ipc.createBlockingClosure(); | ||
| m_mediaKeysCapabilitiesStub->getSupportedRobustnessLevels(ipcController.get(), &request, &response, | ||
| blockingClosure.get()); | ||
|
|
||
| // wait for the call to complete | ||
| blockingClosure->wait(); | ||
|
|
||
| // check the result | ||
| if (ipcController->Failed()) | ||
| { | ||
| RIALTO_CLIENT_LOG_ERROR("failed to get supported robustness levels due to '%s'", | ||
| ipcController->ErrorText().c_str()); | ||
| return false; | ||
| } | ||
|
|
||
| robustnessLevels.assign(response.robustness_levels().begin(), response.robustness_levels().end()); | ||
| return true; | ||
| } |
| From feda9d75dd606ac48286909115c4f81015431755 Mon Sep 17 00:00:00 2001 | ||
| From: Krishna Priya Kanagaraj <krishnapriya_kanagaraj@comcast.com> | ||
| Date: Tue, 26 May 2026 11:59:42 +0000 | ||
| Subject: [PATCH] add getSupportedRobustnessLevels to rialto | ||
|
|
|
media/client/ipc/source/MediaKeysCapabilitiesIpc.cpp:251:1: error: Unmatched '}'. Configuration: ''. [syntaxError] |
…stem Robustness Level
Reason for change: Implement a interfaces in webkit to query the robustness level from CDM
Test Procedure: Check the Widevine L1 DRM support on Glass/Stream with the test URL and regression tsting of webapps
Priority: P1
Risks: None