From patchwork Wed Jul 17 10:09:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 20691 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 9B5B1C3243 for ; Wed, 17 Jul 2024 10:09:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 148E263382; Wed, 17 Jul 2024 12:09:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pnD9N+ci"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D94976336F for ; Wed, 17 Jul 2024 12:09:28 +0200 (CEST) Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E1502ABE; Wed, 17 Jul 2024 12:08:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1721210931; bh=hQDRXTq2uBYowpiXe2ATjbRCs9EdyvNYwqK56ISW14M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnD9N+ci3aDAEJCRi+hRYtWbZ9KMKKyiF+eA+1x+HvYidIQnVgTKktPrM3l5fmdzt dpp2hVoEBpn31FE3JR1A1OhdwFMK17+GzHa1p4RlqWhHG0WP5XgUrIGyXFWkcNQP4H nlVORblk/adTZw/DYBxIydQ+8MKt8N4UwsuU01cc= From: Jacopo Mondi To: Umang Jain , libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi Subject: [RFC 5/9] fixups: Make it compile Date: Wed, 17 Jul 2024 12:09:08 +0200 Message-ID: <20240717100913.16640-6-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240717100913.16640-1-jacopo.mondi@ideasonboard.com> References: <20240717100913.16640-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 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" Signed-off-by: Jacopo Mondi --- src/libcamera/converter.cpp | 4 ++-- src/libcamera/converter/converter_v4l2_m2m.cpp | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/libcamera/converter.cpp b/src/libcamera/converter.cpp index 65f4f96bafa5..a959003aaa73 100644 --- a/src/libcamera/converter.cpp +++ b/src/libcamera/converter.cpp @@ -177,7 +177,7 @@ Converter::~Converter() */ int Converter::setCrop([[maybe_unused]] const Stream *stream, [[maybe_unused]] Rectangle *rect) { - if (!(getFeatures() & Feature::Crop)) { + if (!(features() & Feature::Crop)) { LOG(Converter, Error) << "Converter doesn't support cropping capabilities"; return -ENOTSUP; } @@ -200,7 +200,7 @@ std::pair Converter::getCropBounds([[maybe_unused]] const const StreamConfiguration &config = stream->configuration(); Rectangle rect; - if (!(getFeatures() & Feature::Crop)) + if (!(features() & Feature::Crop)) LOG(Converter, Error) << "Converter doesn't support cropping capabilities"; /* diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp index eaae35288194..e381e474c1c7 100644 --- a/src/libcamera/converter/converter_v4l2_m2m.cpp +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp @@ -389,7 +389,7 @@ int V4L2M2MConverter::exportBuffers(const Stream *stream, unsigned int count, */ int V4L2M2MConverter::setCrop(const Stream *stream, Rectangle *rect) { - if (!(getFeatures() & Feature::Crop)) + if (!(features() & Feature::Crop)) return -ENOTSUP; auto iter = streams_.find(stream); @@ -414,7 +414,7 @@ V4L2M2MConverter::getCropBounds(const Stream *stream) maxCrop.width = UINT_MAX; maxCrop.height = UINT_MAX; - if (!(getFeatures() & Feature::Crop)) { + if (!(features() & Feature::Crop)) { LOG(Converter, Error) << "Crop functionality is not supported"; return {}; } @@ -532,10 +532,6 @@ int V4L2M2MConverter::queueBuffers(FrameBuffer *input, return 0; } -/* - * \todo: This should be extended to include Feature::Flag to denote - * what each converter supports feature-wise. - */ static std::initializer_list compatibles = { "mtk-mdp", "pxp",