Patch Detail
Show a patch.
GET /api/1.1/patches/1860/?format=api
{ "id": 1860, "url": "https://patchwork.libcamera.org/api/1.1/patches/1860/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1860/", "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": "<20190827095008.11405-5-jacopo@jmondi.org>", "date": "2019-08-27T09:50:04", "name": "[libcamera-devel,v2,4/7] libcamera: v4l2_controls: Construct from a list of ids", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d274fb194f58595b5e0a49cc7f86e67492a574ea", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/1.1/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/1860/mbox/", "series": [ { "id": 468, "url": "https://patchwork.libcamera.org/api/1.1/series/468/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=468", "date": "2019-08-27T09:50:00", "name": "libcamera: camera_sensor: Collect camera location and sizes", "version": 2, "mbox": "https://patchwork.libcamera.org/series/468/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1860/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1860/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C72161924\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Aug 2019 11:48:47 +0200 (CEST)", "from uno.homenet.telecomitalia.it (unknown [87.18.63.98])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id AD7CF10000D;\n\tTue, 27 Aug 2019 09:48:46 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 27 Aug 2019 11:50:04 +0200", "Message-Id": "<20190827095008.11405-5-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20190827095008.11405-1-jacopo@jmondi.org>", "References": "<20190827095008.11405-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 4/7] libcamera: v4l2_controls:\n\tConstruct from a list of ids", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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>", "X-List-Received-Date": "Tue, 27 Aug 2019 09:48:47 -0000" }, "content": "Add a constructor for the V4L2ControlList class that accepts a list of\nV4L2 control IDs (V4L2_CID_*). The constructor returns a V4L2ControlList\ninstance to be used for reading controls only.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/v4l2_controls.h | 3 +++\n src/libcamera/v4l2_controls.cpp | 17 +++++++++++++++++\n 2 files changed, 20 insertions(+)", "diff": "diff --git a/src/libcamera/include/v4l2_controls.h b/src/libcamera/include/v4l2_controls.h\nindex 10b726504951..86c84e06d741 100644\n--- a/src/libcamera/include/v4l2_controls.h\n+++ b/src/libcamera/include/v4l2_controls.h\n@@ -65,6 +65,9 @@ public:\n \tusing iterator = std::vector<V4L2Control>::iterator;\n \tusing const_iterator = std::vector<V4L2Control>::const_iterator;\n \n+\tV4L2ControlList() {}\n+\tV4L2ControlList(std::vector<unsigned int> ids);\n+\n \titerator begin() { return controls_.begin(); }\n \tconst_iterator begin() const { return controls_.begin(); }\n \titerator end() { return controls_.end(); }\ndiff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp\nindex 84258d9954d0..eeb325cbfff9 100644\n--- a/src/libcamera/v4l2_controls.cpp\n+++ b/src/libcamera/v4l2_controls.cpp\n@@ -202,6 +202,23 @@ V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl)\n * and prepare to be re-used for a new control write/read sequence.\n */\n \n+/**\n+ * \\brief Construct a V4L2ControlList from a list of V4L2 controls identifiers\n+ * \\param ids A list of V4L2 control identifiers (V4L2_CID_*)\n+ *\n+ * Construct a V4L2ControlList from a list of control identifiers without any\n+ * value associated. This constructor is particularly useful to create a\n+ * V4L2ControlList that is used to read the values of all controls in the\n+ * \\a ids list. The created V4L2ControlList should not be used to write control\n+ * values unless it is cleared first and then controls with an associated value\n+ * are manually added to it.\n+ */\n+V4L2ControlList::V4L2ControlList(std::vector<unsigned int> ids)\n+{\n+\tfor (auto id : ids)\n+\t\tadd(id);\n+}\n+\n /**\n * \\typedef V4L2ControlList::iterator\n * \\brief Iterator on the V4L2 controls contained in the instance\n", "prefixes": [ "libcamera-devel", "v2", "4/7" ] }