From a76d63b2e2072537eb436915b3da4d5df7927dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=BF=97=E5=A8=81?= Date: Wed, 13 Aug 2025 20:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B6=85=E9=99=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙志威 --- services/engine/histreamer/player/dfx_agent.cpp | 2 +- .../engine/histreamer/player/hiplayer_callback_looper.cpp | 8 ++++---- services/engine/histreamer/player/hiplayer_impl.cpp | 2 +- .../media_data_source/ipc/media_data_source_proxy.cpp | 2 +- .../sa_media/server_manager/media_server_manager.cpp | 2 +- services/utils/include/media_log.h | 1 - 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/services/engine/histreamer/player/dfx_agent.cpp b/services/engine/histreamer/player/dfx_agent.cpp index e56d0c3b1..f04de159d 100644 --- a/services/engine/histreamer/player/dfx_agent.cpp +++ b/services/engine/histreamer/player/dfx_agent.cpp @@ -197,7 +197,7 @@ void DfxAgent::UpdateDfxInfo(const DfxEvent &event) auto data = AnyCast(event.param); perfDataMap_.insert_or_assign(event.callerName, data); FALSE_RETURN_NOLOG(needPrintPerfLog_); - MEDIA_LOG_W("%{public}s", GetPerfStr(true).c_str()); + MEDIA_LOG_D("%{public}s", GetPerfStr(true).c_str()); } std::string DfxAgent::GetPerfStr(const bool needWaitAllData) diff --git a/services/engine/histreamer/player/hiplayer_callback_looper.cpp b/services/engine/histreamer/player/hiplayer_callback_looper.cpp index cdfefcf20..d8fd6f805 100755 --- a/services/engine/histreamer/player/hiplayer_callback_looper.cpp +++ b/services/engine/histreamer/player/hiplayer_callback_looper.cpp @@ -142,14 +142,14 @@ void HiPlayerCallbackLooper::ManualReportMediaProgressOnce() void HiPlayerCallbackLooper::StopReportMediaProgress() { - MEDIA_LOG_I("HiPlayerCallbackLooper StopReportMediaProgress"); + MEDIA_LOG_D("HiPlayerCallbackLooper StopReportMediaProgress"); OHOS::Media::AutoLock lock(loopMutex_); reportMediaProgress_ = false; } void HiPlayerCallbackLooper::StopCollectMaxAmplitude() { - MEDIA_LOG_I("HiPlayerCallbackLooper StopCollectMaxAmplitude"); + MEDIA_LOG_D("HiPlayerCallbackLooper StopCollectMaxAmplitude"); OHOS::Media::AutoLock lock(loopMutex_); collectMaxAmplitude_ = false; } @@ -191,7 +191,7 @@ void HiPlayerCallbackLooper::DoReportMediaProgress() MEDIA_LOG_D("EVENT_AUDIO_PROGRESS position updated: " PUBLIC_LOG_D32, currentPositionMs); obs->OnInfo(INFO_TYPE_POSITION_UPDATE, currentPositionMs, format); } else { - MEDIA_LOG_W("get player engine current time error"); + MEDIA_LOG_D("get player engine current time error"); } } isDropMediaProgress_ = false; @@ -326,7 +326,7 @@ void HiPlayerCallbackLooper::DoReportInfo(const Any& info) MEDIA_LOG_E_SHORT("DoReportInfo error, ptr is nullptr"); return; } - MEDIA_LOG_I("Report info, info type: " PUBLIC_LOG_D32 " info value: " PUBLIC_LOG_D32, + MEDIA_LOG_D("Report info, info type: " PUBLIC_LOG_D32 " info value: " PUBLIC_LOG_D32, static_cast(std::get(*ptr)), static_cast(std::get(*ptr))); obs->OnInfo(std::get(*ptr), std::get(*ptr), std::get(*ptr)); } diff --git a/services/engine/histreamer/player/hiplayer_impl.cpp b/services/engine/histreamer/player/hiplayer_impl.cpp index 3505aea60..b24f7a66a 100644 --- a/services/engine/histreamer/player/hiplayer_impl.cpp +++ b/services/engine/histreamer/player/hiplayer_impl.cpp @@ -143,7 +143,7 @@ public: Status OnCallback(const std::shared_ptr& filter, FilterCallBackCommand cmd, StreamType outType) override { - MEDIA_LOG_D_SHORT("PlayerFilterCallback OnCallback."); + MEDIA_LOG_D("PlayerFilterCallback OnCallback."); std::shared_lock lk(cbMutex_); FALSE_RETURN_V(hiPlayerImpl_ != nullptr, Status::OK); // hiPlayerImpl_ is destructed return hiPlayerImpl_->OnCallback(filter, cmd, outType); diff --git a/services/services/media_data_source/ipc/media_data_source_proxy.cpp b/services/services/media_data_source/ipc/media_data_source_proxy.cpp index bd3de5657..b5765c6ff 100644 --- a/services/services/media_data_source/ipc/media_data_source_proxy.cpp +++ b/services/services/media_data_source/ipc/media_data_source_proxy.cpp @@ -47,7 +47,7 @@ public: CHECK_AND_RETURN_RET_LOG(memory != nullptr, MSERR_NO_MEMORY, "memory is nullptr"); CacheFlag flag; if (caches_ != nullptr && caches_ == memory.get() && uniqueSharedMemoryID_ == memory->GetSharedMemoryID()) { - MEDIA_LOGI("HIT_CACHE"); + MEDIA_LOGD("HIT_CACHE "); flag = CacheFlag::HIT_CACHE; parcel.WriteUint8(static_cast(flag)); return MSERR_OK; diff --git a/services/services/sa_media/server_manager/media_server_manager.cpp b/services/services/sa_media/server_manager/media_server_manager.cpp index 77e791b5e..800e338f1 100644 --- a/services/services/sa_media/server_manager/media_server_manager.cpp +++ b/services/services/sa_media/server_manager/media_server_manager.cpp @@ -99,7 +99,7 @@ int32_t WriteInfo(int32_t fd, std::string &dumpString, std::vector dumpe if (fd != -1) { write(fd, dumpString.c_str(), dumpString.size()); } else { - MEDIA_LOGI_NO_RELEASE("%{public}s", dumpString.c_str()); + MEDIA_LOGD("%{public}s", dumpString.c_str()); } dumpString.clear(); diff --git a/services/utils/include/media_log.h b/services/utils/include/media_log.h index e63fcb634..9df1636ff 100644 --- a/services/utils/include/media_log.h +++ b/services/utils/include/media_log.h @@ -162,7 +162,6 @@ namespace OHOS { #define CHECK_AND_CONTINUE(cond) \ if (1) { \ if (!(cond)) { \ - MEDIA_LOGE_NO_RELEASE("%{public}s, check failed!", #cond); \ continue; \ } \ } else \ -- Gitee