diff --git a/frameworks/binder/audio_capturer_client.cpp b/frameworks/binder/audio_capturer_client.cpp index db2d3de3e22e3fa0a54735ee54497ceae13a1a4f..86ace93b744eb8fcc70d356a24002d4aa1752313 100644 --- a/frameworks/binder/audio_capturer_client.cpp +++ b/frameworks/binder/audio_capturer_client.cpp @@ -191,7 +191,7 @@ AudioCapturer::AudioCapturerClient::~AudioCapturerClient() CallBackPara para = {.funcId = AUD_CAP_FUNC_DISCONNECT, .ret = MEDIA_IPC_FAILED}; uint32_t ret = proxy_->Invoke(proxy_, AUD_CAP_FUNC_DISCONNECT, &io, ¶, ProxyCallbackFunc); if (ret) { - MEDIA_ERR_LOG("Disconnect audioCapturer server failed, ret=%d", ret); + MEDIA_ERR_LOG("Disconnect audioCapturer server failed, ret=%u", ret); } /* release all surface buffer */ @@ -215,7 +215,7 @@ bool AudioCapturer::AudioCapturerClient::GetMinFrameCount(int32_t sampleRate, in uint32_t ret = client->proxy_->Invoke(client->proxy_, AUD_CAP_FUNC_GET_MIN_FRAME_COUNT, &io, ¶, ProxyCallbackFunc); if (ret) { - MEDIA_ERR_LOG("GetMinFrameCount failed, ret=%d", ret); + MEDIA_ERR_LOG("GetMinFrameCount failed, ret=%u", ret); return false; } return (!para.ret) ? true : false; @@ -236,7 +236,7 @@ uint64_t AudioCapturer::AudioCapturerClient::GetFrameCount() uint32_t ret = proxy_->Invoke(proxy_, AUD_CAP_FUNC_GET_FRAME_COUNT, &io, ¶, ProxyCallbackFunc); if (ret) { - MEDIA_ERR_LOG("GetFrameCount failed, ret=%d", ret); + MEDIA_ERR_LOG("GetFrameCount failed, ret=%u", ret); } return frameCount; @@ -257,7 +257,7 @@ State AudioCapturer::AudioCapturerClient::GetStatus() uint32_t ret = proxy_->Invoke(proxy_, AUD_CAP_FUNC_GET_STATUS, &io, ¶, ProxyCallbackFunc); if (ret) { - MEDIA_ERR_LOG("GetStatus failed, ret=%d", ret); + MEDIA_ERR_LOG("GetStatus failed, ret=%u", ret); } return (State)state; diff --git a/services/impl/audio_encoder/audio_encoder.cpp b/services/impl/audio_encoder/audio_encoder.cpp index 7f10e4a5bb3d583b0d7093220b0475ede29cf4b5..e011bb71cb113202645fe192e2a529952c05c017 100644 --- a/services/impl/audio_encoder/audio_encoder.cpp +++ b/services/impl/audio_encoder/audio_encoder.cpp @@ -59,7 +59,7 @@ static bool IsAudioSampleRateSupported(AudioCodecFormat format, uint32_t sampleR { if (format == G711A || format == G711U || format == G726) { if (sampleRate != AUD_SAMPLE_RATE_8000) { - MEDIA_ERR_LOG("Invalid sampleRate:%d, G711/G726 only support 8kHz", sampleRate); + MEDIA_ERR_LOG("Invalid sampleRate:%u, G711/G726 only support 8kHz", sampleRate); return false; } } @@ -157,7 +157,7 @@ int32_t AudioEncoder::InitAudioEncoderAttr(const AudioEncodeConfig &config) return ERR_INVALID_PARAM; } if (!IsAudioSampleRateSupported(config.audioFormat, config.sampleRate)) { - MEDIA_ERR_LOG("audioFormat:%d is not support sampleRate:%d", config.audioFormat, config.sampleRate); + MEDIA_ERR_LOG("audioFormat:%u is not support sampleRate:%u", config.audioFormat, config.sampleRate); return ERR_INVALID_PARAM; } uint32_t paramIndex = 0; diff --git a/services/server/src/audio_capturer_samgr.cpp b/services/server/src/audio_capturer_samgr.cpp index 1e054fc0378e6a35d7c5de357633721bcf4ae0c0..d01ab57d44f39d39452a970614ec2e410cfb5f00 100644 --- a/services/server/src/audio_capturer_samgr.cpp +++ b/services/server/src/audio_capturer_samgr.cpp @@ -48,7 +48,7 @@ static BOOL Initialize(Service *service, Identity identity) AudioCapturerService *capturerSvc = reinterpret_cast(service); capturerSvc->identity = identity; - MEDIA_DEBUG_LOG("Initialize(%s)! Identity<%d, %d, %d>", + MEDIA_DEBUG_LOG("Initialize(%s)! Identity<%u, %u, %u>", AUDIO_CAPTURER_SERVICE_NAME, identity.serviceId, identity.featureId, reinterpret_cast(&identity.queueId)); return TRUE;