From patchwork Wed Oct 21 15:41:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10186 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8C60CBDB13 for ; Wed, 21 Oct 2020 15:42:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 432EE60995; Wed, 21 Oct 2020 17:42:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="s/Wr8be5"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 56F4360E31 for ; Wed, 21 Oct 2020 17:41:56 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 014F292; Wed, 21 Oct 2020 17:41:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1603294916; bh=7XRIr5RtZR4JrnPX+8VdL17j1FfDzRAPZsCq5A5ApUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s/Wr8be5VzhB0W8D3HZn4g5c+HLTM25VFXn4NOC+b6T3nBzW+282hlm9pwqSRwC/B cwuJVVUrPO/pN/A1vjSM7d6JuwVTzx3LHsr4oozglVG/BqcerE+zn5YQ2v+CEobfEM BKDIi1VKatUpoXqiVi1yMalMOuYhSBM+Cf5ZPtbs= From: Kieran Bingham To: libcamera devel Date: Wed, 21 Oct 2020 16:41:42 +0100 Message-Id: <20201021154148.511505-10-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201021154148.511505-1-kieran.bingham@ideasonboard.com> References: <20201021154148.511505-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 09/15] android: camera_device: Rename shadowed variable X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" A FrameBuffer *buffer is used to obtain the 'first' buffer from a request which is used purely to identify the timestamp from the metadata. This should be determined by the Request, and set appropriately by the pipeline handlers, but make sure that this buffer instance is distinct for now. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/android/camera_device.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 9cf1c98410f9..7bb2560025e2 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1488,9 +1488,9 @@ void CameraDevice::requestComplete(Request *request) * It might be appropriate to return a 'correct' (as determined by * pipeline handlers) timestamp in the Request itself. */ - FrameBuffer *buffer = buffers.begin()->second; + FrameBuffer *timestampBuf = buffers.begin()->second; resultMetadata = getResultMetadata(descriptor->frameNumber_, - buffer->metadata().timestamp); + timestampBuf->metadata().timestamp); /* Handle any JPEG compression. */ for (unsigned int i = 0; i < descriptor->numBuffers_; ++i) { @@ -1548,7 +1548,7 @@ void CameraDevice::requestComplete(Request *request) if (status == CAMERA3_BUFFER_STATUS_OK) { notifyShutter(descriptor->frameNumber_, - buffer->metadata().timestamp); + timestampBuf->metadata().timestamp); captureResult.partial_result = 1; captureResult.result = resultMetadata->get();