Patch Detail
Show a patch.
GET /api/patches/19092/?format=api
{ "id": 19092, "url": "https://patchwork.libcamera.org/api/patches/19092/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19092/", "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": "<20230928094526.21999-1-david.plowman@raspberrypi.com>", "date": "2023-09-28T09:45:26", "name": "[libcamera-devel] py: Add the SensorConfiguration class", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ceb3c938dbec4d20847ac4bdc6d417cedbd51e09", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19092/mbox/", "series": [ { "id": 4042, "url": "https://patchwork.libcamera.org/api/series/4042/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4042", "date": "2023-09-28T09:45:26", "name": "[libcamera-devel] py: Add the SensorConfiguration class", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4042/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19092/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19092/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 AD3B4BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Sep 2023 09:45:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 20FFC61DE3;\n\tThu, 28 Sep 2023 11:45:35 +0200 (CEST)", "from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0DEAC61DE1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Sep 2023 11:45:33 +0200 (CEST)", "by mail-wr1-x436.google.com with SMTP id\n\tffacd0b85a97d-32483535e51so653813f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Sep 2023 02:45:33 -0700 (PDT)", "from pi5-davidp.pitowers.org\n\t([2a00:1098:3142:14:183e:6cc8:a436:a27c])\n\tby smtp.gmail.com with ESMTPSA id\n\tp17-20020a5d68d1000000b003217cbab88bsm360133wrw.16.2023.09.28.02.45.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 28 Sep 2023 02:45:29 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1695894335;\n\tbh=pI4a/mUF7TzAq9tl4K0ADiq+L14vMK8Q/oCJGWpz1is=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=DLZpV8BT4DcwzFa7eqnlWwWuEdCp8K89O4oHQT6F07EyF8exKeWovzMerfJosE5tN\n\tBSZwc+2F/XEodrulWcxw47txUmxlNUii3xc6p42tsRCj0AwCCzRx0eOdn6laK3aex9\n\ty/G1Lz+kvcsgXoYJ7IHYPEa2R+XSi5Wt6vjgji6hZMaVkeuPpUCRfT1S4XMbKVsNGz\n\t7wMwChHJvWKTaleDkQfuTEZe//nyrNd/n6OpnmYsIvJlKmDnUZ/QKy9b6V1ovWBueg\n\trRHTuihJmasLRTsC7RctNURI99XNDCB2mGhP4neR/UpRg3AwyxCS+S0o+O2WCPp6J5\n\twW4smOwG/w4sQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1695894332; x=1696499132;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=bqubCjiB3WjRoqiL3XMvMG37Eu/cr39ftG1FkAhf3Y0=;\n\tb=F/x30JsYmTj9tPvAHQbdJZS4Bm3xK99UGQBWnOHER+iryPlZt9EqIn94mi0BTOqddJ\n\tkPdlntOuOtDxJQcU8R2CYGZcxFFZ1fs+p7H/0/dkq9aKeez0YnRr88uSjg/0BwArUy3z\n\tyXfxwIn1ejuaOJrcltoIkZMp3puclgb/2nsxS2XurhsAqalFVNiQU3n+0vuyyGVf8WxT\n\tLt2nBvBn7GxZuLV5DbsuW2mxdSpU8KdoaOht1+amvTpTAoQTQQmZmVUJCQTTOAsIWd/T\n\tI813UUNMsC145pnNi1eT08qe1ew5Brdb55nLKzkmuxeCQyKMPo9Auy/9g9zxBawY77E4\n\taZOg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"F/x30JsY\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1695894332; x=1696499132;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=bqubCjiB3WjRoqiL3XMvMG37Eu/cr39ftG1FkAhf3Y0=;\n\tb=QnH/bAjdXVqvOqGdRJRb0GLlJa1NEfSItbWYoB+YaBGIefQo8NkFVHX1zmnkwCFIFX\n\tnj/RVyieufQnbATpU6uiLQqI/y05fVNSNe0NvbKguzdgdGteBQwzJEqGDeiXNVggYLOo\n\tFsvMKkWVqQ87XS3HgbDghonCMeoCkV6/cahz+Y+hL4Zem2Oyfm/oatMCpHCGbQC+xS1v\n\tJKatT4QL3+at38vM5MmWbvqL8JMwrkdheU8iRLHPl29LHAk260BpkwYpjpozW7676ila\n\t8HD8DPY0HHPW5mbr3w8iHwZpme6ke/okP3rGy5irl8mR4tzKQXwHBavd+gvHaPnylyuV\n\txnfA==", "X-Gm-Message-State": "AOJu0YwK580mmLwM59sb2A26Q2Z9PNO/cbwnZLVp2yGWgIsT8IuOfZY+\n\tFQPglk1rgu52v/dIsly3YCjGoKG86SRvJ++mNlE=", "X-Google-Smtp-Source": "AGHT+IEY1oyhgBFwFu7LLXi6+qiVSBayvBuXkc72g2N9O+g/Y8Cj+gDmK1wqjXzbFLYiCHOdL4RggA==", "X-Received": "by 2002:adf:ce8b:0:b0:321:66a5:4da4 with SMTP id\n\tr11-20020adfce8b000000b0032166a54da4mr753034wrn.2.1695894332205; \n\tThu, 28 Sep 2023 02:45:32 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 28 Sep 2023 10:45:26 +0100", "Message-Id": "<20230928094526.21999-1-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.39.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] py: Add the SensorConfiguration class", "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": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "David Plowman <david.plowman@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "We provide access to the bitDepth and outputSize fields of the new\nSensorConfiguration class. The class also needs a constructor so that\nPython applications can make one and put it into the\nCameraConfiguration.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/py/libcamera/py_main.cpp | 7 +++++++\n 1 file changed, 7 insertions(+)", "diff": "diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp\nindex 01fb15a9..8df04520 100644\n--- a/src/py/libcamera/py_main.cpp\n+++ b/src/py/libcamera/py_main.cpp\n@@ -112,6 +112,7 @@ PYBIND11_MODULE(_libcamera, m)\n \n \tauto pyCameraManager = py::class_<PyCameraManager, std::shared_ptr<PyCameraManager>>(m, \"CameraManager\");\n \tauto pyCamera = py::class_<Camera, PyCameraSmartPtr<Camera>>(m, \"Camera\");\n+\tauto pySensorConfiguration = py::class_<SensorConfiguration>(m, \"SensorConfiguration\");\n \tauto pyCameraConfiguration = py::class_<CameraConfiguration>(m, \"CameraConfiguration\");\n \tauto pyCameraConfigurationStatus = py::enum_<CameraConfiguration::Status>(pyCameraConfiguration, \"Status\");\n \tauto pyStreamConfiguration = py::class_<StreamConfiguration>(m, \"StreamConfiguration\");\n@@ -281,6 +282,11 @@ PYBIND11_MODULE(_libcamera, m)\n \t\t\treturn ret;\n \t\t});\n \n+\tpySensorConfiguration\n+\t\t.def(py::init<>())\n+\t\t.def_readwrite(\"bit_depth\", &SensorConfiguration::bitDepth)\n+\t\t.def_readwrite(\"output_size\", &SensorConfiguration::outputSize);\n+\n \tpyCameraConfiguration\n \t\t.def(\"__iter__\", [](CameraConfiguration &self) {\n \t\t\treturn py::make_iterator<py::return_value_policy::reference_internal>(self);\n@@ -293,6 +299,7 @@ PYBIND11_MODULE(_libcamera, m)\n \t\t py::return_value_policy::reference_internal)\n \t\t.def_property_readonly(\"size\", &CameraConfiguration::size)\n \t\t.def_property_readonly(\"empty\", &CameraConfiguration::empty)\n+\t\t.def_readwrite(\"sensor_config\", &CameraConfiguration::sensorConfig)\n \t\t.def_readwrite(\"transform\", &CameraConfiguration::transform);\n \n \tpyCameraConfigurationStatus\n", "prefixes": [ "libcamera-devel" ] }