Patch Detail
Show a patch.
GET /api/1.1/patches/14106/?format=api
{ "id": 14106, "url": "https://patchwork.libcamera.org/api/1.1/patches/14106/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14106/", "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": "<20211012022321.27034-4-laurent.pinchart@ideasonboard.com>", "date": "2021-10-12T02:23:21", "name": "[libcamera-devel,3/3] cam: Drop frames once the capture limit is reached", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "47419bcf02807905cddefdb1ead8476cb78d9c8c", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14106/mbox/", "series": [ { "id": 2616, "url": "https://patchwork.libcamera.org/api/1.1/series/2616/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2616", "date": "2021-10-12T02:23:18", "name": "libcamera: Assorted fixes for the cam application", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2616/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14106/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14106/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 1C1EAC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Oct 2021 02:23:44 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C088D68F5A;\n\tTue, 12 Oct 2021 04:23:42 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C08568F4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Oct 2021 04:23:40 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D43E98C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Oct 2021 04:23:39 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"fLFHJoS+\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634005420;\n\tbh=I23Z9JaXjMWBghec/NOt2m4OrRXgZVnbpe0uWSjU6pY=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=fLFHJoS+jKOcOfVYV4XGiOsl6Xzmyg9XCO/hu/X8FOwXPk0jLRDONgsm22f8ThhHr\n\tm6aa0Ws3F6szTCxApQYPINMBMwVDMdmhRHdB+Yzxcr8SqFE/pO9/sp9rCrwox3HAlo\n\t6XIwxFJIuHlqiJPbnytYrgj/ALh0trEhCg7HhQW0=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 12 Oct 2021 05:23:21 +0300", "Message-Id": "<20211012022321.27034-4-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20211012022321.27034-1-laurent.pinchart@ideasonboard.com>", "References": "<20211012022321.27034-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/3] cam: Drop frames once the capture\n\tlimit is reached", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The camera session keeps requeuing requests until the capture limit is\nreached. This causes more request than the limit to complete, as there's\na queue of requests in flight. When capturing from multiple cameras\nconcurrently, this results in the captureDone signal being emitted for\nevery request completion after the limit is reached, instead of once per\ncamera session when reaching the limit.\n\nFix this by simply dropping any request that completes after the limit\nis reached. We could instead avoid requeuing more requests than needed\nto reach the limit, but that may cause request starvation in pipelines,\nwhich are currently not handled consistently (or correctly).\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/camera_session.cpp | 3 +++\n 1 file changed, 3 insertions(+)", "diff": "diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp\nindex 605018278c5a..594cd51bb6a2 100644\n--- a/src/cam/camera_session.cpp\n+++ b/src/cam/camera_session.cpp\n@@ -348,6 +348,9 @@ void CameraSession::processRequest(Request *request)\n {\n \tconst Request::BufferMap &buffers = request->buffers();\n \n+\tif (captureLimit_ && captureCount_ >= captureLimit_)\n+\t\treturn;\n+\n \t/*\n \t * Compute the frame rate. The timestamp is arbitrarily retrieved from\n \t * the first buffer, as all buffers should have matching timestamps.\n", "prefixes": [ "libcamera-devel", "3/3" ] }