From patchwork Thu Jul 2 21:36:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 8563 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 77121BE905 for ; Thu, 2 Jul 2020 21:37:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 454F860CBC; Thu, 2 Jul 2020 23:37:10 +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="qpjMbeT7"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 930B060C59 for ; Thu, 2 Jul 2020 23:37:05 +0200 (CEST) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3321FA2D; Thu, 2 Jul 2020 23:37:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1593725825; bh=I1wp9s75ueoou49UbaFzesjuDck3Y2J7kqNLX/OAk2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qpjMbeT7xn/zLzPJ4doX95htUIwMBc3vQLk7VadDLk4B8VjOxnb6WradC29MUMgm2 JZo00WwordyGxXsdaGGP1CdDnu+rdSqyFARFF4RWdQVTR10ng8hRtBktamsux3gkp+ ERQy8N11c5TfTZ9ADl4++YEKESvRnZEqfGrf2QBE= From: Kieran Bingham To: libcamera devel Date: Thu, 2 Jul 2020 22:36:53 +0100 Message-Id: <20200702213654.2129054-9-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702213654.2129054-1-kieran.bingham@ideasonboard.com> References: <20200702213654.2129054-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 8/9] android: camera_device: Remove single buffer restriction. 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 capture request is no longer limited to a single output buffer. Remove the limitation, but (for now) keep the check to ensure that at least one buffer is always provided. This 'should never happen' so could be a LOG(Fatal) or removed. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/android/camera_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index eea8c8c50352..4681fd8af90b 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1046,7 +1046,7 @@ static FrameBuffer *newFrameBuffer(const buffer_handle_t camera3buffer) int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Request) { - if (camera3Request->num_output_buffers != 1) { + if (camera3Request->num_output_buffers < 1) { LOG(HAL, Error) << "Invalid number of output buffers: " << camera3Request->num_output_buffers; return -EINVAL;