Skip to content

Change the decrypt method and add the OUTPUT_RESTRICTED support in Rialto#513

Merged
DouglasAdler merged 12 commits into
release/v0.15.2from
feature/HDMI-switching-nonrialto-analogy
May 28, 2026
Merged

Change the decrypt method and add the OUTPUT_RESTRICTED support in Rialto#513
DouglasAdler merged 12 commits into
release/v0.15.2from
feature/HDMI-switching-nonrialto-analogy

Conversation

@skywojciechowskim
Copy link
Copy Markdown
Contributor

Summary: Change the decrypt method and add the OUTPUT_RESTRICTED support in Rialto
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: DELIA-70176

Copilot AI review requested due to automatic review settings May 28, 2026 12:59
@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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 explicit handling for HDCP output restriction in Rialto DRM decrypt flows and propagates output protection errors through server/client IPC and playback notifications.

Changes:

  • Adds OUTPUT_RESTRICTED / OUTPUT_PROTECTION statuses to public enums and protobuf mappings.
  • Updates OCDM decrypt handling and media key session logic to detect HDCP output protection failures.
  • Adds GStreamer application-message handling to notify playback output protection errors.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wrappers/source/OcdmSession.cpp Adds _decrypt_buffer_once lookup and output-restricted key status checks.
wrappers/include/OcdmSession.h Adds function pointer type/storage for _decrypt_buffer_once.
wrappers/interface/IGstWrapper.h Adds wrapper API for application messages.
wrappers/include/GstWrapper.h Implements gstMessageNewApplication.
tests/common/externalLibraryMocks/GstWrapperMock.h Adds mock for application message creation.
media/public/include/MediaCommon.h Adds output-restricted/output-protection public enum values.
proto/mediakeysmodule.proto Adds proto media key output-restricted status.
proto/mediapipelinemodule.proto Adds proto playback output-protection error.
media/client/ipc/source/MediaKeysIpc.cpp Maps output-restricted media key status from IPC.
media/client/ipc/source/MediaPipelineIpc.cpp Maps output-protection playback errors from IPC.
media/server/ipc/source/MediaKeysModuleService.cpp Maps output-restricted status to proto.
media/server/ipc/source/MediaPipelineClient.cpp Maps output-protection playback error to proto.
media/server/main/source/MediaKeysServerInternal.cpp Adds output-restricted string conversion and safer decrypt default.
media/server/main/source/MediaKeySession.cpp Converts HDCP DRM error into OUTPUT_RESTRICTED.
media/server/main/source/MediaKeysCapabilities.cpp Adds output-restricted string conversion.
media/server/gstplayer/source/GstDecryptor.cpp Drops restricted buffers and posts HDCP failure application messages.
media/server/gstplayer/include/GstDecryptorPrivate.h Tracks previous HDCP output restriction state.
media/server/gstplayer/source/GstDispatcherThread.cpp Listens for GStreamer application messages.
media/server/gstplayer/source/tasks/generic/HandleBusMessage.cpp Converts HDCP application messages to playback errors.
tests/componenttests/server/stubs/GstreamerStub.cpp Updates bus message filter expectation.
tests/common/protoUtils/MediaPipelineProtoUtils.h Adds playback output-protection proto test utility mapping.
tests/common/protoUtils/MediaKeysProtoUtils.h Adds media key output-restricted proto test utility mappings.
tests/unittests/media/client/ipc/mediaKeysIpc/base/MediaKeysIpcTestBase.cpp Adds output-restricted helper mapping.
tests/unittests/media/server/main/mediaKeySession/DecryptBufferTest.cpp Adds media key session HDCP DRM error test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

INVALID_STATE = 4; ///< The object is in an invalid state for the operation. */
INTERFACE_NOT_IMPLEMENTED = 5; ///< The interface is not implemented. */
BUFFER_TOO_SMALL = 6; ///< The buffer size is too small. */
OUTPUT_RESTRICTED = 7; ///< The buffer size is too small. */
Comment on lines +311 to +315
if (firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED == status)
{
m_hdcpOutputRestricted = true;
m_metadataWrapper->removeProtectionMetadata(buffer);
return GST_BASE_TRANSFORM_FLOW_DROPPED;
Comment on lines +276 to +280
case GST_MESSAGE_APPLICATION:
{
const GstStructure *structure = gst_message_get_structure(m_message);
if (structure && m_gstWrapper->gstStructureHasName(structure, "HDCPProtectionFailure"))
{
std::unique_ptr<IGstProtectionMetadataHelper> m_metadataWrapper;

/**
* @brief The flag indicating, if the output restricted error occured in the previous decryption attempt.
@github-actions
Copy link
Copy Markdown

Coverage statistics of your commit:
Congratulations, your commit improved lines coverage from: 0.0% to 84.3%
Congratulations, your commit improved functions coverage from: 0.0% to 92.5%

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@DouglasAdler DouglasAdler merged commit 0eea6d1 into release/v0.15.2 May 28, 2026
45 of 46 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants