Patch Detail
Show a patch.
GET /api/1.1/patches/509/?format=api
{ "id": 509, "url": "https://patchwork.libcamera.org/api/1.1/patches/509/?format=api", "web_url": "https://patchwork.libcamera.org/patch/509/", "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": "<20190205000702.15370-7-niklas.soderlund@ragnatech.se>", "date": "2019-02-05T00:07:01", "name": "[libcamera-devel,RFC,6/7] libcamera: pipeline: uvcvideo: Add queueRequest support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "7a37e0a2f57b30c54bde5372b94cf24962b00fe9", "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": { "id": 16, "url": "https://patchwork.libcamera.org/api/1.1/users/16/?format=api", "username": "neg", "first_name": "Niklas", "last_name": "Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "mbox": "https://patchwork.libcamera.org/patch/509/mbox/", "series": [ { "id": 168, "url": "https://patchwork.libcamera.org/api/1.1/series/168/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=168", "date": "2019-02-05T00:06:55", "name": "libcamera: extend camera and pipeline to support requests", "version": 1, "mbox": "https://patchwork.libcamera.org/series/168/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/509/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/509/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 BEAFA60DCB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 Feb 2019 01:07:59 +0100 (CET)", "from localhost.localdomain (unknown [81.164.19.127])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 1708876c-28da-11e9-b530-005056917a89;\n\tTue, 05 Feb 2019 01:07:56 +0100 (CET)" ], "X-Halon-ID": "1708876c-28da-11e9-b530-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": "Tue, 5 Feb 2019 01:07:01 +0100", "Message-Id": "<20190205000702.15370-7-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190205000702.15370-1-niklas.soderlund@ragnatech.se>", "References": "<20190205000702.15370-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 6/7] libcamera: pipeline: uvcvideo: Add\n\tqueueRequest support", "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, 05 Feb 2019 00:08:00 -0000" }, "content": "From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nExtract the buffer from the Request bufferMap. The uvcvideo only supports a\nsingle stream and so expects only a single buffer to queue.\n\nQueue the retrieved buffer with the video device for processing.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/pipeline/uvcvideo.cpp | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex 3685dbf9d19c3d7d..632a4b4b09189240 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -6,6 +6,7 @@\n */\n \n #include <libcamera/camera.h>\n+#include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n #include \"device_enumerator.h\"\n@@ -126,6 +127,19 @@ void PipelineHandlerUVC::stop(const Camera *camera)\n \n int PipelineHandlerUVC::queueRequest(const Camera *camera, Request *request)\n {\n+\t/* Set any controls, queue any buffers */\n+\n+\tif (request->bufferMap.find(&stream_) == request->bufferMap.end()) {\n+\t\tLOG(UVC, Error)\n+\t\t\t<< \"Attempt to queue request with invalid stream\";\n+\n+\t\treturn -ENOENT;\n+\t}\n+\n+\tBuffer *buffer = request->bufferMap[&stream_];\n+\n+\tvideo_->queueBuffer(buffer);\n+\n \treturn 0;\n }\n \n", "prefixes": [ "libcamera-devel", "RFC", "6/7" ] }