From c0ca4f736c921f583fb08b5d6be3ae3b3869d796 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 18 Jul 2024 08:33:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/camera2/ndkcamera.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/cpp/camera2/ndkcamera.cpp b/app/src/main/cpp/camera2/ndkcamera.cpp index a7dd0f35..65860660 100644 --- a/app/src/main/cpp/camera2/ndkcamera.cpp +++ b/app/src/main/cpp/camera2/ndkcamera.cpp @@ -364,11 +364,13 @@ int NdkCamera::open(const std::string& cameraId) { status = ACameraMetadata_getConstEntry(camera_metadata,ACAMERA_CONTROL_AF_AVAILABLE_MODES, &e); // AASSERT(status == ACAMERA_OK, "ACameraMetadata_getConstEntry::ACAMERA_CONTROL_AF_AVAILABLE_MODES return error, %d", status); #ifdef _DEBUG + std::string afModes; for (int idx = 0; idx < e.count; idx++) { - unsigned int m = e.data.u8[idx]; - XYLOG(XYLOG_SEVERITY_DEBUG, "Available AF Mode %u", m); + afModes += std::to_string(e.data.u8[idx]) + " "; + } + XYLOG(XYLOG_SEVERITY_DEBUG, "Available AF Mode: ", m); #endif afSupported = (status == ACAMERA_OK) && !(e.count == 0 || (e.count == 1 && e.data.u8[0] == ACAMERA_CONTROL_AF_MODE_OFF)); } @@ -445,7 +447,7 @@ int NdkCamera::open(const std::string& cameraId) { float zoomRatioMin = val.data.f[0]; float zoomRatioMax = val.data.f[1]; - ALOGI("Zoom Ratio Range: %f -> %f", zoomRatioMin, zoomRatioMax); + ALOGI("Zoom Ratio Range: [%f,%f]", zoomRatioMin, zoomRatioMax); } }