From patchwork Fri Jul 30 08:28:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13155 X-Patchwork-Delegate: umang.jain@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 168D7C322E for ; Fri, 30 Jul 2021 08:28:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9A6A3687C7; Fri, 30 Jul 2021 10:28:48 +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="LkMZEZcv"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0617B687BD for ; Fri, 30 Jul 2021 10:28:47 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 08C9E89B; Fri, 30 Jul 2021 10:28:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1627633726; bh=HlW5R2SNtKxGNYc1mxaqIy2EmB6XbNLOA2PPxJe9g1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LkMZEZcvb5YjXNYe/WqXACh7oezOnri0zKBXLNDVJrJLqPgKW78A2mjFqbD6KAWI8 gJKq0fwH2Aa0p1nIGpaongrORqlOdtVTiabbfUrF34iRhTqyr7iEhQeTb11WNtxhUY CjTp/q6Iou1CYHx3tVm9Je/w3uypdo86UZ+DYf+Q= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Fri, 30 Jul 2021 13:58:26 +0530 Message-Id: <20210730082832.152626-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210730082832.152626-1-umang.jain@ideasonboard.com> References: <20210730082832.152626-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 1/3] libcamera: base: camera_sensor: Expose sensor's formats map 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" Add a getter function formats() to retrieve the V4L2Subdevice::format map of all the formats that the sensor supports. This will probably be used by pipeline handlers to match against a custom list of formats internally while making a selection on sensor's format to be used for image capture. Signed-off-by: Umang Jain --- include/libcamera/internal/camera_sensor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index db12b07e..d8826e8a 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -37,6 +37,7 @@ public: const std::string &model() const { return model_; } const std::string &id() const { return id_; } const MediaEntity *entity() const { return entity_; } + const V4L2Subdevice::Formats &formats() const { return formats_; } const std::vector &mbusCodes() const { return mbusCodes_; } const std::vector &sizes() const { return sizes_; } Size resolution() const;