mirror of
https://github.com/openharmony/multimedia_drm_framework.git
synced 2026-08-27 21:49:56 -04:00
@@ -62,7 +62,8 @@ int32_t MediaKeySystemServiceProxy::GenerateKeySystemRequest(std::vector<uint8_t
|
||||
DRM_ERR_LOG("MediaKeySystemServiceProxy::GenerateKeySystemRequest failed, ret: %{public}d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
defaultUrl = reply.ReadString();
|
||||
uint32_t requestSize = reply.ReadInt32();
|
||||
DRM_CHECK_AND_RETURN_RET_LOG(requestSize < REQUEST_MAX_LEN, DRM_MEMORY_ERROR, "The size of request is too large.");
|
||||
if (requestSize != 0) {
|
||||
@@ -73,8 +74,7 @@ int32_t MediaKeySystemServiceProxy::GenerateKeySystemRequest(std::vector<uint8_t
|
||||
}
|
||||
request.assign(requestBuf, requestBuf + requestSize);
|
||||
}
|
||||
defaultUrl = reply.ReadString();
|
||||
|
||||
|
||||
DRM_INFO_LOG("MediaKeySystemServiceProxy::GenerateKeySystemRequest exit.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -131,6 +131,10 @@ static int32_t ProcessKeySystemRequest(MediaKeySystemServiceStub *stub, MessageP
|
||||
std::string defaultUrl;
|
||||
int32_t ret = stub->GenerateKeySystemRequest(request, defaultUrl);
|
||||
DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_OK, ret, "ProcessKeySystemRequest faild, errCode:%{public}d", ret);
|
||||
if (!reply.WriteString(defaultUrl)) {
|
||||
DRM_ERR_LOG("MediaKeySystemServiceStub Write GenerateKeySystemRequest failed");
|
||||
return IPC_STUB_WRITE_PARCEL_ERR;
|
||||
}
|
||||
if (!reply.WriteInt32(request.size())) {
|
||||
DRM_ERR_LOG("MediaKeySystemServiceStub Write request size failed");
|
||||
return IPC_STUB_WRITE_PARCEL_ERR;
|
||||
@@ -143,10 +147,6 @@ static int32_t ProcessKeySystemRequest(MediaKeySystemServiceStub *stub, MessageP
|
||||
return IPC_STUB_WRITE_PARCEL_ERR;
|
||||
}
|
||||
}
|
||||
if (!reply.WriteString(defaultUrl)) {
|
||||
DRM_ERR_LOG("MediaKeySystemServiceStub Write GenerateKeySystemRequest failed");
|
||||
return IPC_STUB_WRITE_PARCEL_ERR;
|
||||
}
|
||||
DRM_INFO_LOG("MediaKeySystemServiceStub MEDIA_KEY_SYSTEM_GENERATE_KEYSYSTEM_REQUEST exit.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user