Change the decrypt method and add the OUTPUT_RESTRICTED support in Rialto#513
Conversation
…llow aamp to schedule retune
This reverts commit 8de3f24.
|
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. |
There was a problem hiding this comment.
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_PROTECTIONstatuses 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. */ |
| if (firebolt::rialto::MediaKeyErrorStatus::OUTPUT_RESTRICTED == status) | ||
| { | ||
| m_hdcpOutputRestricted = true; | ||
| m_metadataWrapper->removeProtectionMetadata(buffer); | ||
| return GST_BASE_TRANSFORM_FLOW_DROPPED; |
| 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. |
|
Coverage statistics of your commit: |
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
Summary: Change the decrypt method and add the OUTPUT_RESTRICTED support in Rialto
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: DELIA-70176