From 7af7a472ae49707acb27846af48ac6c97431e1e6 Mon Sep 17 00:00:00 2001 From: BlueMatthew Date: Fri, 5 Jan 2024 10:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A6=E5=8F=91=E8=87=AA=E5=8A=A8=E5=AF=B9?= =?UTF-8?q?=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/camera2/ndkcamera.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/camera2/ndkcamera.cpp b/app/src/main/cpp/camera2/ndkcamera.cpp index c0056914..29eb6d3a 100644 --- a/app/src/main/cpp/camera2/ndkcamera.cpp +++ b/app/src/main/cpp/camera2/ndkcamera.cpp @@ -396,7 +396,10 @@ int NdkCamera::open(const std::string& cameraId) { } else { - m_imagesCaptured = 0; + uint8_t trig = ACAMERA_CONTROL_AF_TRIGGER_START; + res = ACaptureRequest_setEntry_u8(capture_request, ACAMERA_CONTROL_AF_TRIGGER, 1, &trig); + m_imagesCaptured = (res == ACAMERA_OK) ? ~0 : 0; + // m_imagesCaptured = 0; } uint8_t awbMode = ACAMERA_CONTROL_AWB_MODE_AUTO;