Patch Detail
Show a patch.
GET /api/patches/16440/?format=api
{ "id": 16440, "url": "https://patchwork.libcamera.org/api/patches/16440/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16440/", "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": "<20220630000251.31295-4-laurent.pinchart@ideasonboard.com>", "date": "2022-06-30T00:02:42", "name": "[libcamera-devel,v2,03/12] gstreamer: Pass Stream to RequestWrap::addBuffer()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "cfb490e0fa49f22f528ef259818dc99f4faa6c3c", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16440/mbox/", "series": [ { "id": 3234, "url": "https://patchwork.libcamera.org/api/series/3234/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3234", "date": "2022-06-30T00:02:39", "name": "gstreamer: Queue multiple requests", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3234/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16440/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16440/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 65411BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 00:03:24 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A90EB65649;\n\tThu, 30 Jun 2022 02:03:22 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CD0465635\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 02:03:16 +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 D91216D1;\n\tThu, 30 Jun 2022 02:03:15 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656547402;\n\tbh=B3kxdjNm3quaucIqzryO44T44IywU5HNRV5Pl4jVILg=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=VKX/MHnFBeAi9ODu5I7hyN/6UL6ORT21oaNmwouuRu0X7GV5ivdp1AvHyMOt+/A+e\n\tnVeBypy6DRFIfVJkO9UGc3Cv4p/IIa9y7DzLlhy6pOBoaCc7mZKoq7d+WQHmJkPztk\n\tzzBiiMMlui0fHGYqTCXXcCxgU1CXMDje4xM3OFJrubHFYjPMr9xc4QFAHX2kv2HEQx\n\tkFpUeCOZSQde7STR+eSJzk6ieG9jYa7gzaJU0q/Ul3wQQWE6OOUdJRtPciRhhJcHfD\n\tmlkZaUkveeZlBHur+0TFfbU9LxD0HD0ftPnZUBtc6TB/xXVfYcLMi/YH9gMFiWEclt\n\t16jdK4pW1K26w==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656547396;\n\tbh=B3kxdjNm3quaucIqzryO44T44IywU5HNRV5Pl4jVILg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=r5cDhFRZMuVuVcfrabUtHJAoY3PAkKTeUoQsIWxw/A+ZvkGsR7deRqIBzbJl5Fari\n\t3hLkZ/iCWW8MNTWTlDFPFxJftZPYJgyPUTW/lNCaNso+iSe0i3yl+d+a9+xILhSNiP\n\tHz6J6kRhuvq5cPZhUgXmi9WkFwsG6rJNbSgUxhtE=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"r5cDhFRZ\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 30 Jun 2022 03:02:42 +0300", "Message-Id": "<20220630000251.31295-4-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220630000251.31295-1-laurent.pinchart@ideasonboard.com>", "References": "<20220630000251.31295-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 03/12] gstreamer: Pass Stream to\n\tRequestWrap::addBuffer()", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Cc": "Nicolas Dufresne <nicolas.dufresne@collabora.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "For symmetry with RequestWrap::removeBuffer(), pass the Stream pointer\nto addBuffer(). This handles streams at the GstPad level instead of the\nGstBuffer level, which allows making the GstLibcameraPool API a bit\ncleaner by removing the gst_libcamera_buffer_get_stream() helper\nfunction.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerapool.cpp | 7 -------\n src/gstreamer/gstlibcamerapool.h | 2 --\n src/gstreamer/gstlibcamerasrc.cpp | 8 ++++----\n 3 files changed, 4 insertions(+), 13 deletions(-)", "diff": "diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp\nindex 1fde42135119..0c2be43ceeea 100644\n--- a/src/gstreamer/gstlibcamerapool.cpp\n+++ b/src/gstreamer/gstlibcamerapool.cpp\n@@ -134,13 +134,6 @@ gst_libcamera_pool_get_stream(GstLibcameraPool *self)\n \treturn self->stream;\n }\n \n-Stream *\n-gst_libcamera_buffer_get_stream(GstBuffer *buffer)\n-{\n-\tauto *self = (GstLibcameraPool *)buffer->pool;\n-\treturn self->stream;\n-}\n-\n FrameBuffer *\n gst_libcamera_buffer_get_frame_buffer(GstBuffer *buffer)\n {\ndiff --git a/src/gstreamer/gstlibcamerapool.h b/src/gstreamer/gstlibcamerapool.h\nindex 05795d21223e..ce3bf60b1426 100644\n--- a/src/gstreamer/gstlibcamerapool.h\n+++ b/src/gstreamer/gstlibcamerapool.h\n@@ -25,6 +25,4 @@ GstLibcameraPool *gst_libcamera_pool_new(GstLibcameraAllocator *allocator,\n \n libcamera::Stream *gst_libcamera_pool_get_stream(GstLibcameraPool *self);\n \n-libcamera::Stream *gst_libcamera_buffer_get_stream(GstBuffer *buffer);\n-\n libcamera::FrameBuffer *gst_libcamera_buffer_get_frame_buffer(GstBuffer *buffer);\ndiff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex dea143961d69..700bee2bf877 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -51,7 +51,7 @@ struct RequestWrap {\n \tRequestWrap(std::unique_ptr<Request> request);\n \t~RequestWrap();\n \n-\tvoid attachBuffer(GstBuffer *buffer);\n+\tvoid attachBuffer(Stream *stream, GstBuffer *buffer);\n \tGstBuffer *detachBuffer(Stream *stream);\n \n \tstd::unique_ptr<Request> request_;\n@@ -71,10 +71,9 @@ RequestWrap::~RequestWrap()\n \t}\n }\n \n-void RequestWrap::attachBuffer(GstBuffer *buffer)\n+void RequestWrap::attachBuffer(Stream *stream, GstBuffer *buffer)\n {\n \tFrameBuffer *fb = gst_libcamera_buffer_get_frame_buffer(buffer);\n-\tStream *stream = gst_libcamera_buffer_get_stream(buffer);\n \n \trequest_->addBuffer(stream, fb);\n \n@@ -275,6 +274,7 @@ gst_libcamera_src_task_run(gpointer user_data)\n \t\tstd::make_unique<RequestWrap>(std::move(request));\n \n \tfor (GstPad *srcpad : state->srcpads_) {\n+\t\tStream *stream = gst_libcamera_pad_get_stream(srcpad);\n \t\tGstLibcameraPool *pool = gst_libcamera_pad_get_pool(srcpad);\n \t\tGstBuffer *buffer;\n \t\tGstFlowReturn ret;\n@@ -290,7 +290,7 @@ gst_libcamera_src_task_run(gpointer user_data)\n \t\t\tbreak;\n \t\t}\n \n-\t\twrap->attachBuffer(buffer);\n+\t\twrap->attachBuffer(stream, buffer);\n \t}\n \n \tif (wrap) {\n", "prefixes": [ "libcamera-devel", "v2", "03/12" ] }