Patch Detail
Show a patch.
GET /api/1.1/patches/3103/?format=api
{ "id": 3103, "url": "https://patchwork.libcamera.org/api/1.1/patches/3103/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3103/", "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": "<20200316020109.2466468-1-niklas.soderlund@ragnatech.se>", "date": "2020-03-16T02:01:09", "name": "[libcamera-devel] cam: Create stream names after configuring the camera", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ccad0d39aad39e105884854914db17daf063974e", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3103/mbox/", "series": [ { "id": 720, "url": "https://patchwork.libcamera.org/api/1.1/series/720/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=720", "date": "2020-03-16T02:01:09", "name": "[libcamera-devel] cam: Create stream names after configuring the camera", "version": 1, "mbox": "https://patchwork.libcamera.org/series/720/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3103/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3103/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D8FFA6041D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Mar 2020 03:01:17 +0100 (CET)", "from bismarck.berto.se (p4fca2392.dip0.t-ipconnect.de\n\t[79.202.35.146]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 038a35bd-672a-11ea-9f85-005056917a89;\n\tMon, 16 Mar 2020 03:01:16 +0100 (CET)" ], "X-Halon-ID": "038a35bd-672a-11ea-9f85-005056917a89", "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": "Mon, 16 Mar 2020 03:01:09 +0100", "Message-Id": "<20200316020109.2466468-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] cam: Create stream names after\n\tconfiguring the camera", "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>", "X-List-Received-Date": "Mon, 16 Mar 2020 02:01:18 -0000" }, "content": "The stream in the stream configuration is not filled in before we\nconfigure the camera, move the generating and caching of names after the\nconfiguration.\n\nWithout this fix writing multiple streams to disk overwrites the frames\nas the filenames are not unique.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/cam/capture.cpp | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp\nindex b62a9b24b2169b05..55fa2dabcee97f21 100644\n--- a/src/cam/capture.cpp\n+++ b/src/cam/capture.cpp\n@@ -30,18 +30,18 @@ int Capture::run(EventLoop *loop, const OptionsParser::Options &options)\n \t\treturn -ENODEV;\n \t}\n \n+\tret = camera_->configure(config_);\n+\tif (ret < 0) {\n+\t\tstd::cout << \"Failed to configure camera\" << std::endl;\n+\t\treturn ret;\n+\t}\n+\n \tstreamName_.clear();\n \tfor (unsigned int index = 0; index < config_->size(); ++index) {\n \t\tStreamConfiguration &cfg = config_->at(index);\n \t\tstreamName_[cfg.stream()] = \"stream\" + std::to_string(index);\n \t}\n \n-\tret = camera_->configure(config_);\n-\tif (ret < 0) {\n-\t\tstd::cout << \"Failed to configure camera\" << std::endl;\n-\t\treturn ret;\n-\t}\n-\n \tcamera_->requestCompleted.connect(this, &Capture::requestComplete);\n \n \tif (options.isSet(OptFile)) {\n", "prefixes": [ "libcamera-devel" ] }