From patchwork Tue Nov 23 10:40:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 14700 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 7DCC4C324F for ; Tue, 23 Nov 2021 10:41:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 251E26038B; Tue, 23 Nov 2021 11:41:08 +0100 (CET) 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="SUOAdKUU"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0029E6033C for ; Tue, 23 Nov 2021 11:41:05 +0100 (CET) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 93BF4A1B; Tue, 23 Nov 2021 11:41:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1637664065; bh=ZUkNXUnz2bmlUyd22jZRxTz/qfGZO9eVWitwIwL/U4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SUOAdKUUr9SbsVDx5lAYziQ6r1hMGTOi81WrdGuY2n4K2sJ0Z97Lb5w332WEFR4cY zQx80HyxS87NWAZluvFZ/WUxthRiZI5cxjSady8IvOtVUIRHBaioeJqpYqqvTGoOS2 G5kO3QfuGZlVLFyvxY6Xh3PRAjUQWYuMBpJBGppc= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 23 Nov 2021 19:40:39 +0900 Message-Id: <20211123104042.3100902-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211123104042.3100902-1-paul.elder@ideasonboard.com> References: <20211123104042.3100902-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/7] android: camera_capabilities: Fix the type of the capability vector 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" The type of elements of the capability vector that is set in the static metadata must be uint8_t. The enum will not suffice, as it is int32_t. Fix this. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham --- src/android/camera_capabilities.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 8484c682..875d38da 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -1379,7 +1379,8 @@ int CameraCapabilities::initializeStaticMetadata() /* Check capabilities */ capabilities_ = computeCapabilities(); - std::vector + /* This *must* uint8_t. */ + std::vector capsVec(capabilities_.begin(), capabilities_.end()); staticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_CAPABILITIES, capsVec);