-
Notifications
You must be signed in to change notification settings - Fork 2
Fix DRM HAL: YAML structure, AIDL compilation errors, CMake build, and doc typos #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b25010d
3bcc6ac
8e83879
8fea656
19054b8
68e723d
b769785
558409c
73e8286
4f2bae4
0fe8069
612842f
035195d
8dd39a1
f7bab99
78d5500
06f3e5e
8215986
d8b5de3
4ee998e
623e7aa
0e5f27d
e8cfdfa
20cf202
f5decf8
9542c61
e9283c7
cfd08f2
a66b2a2
8c5d784
3f81fcb
6276363
336ce1e
813615f
b224a4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -62,20 +62,23 @@ interface IAVBuffer | |||||
| * | ||||||
| * If the `videoDecoderId` is invalid then the `binder::Status EX_ILLEGAL_ARGUMENT` exception status is returned. | ||||||
| * | ||||||
| * It the platform has exhausted all available memory from the requested heap then the exception status | ||||||
| * If the platform has exhausted all available memory from the requested heap then the exception status | ||||||
| * `binder::Status::Exception::EX_SERVICE_SPECIFIC` with `HALError::OUT_OF_MEMORY` is returned. | ||||||
| * | ||||||
| * If a `secureHeap` is created and the video decoder has not been configured then the exception status | ||||||
| * `binder::Status::Exception::EX_ILLEGAL_STATE` is returned. | ||||||
| * | ||||||
| * @param[in] secureHeap Indicates if the pool is secure. | ||||||
| * @param[in] videoDecoderIndex The index of the video decoder resource. | ||||||
| * @param[in] listener Listener for space available callbacks. | ||||||
| * | ||||||
| * @returns A new `Pool` object with a valid handle. | ||||||
| * | ||||||
| * @exception binder::Status::Exception::EX_NONE for success | ||||||
| * @exception binder::Status::Exception::EX_ILLEGAL_ARGUMENT if videoDecoderIndex is invalid | ||||||
| * @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY if heap is exhausted | ||||||
| * @exception binder::Status::Exception::EX_ILLEGAL_ARGUMENT if videoDecoderIndex is invalid | ||||||
| * @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY if heap is exhausted | ||||||
| * @exception binder::Status::Exception::EX_ILLEGAL_STATE decoder not configured | ||||||
| * | ||||||
| * | ||||||
| * @pre The IVideoDecoder.Id must have been obtained from IVideoDecoderManager.getVideoDecoderIds() | ||||||
| * | ||||||
| * @see destroyPool() | ||||||
|
|
@@ -88,9 +91,12 @@ interface IAVBuffer | |||||
| * If the audio pool is for audio data not destinated for a vendor audio decoder | ||||||
| * (e.g. system audio PCM) then the ID must be IAudioDecoder.Id.UNDEFINED. | ||||||
| * | ||||||
| * It the platform has exhausted all available memory from the requested heap then the exception status | ||||||
| * If the platform has exhausted all available memory from the requested heap then the exception status | ||||||
| * `binder::Status::Exception::EX_SERVICE_SPECIFIC` with `HALError::OUT_OF_MEMORY` is returned. | ||||||
| * | ||||||
| * If a `secureHeap` is created and the audio decoder has not been configured then the exception status | ||||||
| * `binder::Status::Exception::EX_ILLEGAL_STATE` is returned. | ||||||
| * | ||||||
| * If the `audioDecoderId` is invalid then the `binder::Status EX_ILLEGAL_ARGUMENT` exception status is returned. | ||||||
| * | ||||||
| * @param[in] secureHeap Indicates if the pool is secure. | ||||||
|
|
@@ -101,8 +107,8 @@ interface IAVBuffer | |||||
| * | ||||||
| * @exception binder::Status::Exception::EX_NONE for success | ||||||
| * @exception binder::Status::Exception::EX_ILLEGAL_ARGUMENT if audioDecoderId is invalid | ||||||
| * @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY if heap is exhausted | ||||||
| * | ||||||
| * @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY if heap is exhausted | ||||||
| * @exception binder::Status::Exception::EX_ILLEGAL_STATE decoder not configured | ||||||
|
||||||
| * @exception binder::Status::Exception::EX_ILLEGAL_STATE decoder not configured | |
| * @exception binder::Status::Exception::EX_ILLEGAL_STATE if a secure heap is created and the decoder is not configured. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| # Content Decryption Module Support | ||
|
|
||
| Deprecated. See DRM | ||
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| #** ***************************************************************************** | ||
| # * | ||
| # * If not stated otherwise in this file or this component's LICENSE file the | ||
| # * following copyright and licenses apply: | ||
| # * | ||
| # * Copyright 2025 RDK Management | ||
| # * | ||
| # * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # * you may not use this file except in compliance with the License. | ||
| # * You may obtain a copy of the License at | ||
| # * | ||
| # * | ||
| # * http://www.apache.org/licenses/LICENSE-2.0 | ||
| # * | ||
| # * Unless required by applicable law or agreed to in writing, software | ||
| # * distributed under the License is distributed on an "AS IS" BASIS, | ||
| # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # * See the License for the specific language governing permissions and | ||
| # * limitations under the License. | ||
| # * | ||
| #** ****************************************************************************** | ||
| cmake_minimum_required(VERSION 3.8) | ||
|
|
||
| project(Drm | ||
| LANGUAGES NONE | ||
| VERSION 1.0) | ||
|
|
||
| if (NOT COMMAND compile_aidl) | ||
| message(FATAL_ERROR "Do not invoke module level CMake directly!\nInvoke CMake at root level instead!") | ||
| endif() | ||
|
|
||
| set(SRC_DIR com/rdk/hal/drm) | ||
|
|
||
| set(SRC | ||
| ${SRC_DIR}/CryptoSchemes.aidl | ||
| ${SRC_DIR}/DecryptArgs.aidl | ||
| ${SRC_DIR}/DrmErrors.aidl | ||
| ${SRC_DIR}/DrmMetric.aidl | ||
|
outdooruseonly marked this conversation as resolved.
|
||
| ${SRC_DIR}/DrmMetricGroup.aidl | ||
| ${SRC_DIR}/DrmMetricNamedValue.aidl | ||
| ${SRC_DIR}/DrmMetricValue.aidl | ||
| ${SRC_DIR}/EventType.aidl | ||
| ${SRC_DIR}/HdcpLevel.aidl | ||
| ${SRC_DIR}/HdcpLevels.aidl | ||
| ${SRC_DIR}/ICryptoPlugin.aidl | ||
| ${SRC_DIR}/IDrmFactory.aidl | ||
| ${SRC_DIR}/IDrmPlugin.aidl | ||
| ${SRC_DIR}/IDrmPluginListener.aidl | ||
| ${SRC_DIR}/KeyRequest.aidl | ||
| ${SRC_DIR}/KeyRequestType.aidl | ||
| ${SRC_DIR}/KeySetId.aidl | ||
| ${SRC_DIR}/KeyStatus.aidl | ||
| ${SRC_DIR}/KeyStatusType.aidl | ||
| ${SRC_DIR}/KeyType.aidl | ||
| ${SRC_DIR}/KeyValue.aidl | ||
| ${SRC_DIR}/Mode.aidl | ||
| ${SRC_DIR}/NumberOfSessions.aidl | ||
| ${SRC_DIR}/Pattern.aidl | ||
| ${SRC_DIR}/ProvideProvisionResponseResult.aidl | ||
| ${SRC_DIR}/ProvisionRequest.aidl | ||
| ${SRC_DIR}/SecurityLevel.aidl | ||
| ${SRC_DIR}/Status.aidl | ||
| ${SRC_DIR}/SubSample.aidl | ||
| ${SRC_DIR}/SupportedContentType.aidl | ||
| ${SRC_DIR}/Uuid.aidl | ||
| ) | ||
|
outdooruseonly marked this conversation as resolved.
|
||
|
|
||
| set(INCLUDE_DIRECTORY | ||
| . | ||
| ) | ||
|
|
||
| set(COMPILE_AIDL_ARGV "") | ||
|
|
||
| if (DEFINED AIDL_GEN_DIR) | ||
| list(APPEND COMPILE_AIDL_ARGV TARGET_DIRECTORY ${AIDL_GEN_DIR}) | ||
| endif() | ||
|
|
||
| if (DEFINED AIDL_BIN) | ||
| list(APPEND COMPILE_AIDL_ARGV AIDL_BIN ${AIDL_BIN}) | ||
| endif() | ||
|
|
||
| compile_aidl(${SRC} | ||
| INCLUDE_DIRECTORY ${INCLUDE_DIRECTORY} | ||
| ${COMPILE_AIDL_ARGV} | ||
|
outdooruseonly marked this conversation as resolved.
|
||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| * If not stated otherwise in this file or this component's LICENSE file the | ||
| * following copyright and licenses apply: | ||
| * | ||
| * Copyright 2025 RDK Management | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * ------------------------------------------------------------------- | ||
| * This file is derived from Android 16 drm interface definitions: | ||
| * | ||
| * https://android.googlesource.com/platform/hardware/interfaces/+/refs/tags/android-16.0.0_r4/drm/aidl/android/hardware/drm | ||
| * | ||
| * Copyright (C) 2022 The Android Open Source Project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0. | ||
| * ------------------------------------------------------------------- | ||
| */ | ||
|
|
||
| package com.rdk.hal.drm; | ||
|
|
||
| import com.rdk.hal.drm.SupportedContentType; | ||
| import com.rdk.hal.drm.Uuid; | ||
|
|
||
| @VintfStability | ||
| parcelable CryptoSchemes { | ||
|
|
||
| /** | ||
| * Supported crypto schemes | ||
| */ | ||
| List<Uuid> uuids; | ||
|
|
||
| /** | ||
| * Supported mime types, and supported SecurityLevels for each mime | ||
| */ | ||
| List<SupportedContentType> mimeTypes; | ||
|
|
||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||
| /* | ||||||
| * If not stated otherwise in this file or this component's LICENSE file the | ||||||
| * following copyright and licenses apply: | ||||||
| * | ||||||
| * Copyright 2025 RDK Management | ||||||
| * | ||||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
| * you may not use this file except in compliance with the License. | ||||||
| * You may obtain a copy of the License at | ||||||
| * | ||||||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||||||
| * | ||||||
| * Unless required by applicable law or agreed to in writing, software | ||||||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||||||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
| * See the License for the specific language governing permissions and | ||||||
| * limitations under the License. | ||||||
| * | ||||||
| * ------------------------------------------------------------------- | ||||||
| * This file is derived from Android 16 drm interface definitions: | ||||||
| * | ||||||
| * https://android.googlesource.com/platform/hardware/interfaces/+/refs/tags/android-16.0.0_r4/drm/aidl/android/hardware/drm | ||||||
| * | ||||||
| * Copyright (C) 2022 The Android Open Source Project | ||||||
| * | ||||||
| * Licensed under the Apache License, Version 2.0. | ||||||
| * ------------------------------------------------------------------- | ||||||
| */ | ||||||
| package com.rdk.hal.drm; | ||||||
|
|
||||||
| import com.rdk.hal.drm.KeyStatusType; | ||||||
|
||||||
| import com.rdk.hal.drm.KeyStatusType; |
Copilot
AI
Apr 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: KeyStatusType is imported but not referenced in this parcelable. Please remove it to avoid dead imports/warnings.
| import com.rdk.hal.drm.KeyStatusType; |
Copilot
AI
Apr 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
Check failure on line 36 in drm/current/com/rdk/hal/drm/DecryptArgs.aidl
GitHub Actions / call-fossid-workflow / Fossid Annotate PR
FossID Detected License Issue
Snippet with 'Apache-2.0' file license found (47 lines)
Location: drm/aidl/android/hardware/drm/DecryptArgs.aidl (link unavailable)
Component: platform/platform/hardware/interfaces@android-u-beta-1-gpl
Download: https://android.googlesource.com/platform/hardware/interfaces/+archive/refs/tags/android-u-beta-1-gpl.tar.gz
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| /* | ||
| * If not stated otherwise in this file or this component's LICENSE file the | ||
| * following copyright and licenses apply: | ||
| * | ||
| * Copyright 2025 RDK Management | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * ------------------------------------------------------------------- | ||
| * This file is derived from Android 16 drm interface definitions: | ||
| * | ||
| * https://android.googlesource.com/platform/hardware/interfaces/+/refs/tags/android-16.0.0_r4/drm/aidl/android/hardware/drm | ||
| * | ||
| * Copyright (C) 2021 The Android Open Source Project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0. | ||
| * ------------------------------------------------------------------- | ||
| */ | ||
|
|
||
| package com.rdk.hal.drm; | ||
|
|
||
| /** | ||
| * Enumerate the supported DRM errors | ||
| * Errors from Android 16 | ||
| * https://android.googlesource.com/platform/frameworks/av/+/refs/tags/android-16.0.0_r4/media/libstagefright/include/media/stagefright/MediaErrors.h | ||
| * | ||
| * Errors added as a convenience for Clients and Interface plug-ins | ||
| */ | ||
| @VintfStability | ||
| @Backing(type="int") | ||
| enum DrmErrors { | ||
|
|
||
| DRM_ERROR_BASE = -2000, | ||
|
|
||
| ERROR_DRM_UNKNOWN = DRM_ERROR_BASE, | ||
| ERROR_DRM_NO_LICENSE = DRM_ERROR_BASE - 1, | ||
| ERROR_DRM_LICENSE_EXPIRED = DRM_ERROR_BASE - 2, | ||
| ERROR_DRM_SESSION_NOT_OPENED = DRM_ERROR_BASE - 3, | ||
| ERROR_DRM_DECRYPT_UNIT_NOT_INITIALIZED = DRM_ERROR_BASE - 4, | ||
| ERROR_DRM_DECRYPT = DRM_ERROR_BASE - 5, | ||
| ERROR_DRM_CANNOT_HANDLE = DRM_ERROR_BASE - 6, | ||
| ERROR_DRM_TAMPER_DETECTED = DRM_ERROR_BASE - 7, | ||
| ERROR_DRM_NOT_PROVISIONED = DRM_ERROR_BASE - 8, | ||
| ERROR_DRM_DEVICE_REVOKED = DRM_ERROR_BASE - 9, | ||
| ERROR_DRM_RESOURCE_BUSY = DRM_ERROR_BASE - 10, | ||
| ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION = DRM_ERROR_BASE - 11, | ||
| ERROR_DRM_INSUFFICIENT_SECURITY = DRM_ERROR_BASE - 12, | ||
| ERROR_DRM_FRAME_TOO_LARGE = DRM_ERROR_BASE - 13, | ||
| ERROR_DRM_RESOURCE_CONTENTION = DRM_ERROR_BASE - 14, | ||
| ERROR_DRM_SESSION_LOST_STATE = DRM_ERROR_BASE - 15, | ||
| ERROR_DRM_INVALID_STATE = DRM_ERROR_BASE - 16, | ||
|
|
||
| // New in S / drm@1.4: | ||
| ERROR_DRM_CERTIFICATE_MALFORMED = DRM_ERROR_BASE - 17, | ||
| ERROR_DRM_CERTIFICATE_MISSING = DRM_ERROR_BASE - 18, | ||
| ERROR_DRM_CRYPTO_LIBRARY = DRM_ERROR_BASE - 19, | ||
| ERROR_DRM_GENERIC_OEM = DRM_ERROR_BASE - 20, | ||
| ERROR_DRM_GENERIC_PLUGIN = DRM_ERROR_BASE - 21, | ||
| ERROR_DRM_INIT_DATA = DRM_ERROR_BASE - 22, | ||
| ERROR_DRM_KEY_NOT_LOADED = DRM_ERROR_BASE - 23, | ||
| ERROR_DRM_LICENSE_PARSE = DRM_ERROR_BASE - 24, | ||
| ERROR_DRM_LICENSE_POLICY = DRM_ERROR_BASE - 25, | ||
| ERROR_DRM_LICENSE_RELEASE = DRM_ERROR_BASE - 26, | ||
| ERROR_DRM_LICENSE_REQUEST_REJECTED = DRM_ERROR_BASE - 27, | ||
| ERROR_DRM_LICENSE_RESTORE = DRM_ERROR_BASE - 28, | ||
| ERROR_DRM_LICENSE_STATE = DRM_ERROR_BASE - 29, | ||
| ERROR_DRM_MEDIA_FRAMEWORK = DRM_ERROR_BASE - 30, | ||
| ERROR_DRM_PROVISIONING_CERTIFICATE = DRM_ERROR_BASE - 31, | ||
| ERROR_DRM_PROVISIONING_CONFIG = DRM_ERROR_BASE - 32, | ||
| ERROR_DRM_PROVISIONING_PARSE = DRM_ERROR_BASE - 33, | ||
| ERROR_DRM_PROVISIONING_REQUEST_REJECTED = DRM_ERROR_BASE - 34, | ||
| ERROR_DRM_PROVISIONING_RETRY = DRM_ERROR_BASE - 35, | ||
| ERROR_DRM_SECURE_STOP_RELEASE = DRM_ERROR_BASE - 36, | ||
| ERROR_DRM_STORAGE_READ = DRM_ERROR_BASE - 37, | ||
| ERROR_DRM_STORAGE_WRITE = DRM_ERROR_BASE - 38, | ||
| ERROR_DRM_ZERO_SUBSAMPLES = DRM_ERROR_BASE - 39, | ||
| ERROR_DRM_LAST_USED_ERRORCODE = ERROR_DRM_ZERO_SUBSAMPLES, | ||
|
|
||
| ERROR_DRM_VENDOR_MAX = DRM_ERROR_BASE - 500, | ||
| ERROR_DRM_VENDOR_MIN = DRM_ERROR_BASE - 999, | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.