From cd8fed549c817c1edcfbff72297c050d17d58463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BC=9F=E7=90=A6?= Date: Mon, 31 Jul 2023 15:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=B1=8F=E5=B9=95=E5=BD=95?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴伟琦 --- .../entry/src/main/cpp/screenCaptureTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/multimedia/media/media_js_standard/screenCapture_ndk_test/entry/src/main/cpp/screenCaptureTest.cpp b/multimedia/media/media_js_standard/screenCapture_ndk_test/entry/src/main/cpp/screenCaptureTest.cpp index 1e3c267a1..6890af0f4 100644 --- a/multimedia/media/media_js_standard/screenCapture_ndk_test/entry/src/main/cpp/screenCaptureTest.cpp +++ b/multimedia/media/media_js_standard/screenCapture_ndk_test/entry/src/main/cpp/screenCaptureTest.cpp @@ -22,6 +22,7 @@ #include #include #include +#include "inttypes.h" #include "napi/native_api.h" #include "native_avscreen_capture.h" #include "native_avscreen_capture_base.h" @@ -107,7 +108,7 @@ void ScreenCaptureNdkTestCallback::OnAudioBufferAvailable(bool isReady, OH_Audio if (OH_AVScreenCapture_AcquireAudioBuffer(screenCapture_, &audioBuffer, type) == AV_SCREEN_CAPTURE_ERR_OK) { LOG(audioBuffer != nullptr, "AcquireAudioBuffer failed, audio buffer empty"); LOG(g_aIndex % g_logCount != 0, - "AcquireAudioBuffer, audioBufferLen: %d, timestampe: %ld, audioSourceType: %d", + "AcquireAudioBuffer, audioBufferLen: %d, timestampe: %" PRId64", audioSourceType: %d", audioBuffer->size, audioBuffer->timestamp, audioBuffer->type); if ((aFile != nullptr) && (audioBuffer->buf != nullptr) && (type == OH_MIC)) { int32_t ret = fwrite(audioBuffer->buf, 1, audioBuffer->size, aFile); @@ -158,7 +159,7 @@ void ScreenCaptureNdkTestCallback::OnVideoBufferAvailable(bool isReady) OH_NativeBuffer_GetConfig(nativeBuffer, &config); int32_t length = config.height * config.width * size; LOG(g_vIndex % g_logCount != 0, - "AcquireVideoBuffer, videoBufferLen: %d, timestamp: %ld, size: %d", length, timestamp, length); + "AcquireVideoBuffer, videoBufferLen: %d, timestamp: %" PRId64", size: %d", length, timestamp, length); DumpVideoFile(nativeBuffer, length); OH_NativeBuffer_Unreference(nativeBuffer); if (g_vFlag == 1) { -- GitLab