mirror of
https://gitee.com/openharmony/castengine_cast_framework
synced 2024-11-23 14:40:07 +00:00
!92 修改64位机上不兼容的变量打印格式控制符
Merge pull request !92 from LongestDistance/master
This commit is contained in:
commit
67f7efa084
@ -654,7 +654,8 @@ int32_t StreamPlayerImplProxy::ProvideKeyResponse(const std::string &mediaId, co
|
||||
MessageOption option;
|
||||
auto len = response.size();
|
||||
if (len > data.GetDataCapacity()) {
|
||||
CLOGD("ProvideKeyResponse SetDataCapacity totalSize: %u", len);
|
||||
CLOGD("ProvideKeyResponse SetDataCapacity totalSize: %zu", len);
|
||||
|
||||
data.SetMaxCapacity(len + len);
|
||||
data.SetDataCapacity(len);
|
||||
}
|
||||
@ -663,20 +664,24 @@ int32_t StreamPlayerImplProxy::ProvideKeyResponse(const std::string &mediaId, co
|
||||
CLOGE("Failed to write the interface token");
|
||||
return CAST_ENGINE_ERROR;
|
||||
}
|
||||
|
||||
if (!data.WriteString(mediaId)) {
|
||||
CLOGE("Failed to write mediaId");
|
||||
return CAST_ENGINE_ERROR;
|
||||
}
|
||||
|
||||
if (!data.WriteInt32(response.size())) {
|
||||
CLOGE("StreamPlayerImplProxy ProvideKeyResponse Write response size failed");
|
||||
return IPC_PROXY_ERR;
|
||||
}
|
||||
|
||||
if (len != 0) {
|
||||
if (!data.WriteBuffer(response.data(), len)) {
|
||||
CLOGE("StreamPlayerImplProxy ProvideKeyResponse write response failed");
|
||||
return IPC_PROXY_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
if (Remote()->SendRequest(PROVIDE_KEY_RESPONSE, data, reply, option) != ERR_NONE) {
|
||||
CLOGE("Failed to send ipc request when provide key response");
|
||||
return CAST_ENGINE_ERROR;
|
||||
|
@ -133,14 +133,17 @@ void CastServiceListenerImplProxy::OnLogEvent(int32_t eventId, int64_t param)
|
||||
CLOGE("Failed to write the interface token");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.WriteInt32(eventId)) {
|
||||
CLOGE("Failed to write the eventId:%d", eventId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.WriteInt64(param)) {
|
||||
CLOGE("Failed to write the param:%lld", param);
|
||||
CLOGE("Failed to write the param:%" PRIu64, param);
|
||||
return;
|
||||
}
|
||||
|
||||
CLOGD("send request");
|
||||
Remote()->SendRequest(ON_LOG_EVENT, data, reply, option);
|
||||
}
|
||||
|
@ -342,7 +342,8 @@ void StreamPlayerListenerImplProxy::OnKeyRequest(const std::string &mediaId, con
|
||||
MessageOption option;
|
||||
auto len = keyRequestData.size();
|
||||
if (len > data.GetDataCapacity()) {
|
||||
CLOGD("SetDataCapacity totalSize: %u", len);
|
||||
CLOGD("SetDataCapacity totalSize: %zu", len);
|
||||
|
||||
data.SetMaxCapacity(len + len);
|
||||
data.SetDataCapacity(len);
|
||||
}
|
||||
@ -351,20 +352,24 @@ void StreamPlayerListenerImplProxy::OnKeyRequest(const std::string &mediaId, con
|
||||
CLOGE("Failed to write the interface token");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.WriteString(mediaId)) {
|
||||
CLOGE("Failed to write mediaId");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.WriteInt32(keyRequestData.size())) {
|
||||
CLOGE("Write keyRequestData size failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (len != 0) {
|
||||
if (!data.WriteBuffer(keyRequestData.data(), len)) {
|
||||
CLOGE("write keyRequestData failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Remote()->SendRequest(ON_KEY_REQUEST, data, reply, option) != ERR_NONE) {
|
||||
CLOGE("Failed to send ipc request when reporting key request data");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user