From a6c25d368fbc359ed0bd071b5410a840e550f831 Mon Sep 17 00:00:00 2001 From: liujiaji Date: Tue, 18 Feb 2025 10:09:46 +0800 Subject: [PATCH 1/2] add v1.1 drm idl interface Signed-off-by: liujiaji --- drm/bundle.json | 28 ++++++++++++++++- drm/v1_1/BUILD.gn | 37 ++++++++++++++++++++++ drm/v1_1/IMediaKeySystemFactory.idl | 48 +++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 drm/v1_1/BUILD.gn create mode 100644 drm/v1_1/IMediaKeySystemFactory.idl diff --git a/drm/bundle.json b/drm/bundle.json index 02f9c516..aba0cae9 100644 --- a/drm/bundle.json +++ b/drm/bundle.json @@ -27,7 +27,9 @@ "build": { "sub_component": [ "//drivers/interface/drm/v1_0:drm_idl_target", - "//drivers/interface/drm/v1_0:libdrm_stub_1.0" + "//drivers/interface/drm/v1_0:libdrm_stub_1.0", + "//drivers/interface/drm/v1_1:drm_idl_target", + "//drivers/interface/drm/v1_1:libdrm_stub_1.1" ], "test": [ ], @@ -55,6 +57,30 @@ ], "header_base": "//drivers/interface/drm" } + }, + { + "name": "//drivers/interface/drm/v1_1:libdrm_proxy_1.1", + "header": { + "header_files": [ + ], + "header_base": "//drivers/interface/drm" + } + }, + { + "name": "//drivers/interface/drm/v1_1:drm_idl_headers", + "header": { + "header_files": [ + ], + "header_base": "//drivers/interface/drm" + } + }, + { + "name": "//drivers/interface/drm/v1_1:libdrm_stub_1.1", + "header": { + "header_files": [ + ], + "header_base": "//drivers/interface/drm" + } } ] } diff --git a/drm/v1_1/BUILD.gn b/drm/v1_1/BUILD.gn new file mode 100644 index 00000000..5a202be3 --- /dev/null +++ b/drm/v1_1/BUILD.gn @@ -0,0 +1,37 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# 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. + +import("//build/config/components/hdi/hdi.gni") +if (defined(ohos_lite)) { + group("libdrm_proxy_1.1") { + deps = [] + public_configs = [] + } +} else { + hdi("drm") { + module_name = "drm_interface_service" + + deps = [ + "//drivers/interface/drm/v1_0:libdrm_proxy_1.0", + "//drivers/interface/drm/v1_0:libdrm_stub_1.0" + ] + + sources = [ + "IMediaKeySystemFactory.idl", + ] + + language = "cpp" + subsystem_name = "hdf" + part_name = "drivers_interface_drm" + } +} diff --git a/drm/v1_1/IMediaKeySystemFactory.idl b/drm/v1_1/IMediaKeySystemFactory.idl new file mode 100644 index 00000000..7f18b6d2 --- /dev/null +++ b/drm/v1_1/IMediaKeySystemFactory.idl @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * 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. + */ + +/** + * @addtogroup HdiDrm + * @ + * @brief Defines APIs of the Drm module. + * The Drm module provides APIs for multimedia Drm. + * @since 5.1 + * @version 1.0 + */ + +/** + * @file IMediaKeySystemFactory.idl + * + * @brief Defines the factory method used in HdiDrm. + * @since 5.1 + * @version 1.0 + */ + +package ohos.hdi.drm.v1_1; + +import ohos.hdi.drm.v1_0.IMediaKeySystemFactory; +import ohos.hdi.drm.v1_0.IMediaKeySystem; + +interface IMediaKeySystemFactory extends ohos.hdi.drm.v1_0.IMediaKeySystemFactory { + /** + * @brief Create mediaKeySystem by bundleName. + * @param bundleName App bundle Name. + * @param mediaKeySystem MediaKeySystem handle. + * + * @since 5.1 + * @version 1.0 + */ + CreateMediaKeySystemWithBundleName([in] String bundleName, [out] IMediaKeySystem mediaKeySystem); +}; -- Gitee From 968326a7bed1d3e615d7f490d750748df2f5aed6 Mon Sep 17 00:00:00 2001 From: LiuJiaji Date: Tue, 18 Feb 2025 02:58:07 +0000 Subject: [PATCH 2/2] update drm/v1_1/BUILD.gn. Signed-off-by: LiuJiaji --- drm/v1_1/BUILD.gn | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drm/v1_1/BUILD.gn b/drm/v1_1/BUILD.gn index 5a202be3..9280fbee 100644 --- a/drm/v1_1/BUILD.gn +++ b/drm/v1_1/BUILD.gn @@ -22,13 +22,11 @@ if (defined(ohos_lite)) { module_name = "drm_interface_service" deps = [ - "//drivers/interface/drm/v1_0:libdrm_proxy_1.0", - "//drivers/interface/drm/v1_0:libdrm_stub_1.0" + "../v1_0:libdrm_proxy_1.0", + "../v1_0:libdrm_stub_1.0", ] - sources = [ - "IMediaKeySystemFactory.idl", - ] + sources = [ "IMediaKeySystemFactory.idl" ] language = "cpp" subsystem_name = "hdf" -- Gitee