From b1a169cbcff01462a85730239ba50aa4a0f7c46c Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 27 Apr 2024 09:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=AF=E6=94=BE=E5=A4=A7?= =?UTF-8?q?=E5=80=8D=E6=95=B0=E7=9A=84=E5=8F=82=E6=95=B0=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/camera2/ndkcamera.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/cpp/camera2/ndkcamera.cpp b/app/src/main/cpp/camera2/ndkcamera.cpp index 437190e0..5abab717 100644 --- a/app/src/main/cpp/camera2/ndkcamera.cpp +++ b/app/src/main/cpp/camera2/ndkcamera.cpp @@ -324,6 +324,18 @@ int NdkCamera::open(const std::string& cameraId) { awbLockAvailable = (status == ACAMERA_OK) ? (*e.data.u8 == ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_TRUE) : false; } + { + ACameraMetadata_const_entry val = {0}; + status = ACameraMetadata_getConstEntry(camera_metadata, ACAMERA_CONTROL_ZOOM_RATIO_RANGE, &val); + if (status == ACAMERA_OK) + { + float zoomRatioMin = val.data.f[0]; + float zoomRatioMax = val.data.f[1]; + + ALOGI("Zoom Ratio Range: %f -> %f", zoomRatioMin, zoomRatioMax); + } + } + { ACameraMetadata_const_entry val = {0}; status = ACameraMetadata_getConstEntry(camera_metadata, ACAMERA_CONTROL_AE_COMPENSATION_RANGE, &val);