Skip to content

RDKEMW-19064: Implementation of OCDM api's to be able to query Key Sy…#545

Open
kkanag314 wants to merge 2 commits into
masterfrom
RDKEMW-19064
Open

RDKEMW-19064: Implementation of OCDM api's to be able to query Key Sy…#545
kkanag314 wants to merge 2 commits into
masterfrom
RDKEMW-19064

Conversation

@kkanag314

Copy link
Copy Markdown

…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

…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
Copilot AI review requested due to automatic review settings June 26, 2026 07:05
@github-actions

Copy link
Copy Markdown

Pull request must be merged with a description containing the required fields,

Summary:
Type: Feature/Fix/Cleanup
Test Plan:
Jira:

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.

@github-actions

Copy link
Copy Markdown

media/client/ipc/source/MediaKeysCapabilitiesIpc.cpp:251:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
}; // namespace firebolt::rialto::client
^
nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 getSupportedRobustnessLevels to the public/media capabilities interfaces and implementations (client + server).
  • Extended the MediaKeysCapabilities IPC protobuf/service with a new getSupportedRobustnessLevels RPC.
  • 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();
}

}
Comment on lines +121 to +125
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);
Comment on lines +123 to +126
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)
Comment on lines +178 to +180
bool MediaKeysCapabilities::getSupportedRobustnessLevels(const std::string &keySystem, std::vector<std::string> &robustnessLevels)
{
std::shared_ptr<firebolt::rialto::wrappers::IOcdmSystem> ocdmSystem =
Comment on lines +151 to +159
/**
* @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;

Comment on lines +119 to 128
/**
* @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;
};
Comment on lines 76 to 81
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;

Comment on lines +218 to +249
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;
}
Comment thread patch.patch Outdated
Comment on lines +1 to +5
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

@github-actions

Copy link
Copy Markdown

media/client/ipc/source/MediaKeysCapabilitiesIpc.cpp:251:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
}; // namespace firebolt::rialto::client
^
nofile:0:0: information: Active checkers: There was critical errors (use --checkers-report= to see details) [checkersReport]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants