Patch Detail
Show a patch.
GET /api/patches/1410/?format=api
{ "id": 1410, "url": "https://patchwork.libcamera.org/api/patches/1410/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1410/", "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": "<20190612004359.15772-15-niklas.soderlund@ragnatech.se>", "date": "2019-06-12T00:43:57", "name": "[libcamera-devel,v2,14/16] cam: Validate camera configuration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d5190905d435be97bf2bf0c452549990450ab693", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1410/mbox/", "series": [ { "id": 351, "url": "https://patchwork.libcamera.org/api/series/351/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=351", "date": "2019-06-12T00:43:43", "name": "libcamera: Add support for format information and validation", "version": 2, "mbox": "https://patchwork.libcamera.org/series/351/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1410/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1410/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6891661FB7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2019 02:45:05 +0200 (CEST)", "from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 3b1b2b01-8cab-11e9-8601-0050569116f7;\n\tWed, 12 Jun 2019 02:44:27 +0200 (CEST)" ], "X-Halon-ID": "3b1b2b01-8cab-11e9-8601-0050569116f7", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 12 Jun 2019 02:43:57 +0200", "Message-Id": "<20190612004359.15772-15-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190612004359.15772-1-niklas.soderlund@ragnatech.se>", "References": "<20190612004359.15772-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 14/16] cam: Validate camera\n\tconfiguration", "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": "Wed, 12 Jun 2019 00:45:05 -0000" }, "content": "Use CameraConfiguration::validate() to validate and possibly update the\ncamera configuration when its prepared.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/main.cpp | 12 ++++++++++++\n 1 file changed, 12 insertions(+)", "diff": "diff --git a/src/cam/main.cpp b/src/cam/main.cpp\nindex c9ae22df5f9f123b..191fef3a3c8a2b64 100644\n--- a/src/cam/main.cpp\n+++ b/src/cam/main.cpp\n@@ -236,6 +236,18 @@ int CamApp::prepareConfig()\n \t\t}\n \t}\n \n+\tswitch (config_->validate()) {\n+\tcase CameraConfiguration::Valid:\n+\t\tbreak;\n+\tcase CameraConfiguration::Adjusted:\n+\t\tstd::cout << \"Camera configuration adjusted\" << std::endl;\n+\t\tbreak;\n+\tcase CameraConfiguration::Invalid:\n+\t\tstd::cout << \"Camera configuration invalid\" << std::endl;\n+\t\tconfig_.reset();\n+\t\treturn -EINVAL;\n+\t}\n+\n \treturn 0;\n }\n \n", "prefixes": [ "libcamera-devel", "v2", "14/16" ] }