Fix DRM HAL: YAML structure, AIDL compilation errors, CMake build, and doc typos#401
Fix DRM HAL: YAML structure, AIDL compilation errors, CMake build, and doc typos#401outdooruseonly wants to merge 35 commits intodevelopfrom
Conversation
- Introduced IDrmControllerListener, IDrmEventListener, and IDrmManager AIDL interfaces for DRM controller callbacks and resource management. - Added KeySetId, KeyValue, NumberOfSessions, ProvideProvisionResponseResult, ProvisionRequest, and SecurityLevel parcelable data structures for handling DRM-related data. - Defined Status enum for error handling in DRM operations, covering various error scenarios. - Created hfp-drm.yaml file to outline the HAL feature profile for DRM, including a placeholder for supported features.
…RM and Crypto plugin definitions
Added a TODO for crediting Android with the DRM design.
…ol creation. Extended videoDecode::openWithResolution to specify a maximum resolution that is less than that specified in codecCapabilities.
…://github.com/rdkcentral/rdk-halif-aidl into 341-taskadd-digital-rights-management-support
|
b'## Copyright scan failure |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new DRM HAL interface set (modelled after Android 16’s Drm/Crypto plugin architecture) and adds corresponding documentation and MkDocs navigation, while also deprecating the existing CDM docs. It also adds a new openWithResolution() overload to the video decoder API and updates AVBuffer documentation for secure-pool preconditions.
Changes:
- Add a new
drm/currentAIDL interface set plus HFP and module CMake configuration. - Add DRM HAL documentation and link it into MkDocs navigation; mark CDM docs as deprecated.
- Extend
IVideoDecoderwithopenWithResolution(); updateIAVBufferdocs around secure pool creation constraints.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| videodecoder/current/com/rdk/hal/videodecoder/IVideoDecoder.aidl | Adds openWithResolution() overload and associated API docs. |
| mkdocs.yml | Adds DRM docs page into site navigation. |
| drm/current/hfp-drm.yaml | Adds DRM HAL Feature Profile describing platform/scheme capabilities. |
| drm/current/com/rdk/hal/drm/Uuid.aidl | Adds UUID parcelable for scheme identification. |
| drm/current/com/rdk/hal/drm/SupportedContentType.aidl | Adds supported content type + security level range parcelable. |
| drm/current/com/rdk/hal/drm/SubSample.aidl | Adds subsample description parcelable for crypto operations. |
| drm/current/com/rdk/hal/drm/Status.aidl | Adds DRM status enum (Android-derived). |
| drm/current/com/rdk/hal/drm/SecurityLevel.aidl | Adds DRM security level enum. |
| drm/current/com/rdk/hal/drm/ProvisionRequest.aidl | Adds provisioning request parcelable. |
| drm/current/com/rdk/hal/drm/ProvideProvisionResponseResult.aidl | Adds provisioning response result parcelable. |
| drm/current/com/rdk/hal/drm/Pattern.aidl | Adds crypto pattern parcelable. |
| drm/current/com/rdk/hal/drm/NumberOfSessions.aidl | Adds sessions-count parcelable. |
| drm/current/com/rdk/hal/drm/Mode.aidl | Adds cipher mode enum. |
| drm/current/com/rdk/hal/drm/KeyValue.aidl | Adds key/value pair parcelable for optional parameters. |
| drm/current/com/rdk/hal/drm/KeyType.aidl | Adds key type enum. |
| drm/current/com/rdk/hal/drm/KeyStatusType.aidl | Adds key status type enum. |
| drm/current/com/rdk/hal/drm/KeyStatus.aidl | Adds per-key status parcelable. |
| drm/current/com/rdk/hal/drm/KeySetId.aidl | Adds key set id parcelable. |
| drm/current/com/rdk/hal/drm/KeyRequestType.aidl | Adds key request type enum. |
| drm/current/com/rdk/hal/drm/KeyRequest.aidl | Adds key request parcelable. |
| drm/current/com/rdk/hal/drm/IDrmPluginListener.aidl | Adds DRM plugin listener callbacks. |
| drm/current/com/rdk/hal/drm/IDrmPlugin.aidl | Adds the main DRM plugin interface (sessions/keys/provisioning/etc.). |
| drm/current/com/rdk/hal/drm/IDrmFactory.aidl | Adds factory interface to create DRM and Crypto plugins. |
| drm/current/com/rdk/hal/drm/ICryptoPlugin.aidl | Adds crypto plugin interface (decrypt + secure decoder requirements). |
| drm/current/com/rdk/hal/drm/HdcpLevels.aidl | Adds parcelable for connected/max HDCP levels. |
| drm/current/com/rdk/hal/drm/HdcpLevel.aidl | Adds HDCP level enum. |
| drm/current/com/rdk/hal/drm/EventType.aidl | Adds DRM event type enum. |
| drm/current/com/rdk/hal/drm/DrmMetricValue.aidl | Adds metric value union. |
| drm/current/com/rdk/hal/drm/DrmMetricNamedValue.aidl | Adds named metric value parcelable. |
| drm/current/com/rdk/hal/drm/DrmMetricGroup.aidl | Adds metric group parcelable. |
| drm/current/com/rdk/hal/drm/DrmMetric.aidl | Adds metric parcelable. |
| drm/current/com/rdk/hal/drm/DrmErrors.aidl | Adds DRM error code enum. |
| drm/current/com/rdk/hal/drm/DecryptArgs.aidl | Adds decrypt argument parcelable (AVBuffer-handle based). |
| drm/current/com/rdk/hal/drm/CryptoSchemes.aidl | Adds supported schemes + mime types parcelable. |
| drm/current/CMakeLists.txt | Adds module build config (AIDL codegen inputs). |
| docs/halif/drm/current/drm.md | Adds DRM HAL documentation/specification page. |
| docs/halif/cdm/current/cdm.md | Marks CDM docs as deprecated and points to DRM. |
| cdm/readme.md | Marks CDM readme as deprecated. |
| avbuffer/current/com/rdk/hal/avbuffer/IAVBuffer.aidl | Updates documentation around secure pool creation behaviour/exceptions. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rdkcentral/rdk-halif-aidl/sessions/5294e587-c2f2-4c02-9be5-f7e0531f39ad Co-authored-by: outdooruseonly <78563063+outdooruseonly@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rithm and setMacAlgorithm docs Agent-Logs-Url: https://github.com/rdkcentral/rdk-halif-aidl/sessions/ed5a5a38-3e8e-4845-b9c2-3265aeeef2c4 Co-authored-by: outdooruseonly <78563063+outdooruseonly@users.noreply.github.com>
|
b'## Copyright scan failure |
|
b'## Copyright scan failure |
|
b'## Copyright scan failure |
Improved decrypt documentation to explain how error codes are returned.
|
b'## Copyright scan failure |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
b'## Copyright scan failure |
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
In
|
| package com.rdk.hal.drm; | ||
|
|
||
| import com.rdk.hal.drm.KeyStatusType; | ||
| import com.rdk.hal.drm.Mode; | ||
| import com.rdk.hal.drm.Pattern; | ||
| import com.rdk.hal.drm.SubSample; | ||
|
|
There was a problem hiding this comment.
DecryptArgs.aidl imports KeyStatusType but never references it. With the AIDL compiler used in this repo, unused imports cause compilation to fail. Remove the unused import com.rdk.hal.drm.KeyStatusType; line (or use the type if intended).
| /** | ||
| * A crypto Pattern is a repeating sequence of encrypted and clear blocks | ||
| * occurring within the bytes indicated by mNumBytesOfEncryptedDatad bytes | ||
| * of a subsample. Patterns are used to reduce the CPU overhead of | ||
| * decrypting samples. As an example, HLS uses 1:9 patterns where every |
There was a problem hiding this comment.
The PR description says the mNumBytesOfEncryptedDatad typo was fixed, but the comment still contains mNumBytesOfEncryptedDatad. Please correct it to mNumBytesOfEncryptedData to match the intended wording.
|
Hi @outdooruseonly : Please add a credit to NOTICE as is normally done in RDK: and I will clear off the downvotes. Thank you |
Multiple correctness issues across the DRM HAL and related modules — broken YAML, AIDL files that fail to compile, a missing CMake override, and doc/API inconsistencies.
drm/current/hfp-drm.yamlsupportedHdcpLevelswrongly indented as child ofsupportedSecurityLevelslist items → moved to sibling underdrm:toptal→totaldrm/current/CMakeLists.txtAIDL_BINoverride block (present in all other modules); without it, customAIDL_BINpaths are silently ignoreddrm/current/com/rdk/hal/drm/DecryptArgs.aidlindirection specifiers from parcelable fields — only valid on method parametersdrm/current/com/rdk/hal/drm/ICryptoPlugin.aidlDestinationBufferandSharedBufferimports (AIDL compilation failure)@param[in] width/height— fixed possessive typo and switched to@param[in]style;mediadrm→MediaDrmdrm/current/com/rdk/hal/drm/IDrmFactory.aidlSecurityLevelimportgetSupportedCryptoSchemes()doc:createPlugin→createDrmPlugin()/createCryptoPlugin()drm/current/com/rdk/hal/drm/IDrmPlugin.aidlIDrmPluginListenerandKeyStatusimports"property value bye array"→"property value byte array"wrappedkey→wrappedKey@param level→@param securityLevelinopenSession()docIDrmFactory::createPlugin→IDrmFactory::createDrmPlugin()in interface descriptioncloseSession(): replaced@return (implicit)status-code wording with@exceptionsemanticssetCipherAlgorithm()andsetMacAlgorithm()doc blocksdrm/current/com/rdk/hal/drm/Pattern.aidlmNumBytesOfEncryptedDatad→mNumBytesOfEncryptedData; rewrote sentence to remove the undefined field referenceavbuffer/current/com/rdk/hal/avbuffer/IAVBuffer.aidlEX_ILLEGAL_STATUS→EX_ILLEGAL_STATE(invalid Binder exception name)"has not be configured"→"has not been configured";'secureHeap'→`secureHeap`@exception EX_ILLEGAL_STATE— added missing condition and punctuationvideodecoder/current/com/rdk/hal/videodecoder/IVideoDecoder.aidl@param[in] maxWidthcopy/paste described "maximum height" — correctedopen()/openWithResolution(): single-quoted identifiers → backticks;"The decode"→"The decoder"; trailing whitespace removed