Patch Detail
Show a patch.
GET /api/1.1/patches/20653/?format=api
{ "id": 20653, "url": "https://patchwork.libcamera.org/api/1.1/patches/20653/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20653/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20240712052920.33396-6-umang.jain@ideasonboard.com>", "date": "2024-07-12T05:29:19", "name": "[RFC,5/6] libcamera: converter_v4l2_m2m: Add helper to apply controls", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "4dd718bd079637f0f35c5db235945b9dafcf61c9", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/20653/mbox/", "series": [ { "id": 4451, "url": "https://patchwork.libcamera.org/api/1.1/series/4451/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4451", "date": "2024-07-12T05:29:14", "name": "converter_dw100: Add vertex map support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4451/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20653/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20653/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A0BEAC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Jul 2024 05:29:49 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC16963377;\n\tFri, 12 Jul 2024 07:29:48 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F52963377\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jul 2024 07:29:39 +0200 (CEST)", "from localhost.localdomain (unknown\n\t[IPv6:2405:201:2015:f873:55f8:639e:8e9f:12ec])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 54146191B;\n\tFri, 12 Jul 2024 07:29:04 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qrAH9KDx\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720762145;\n\tbh=JorrjuSnTDdfn96gkyLW8ukdpSDHC33JP/GOpH6t8rQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=qrAH9KDxfPbiRm+bv5EAqxhdQHAzheyQvmMOvz56TmOUeMibTgXVM0Y+7gjP5gJFE\n\tHZTJieVpPRVU2Rp8i6Wxkx5L8lh2a6sLBYuLbdUkMErtsiV/UFYOl/PPTOy/sccdDX\n\tQbUIOpMaL0Mp/uvQaq3tNME8twmh9Oe8RRcvt+jY=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Xavier Roumegue <xavier.roumegue@oss.nxp.com>,\n\tUmang Jain <umang.jain@ideasonboard.com>", "Subject": "[RFC PATCH 5/6] libcamera: converter_v4l2_m2m: Add helper to apply\n\tcontrols", "Date": "Fri, 12 Jul 2024 10:59:19 +0530", "Message-ID": "<20240712052920.33396-6-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.45.0", "In-Reply-To": "<20240712052920.33396-1-umang.jain@ideasonboard.com>", "References": "<20240712052920.33396-1-umang.jain@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add applyControls() helper to apply controls for a stream.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n .../internal/converter/converter_v4l2_m2m.h | 5 +++++\n src/libcamera/converter/converter_v4l2_m2m.cpp | 18 ++++++++++++++++++\n 2 files changed, 23 insertions(+)", "diff": "diff --git a/include/libcamera/internal/converter/converter_v4l2_m2m.h b/include/libcamera/internal/converter/converter_v4l2_m2m.h\nindex f61beef8..9d3d62d6 100644\n--- a/include/libcamera/internal/converter/converter_v4l2_m2m.h\n+++ b/include/libcamera/internal/converter/converter_v4l2_m2m.h\n@@ -24,6 +24,7 @@\n \n namespace libcamera {\n \n+class ControlList;\n class FrameBuffer;\n class MediaDevice;\n class Size;\n@@ -61,6 +62,8 @@ public:\n \tint setCrop(const Stream *stream, Rectangle *rect);\n \tstd::pair<Rectangle, Rectangle> getCropBounds(const Stream *stream);\n \n+\tint applyControls(const Stream *stream, ControlList &ctrls);\n+\n protected:\n \tclass Mapping\n \t{\n@@ -97,6 +100,8 @@ private:\n \t\tint start();\n \t\tvoid stop();\n \n+\t\tint applyControls(ControlList &ctrls);\n+\n \t\tint queueBuffers(FrameBuffer *input, FrameBuffer *output);\n \n \t\tint setSelection(unsigned int target, Rectangle *rect);\ndiff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp\nindex 9752a23e..9ff5102a 100644\n--- a/src/libcamera/converter/converter_v4l2_m2m.cpp\n+++ b/src/libcamera/converter/converter_v4l2_m2m.cpp\n@@ -15,6 +15,7 @@\n #include <libcamera/base/signal.h>\n #include <libcamera/base/utils.h>\n \n+#include <libcamera/controls.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/geometry.h>\n #include <libcamera/stream.h>\n@@ -186,6 +187,11 @@ void V4L2M2MConverter::V4L2M2MStream::captureBufferReady(FrameBuffer *buffer)\n \tconverter_->outputBufferReady.emit(buffer);\n }\n \n+int V4L2M2MConverter::V4L2M2MStream::applyControls(ControlList &ctrls)\n+{\n+\treturn m2m_->capture()->setControls(&ctrls);\n+};\n+\n /* -----------------------------------------------------------------------------\n * V4L2M2MConverter\n */\n@@ -532,6 +538,18 @@ int V4L2M2MConverter::queueBuffers(FrameBuffer *input,\n \treturn 0;\n }\n \n+/**\n+ * libcamera::Converter::applyControls\n+ */\n+int V4L2M2MConverter::applyControls(const Stream *stream, ControlList &ctrls)\n+{\n+\tauto iter = streams_.find(stream);\n+\tif (iter == streams_.end())\n+\t\treturn -EINVAL;\n+\n+\treturn iter->second->applyControls(ctrls);\n+}\n+\n /*\n * \\todo: This should be extended to include Feature::Flag to denote\n * what each converter supports feature-wise.\n", "prefixes": [ "RFC", "5/6" ] }