Patch Detail
Show a patch.
GET /api/patches/15795/?format=api
{ "id": 15795, "url": "https://patchwork.libcamera.org/api/patches/15795/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15795/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20220505104104.70841-13-tomi.valkeinen@ideasonboard.com>", "date": "2022-05-05T10:41:03", "name": "[libcamera-devel,v7,12/13] py: add support for setting Rectangle and Size controls", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2435b75e9e5a7a34cf2471f38c8ded167b55b25a", "submitter": { "id": 109, "url": "https://patchwork.libcamera.org/api/people/109/?format=api", "name": "Tomi Valkeinen", "email": "tomi.valkeinen@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15795/mbox/", "series": [ { "id": 3093, "url": "https://patchwork.libcamera.org/api/series/3093/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3093", "date": "2022-05-05T10:40:51", "name": "Python bindings", "version": 7, "mbox": "https://patchwork.libcamera.org/series/3093/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15795/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15795/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 500DBC326C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 5 May 2022 10:41:39 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 041066563F;\n\tThu, 5 May 2022 12:41:39 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1344865645\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 5 May 2022 12:41:32 +0200 (CEST)", "from deskari.lan (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 80B49D9D;\n\tThu, 5 May 2022 12:41:31 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1651747299;\n\tbh=7ewMQMZf89XHV6ZaBIDyoZUBi1MJitfvIQ3YDvgenug=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=I3W911YCnBSHtIokLsXBiVNRQAC0GVk0ogtaCCqAI/9M7RpwTHp4klXKLGJ+/WCrU\n\tSj/FtENsHEBm9RCk71wAmUd/sx2DUgm698R/rAKt1eycsd9wQePS2Zymgx0j3u4yul\n\tRjJxVJMXWPSWzT1PA9Gk2ePkN6KBcoNYSKqrtcUSAGolssnldeFEyC4oK9V7mRfvKv\n\t2VPZIJF5KEIoR2VoMEAqtfQPKOC/hd4A8YWekixF32yMPrt1MpM5ZpQ8/+hLEov8eY\n\trhuZ9R4qfvgIn+fm/WdsbTtDo1fCYyjOb/EZmMJMmBLCrTvtKYyIPHWqVZ1xfShQXi\n\t2S5sZcIeKEUYQ==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1651747291;\n\tbh=7ewMQMZf89XHV6ZaBIDyoZUBi1MJitfvIQ3YDvgenug=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=qvqHBVQMiVC+VrfVFRCdyiLGGdh6a9Q5+B5X7b1fMGhs44W+G9B9i8GPNDPWnTVJ4\n\tYmPlM5IPBFsbPGR7ooT2LVCZjmMQOZYuz/tn8u2P2IW/0sK+/12+h3boFyTiWN8A6C\n\tZneTvPjKn/LUxH/iWUUMgqt9zvPyxuBqzluJOYXE=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"qvqHBVQM\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>", "Date": "Thu, 5 May 2022 13:41:03 +0300", "Message-Id": "<20220505104104.70841-13-tomi.valkeinen@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220505104104.70841-1-tomi.valkeinen@ideasonboard.com>", "References": "<20220505104104.70841-1-tomi.valkeinen@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v7 12/13] py: add support for setting\n\tRectangle and Size controls", "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>", "From": "Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: David Plowman <david.plowman@raspberrypi.com>\n\nAllows, for example, ScalerCrop to be controlled for digital zoom.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nSigned-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n---\n src/py/libcamera/pymain.cpp | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/py/libcamera/pymain.cpp b/src/py/libcamera/pymain.cpp\nindex 6375e326..b9b52f6b 100644\n--- a/src/py/libcamera/pymain.cpp\n+++ b/src/py/libcamera/pymain.cpp\n@@ -101,8 +101,14 @@ static ControlValue PyToControlValue(const py::object &ob, ControlType type)\n \t\treturn ControlValueMaybeArray<float>(ob);\n \tcase ControlTypeString:\n \t\treturn ControlValue(ob.cast<string>());\n-\tcase ControlTypeRectangle:\n-\tcase ControlTypeSize:\n+\tcase ControlTypeRectangle: {\n+\t\tauto array = ob.cast<std::array<int32_t, 4>>();\n+\t\treturn ControlValue(Rectangle(array[0], array[1], array[2], array[3]));\n+\t}\n+\tcase ControlTypeSize: {\n+\t\tauto array = ob.cast<std::array<int32_t, 2>>();\n+\t\treturn ControlValue(Size(array[0], array[1]));\n+\t}\n \tcase ControlTypeNone:\n \tdefault:\n \t\tthrow runtime_error(\"Control type not implemented\");\n", "prefixes": [ "libcamera-devel", "v7", "12/13" ] }