!424 merge cherry-pick-mr-421-1772109585586-auto into master

补充clearplay1.1插件升级

Created-by: zhupengfei
Commit-by: m0_54007497
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)



### 二、建议测试周期和提测地址  
  建议测试完成时间:xxxx.xx.xx  
  投产上线时间:xxxx.xx.xx  
  提测地址:CI环境/压测环境  
  测试账号:  

### 三、变更内容
  * 3.1 关联PR列表

  * 3.2 数据库和部署说明  
    1. 常规更新 
    2. 重启unicorn
    3. 重启sidekiq
    4. 迁移任务:是否有迁移任务,没有写 "无"
    5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"

  * 3.4 其他技术优化内容(做了什么,变更了什么)
    - 重构了 xxxx 代码
    - xxxx 算法优化


  * 3.5 废弃通知(什么字段、方法弃用?)



  * 3.6  后向不兼容变更(是否有无法向后兼容的变更?)


  
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
  自测测试结论:


### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
  检查点:

| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx  | 否          | 需要       | 不需要           |
|      |            |          |               |

  接口测试:

  性能测试:

  并发测试:

  其他:



See merge request: openharmony/multimedia_drm_framework!424
This commit is contained in:
openharmony_ci
2026-03-02 15:32:13 +08:00
6 changed files with 30 additions and 2 deletions
@@ -68,6 +68,7 @@ ohos_fuzztest("drmserviceFuzzTest") {
"bundle_framework:appexecfwk_core",
"c_utils:utils",
"drivers_interface_drm:libdrm_proxy_1.0",
"drivers_interface_drm:libdrm_proxy_1.1",
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libhdf_utils",
+1
View File
@@ -53,6 +53,7 @@ ohos_shared_library("drm_service") {
"c_utils:utils",
"data_share:datashare_consumer",
"drivers_interface_drm:libdrm_proxy_1.0",
"drivers_interface_drm:libdrm_proxy_1.1",
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libhdf_utils",
@@ -35,6 +35,7 @@
#include "iservstat_listener_hdi.h"
#include "v1_0/media_key_system_factory_proxy.h"
#include "v1_0/media_key_system_proxy.h"
#include "v1_1/media_key_system_factory_proxy.h"
namespace OHOS {
namespace DrmStandard {
@@ -110,6 +111,8 @@ public:
void OnDrmPluginDied(std::string &name);
void SetIsNetWork(const bool &isNetWork);
bool GetIsNetWork();
void SetBundleName(const std::string &BundleName);
std::string GetBundleName();
private:
static void UnLoadOEMCertifaicateService(std::string &name, ExtraInfo info);
static void GetHttpProxyParameter(std::string &host, int32_t &port, std::list<std::string> &exclusionList);
@@ -136,6 +139,7 @@ private:
std::string QueryBasicStatement();
void WaitForNetwork();
std::string bundleName_;
StatusCallback *statusCallback_;
std::map<void *, sptr<IMediaKeySystem>> handleAndKeySystemMap;
std::thread serviceThread;
@@ -37,6 +37,7 @@
#include "v1_0/media_key_system_factory_proxy.h"
#include "v1_0/media_key_system_proxy.h"
#include "v1_1/media_key_system_factory_proxy.h"
namespace OHOS {
namespace DrmStandard {
@@ -677,8 +677,17 @@ int32_t DrmHostManager::CreateMediaKeySystem(std::string &name, sptr<IMediaKeySy
DRM_ERR_LOG("CreateMediaKeySystem faild.");
return DRM_INNER_ERR_PLUGIN_ERROR;
}
ret = drmHostServieProxys->CreateMediaKeySystem(hdiMediaKeySystem);
auto drmHostServiceProxy_1_1 = OHOS::HDI::Drm::V1_1::IMediaKeySystemFactory::CastFrom(drmHostServieProxys);
if (drmHostServiceProxy_1_1 != nullptr) {
DRM_INFO_LOG("proxy 1.1 enter");
ret = drmHostServiceProxy_1_1->CreateMediaKeySystemWithBundleName(bundleName_, hdiMediaKeySystem);
hdiMediaKeySystemFactoryAndPluginNameMap[drmHostServiceProxy_1_1] = name;
hdiMediaKeySystemFactoryAndPluginNameMap.erase(drmHostServieProxys);
drmHostServieProxys = drmHostServiceProxy_1_1;
} else {
DRM_INFO_LOG("proxy 1.0 enter");
ret = drmHostServieProxys->CreateMediaKeySystem(hdiMediaKeySystem);
}
if (ret != DRM_INNER_ERR_OK) {
hdiMediaKeySystem = nullptr;
ReleaseSevices(drmHostServieProxys);
@@ -811,5 +820,15 @@ bool DrmHostManager::GetIsNetWork()
{
return this->isNetWork;
}
void DrmHostManager::SetBundleName(const std::string &bundleName)
{
this->bundleName_ = bundleName;
}
std::string DrmHostManager::GetBundleName()
{
return this->bundleName_;
}
} // namespace DrmStandard
} // namespace OHOS
@@ -258,6 +258,8 @@ int32_t MediaKeySystemFactoryService::CreateMediaKeySystem(const std::string &na
return DRM_INNER_ERR_MAX_SYSTEM_NUM_REACHED;
}
std::string systemName = name;
std::string bundleName = GetClientBundleName(IPCSkeleton::GetCallingUid());
drmHostManager_->SetBundleName(bundleName);
int32_t ret = drmHostManager_->CreateMediaKeySystem(systemName, hdiMediaKeySystem);
if (hdiMediaKeySystem == nullptr || ret != DRM_INNER_ERR_OK) {
DRM_ERR_LOG("drmHostManager_ return hdiMediaKeySystem nullptr.");