Patch Detail
Show a patch.
GET /api/patches/1891/?format=api
{ "id": 1891, "url": "https://patchwork.libcamera.org/api/patches/1891/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1891/", "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": "<20190829232653.13214-5-niklas.soderlund@ragnatech.se>", "date": "2019-08-29T23:26:43", "name": "[libcamera-devel,v2,04/14] libcamera: pipeline: Add method to prepare internal buffers", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "db1032349ecb0816830e7395f176836a644479bf", "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/1891/mbox/", "series": [ { "id": 475, "url": "https://patchwork.libcamera.org/api/series/475/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=475", "date": "2019-08-29T23:26:40", "name": "libcamera: ipa: Add basic IPA support", "version": 2, "mbox": "https://patchwork.libcamera.org/series/475/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1891/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1891/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 1D0EB60E38\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Aug 2019 01:27:32 +0200 (CEST)", "from bismarck.berto.se (unknown [79.202.45.17])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 8f9d23e4-cab4-11e9-837a-0050569116f7;\n\tFri, 30 Aug 2019 01:27:26 +0200 (CEST)" ], "X-Halon-ID": "8f9d23e4-cab4-11e9-837a-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": "Fri, 30 Aug 2019 01:26:43 +0200", "Message-Id": "<20190829232653.13214-5-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.22.1", "In-Reply-To": "<20190829232653.13214-1-niklas.soderlund@ragnatech.se>", "References": "<20190829232653.13214-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 04/14] libcamera: pipeline: Add method\n\tto prepare internal buffers", "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": "Thu, 29 Aug 2019 23:27:33 -0000" }, "content": "Buffers internal to a pipeline handler (buffers cycled between a CSI-2\npipeline to a ISP pipeline, parameters and statistics buffers) needs to\nbe prepared before they can be properly used inside a pipeline handler.\n\nAt this point the preparation consists of mapping the Buffer objects\nmemory and associating it with a request. Instead of adding this helper\non the Buffer object itself add it to the pipeline handler base class to\nprevent it from being exposed to applications.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/include/pipeline_handler.h | 2 ++\n src/libcamera/pipeline_handler.cpp | 18 ++++++++++++++++++\n 2 files changed, 20 insertions(+)", "diff": "diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\nindex ffc7adb802215313..91d40ef40a465c4e 100644\n--- a/src/libcamera/include/pipeline_handler.h\n+++ b/src/libcamera/include/pipeline_handler.h\n@@ -98,6 +98,8 @@ protected:\n \n \tCameraData *cameraData(const Camera *camera);\n \n+\tvoid prepareInternalBuffer(Buffer *buffer, Request *request,\n+\t\t\t\t BufferMemory *mem);\n \tCameraManager *manager_;\n \n private:\ndiff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex 558b4b254d111e31..846272485c7d2fc0 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -485,6 +485,24 @@ void PipelineHandler::hotplugMediaDevice(MediaDevice *media)\n \tmedia->disconnected.connect(this, &PipelineHandler::mediaDeviceDisconnected);\n }\n \n+/**\n+ * \\brief Prepare buffer for internal usage by a pipeline handler\n+ * \\param[in,out] buffer The buffer to prepare\n+ * \\param[in] request The request to associate the \\a buffer with\n+ * \\param[in] mem The memory to associate the \\a buffer with\n+ *\n+ * Pipeline handlers creating internal buffers to facilitate data flow in the\n+ * pipeline need to prepare the buffers by setting up the buffer object state.\n+ * This function help pipeline handler implementations to perform this\n+ * preparation.\n+ */\n+void PipelineHandler::prepareInternalBuffer(Buffer *buffer, Request *request,\n+\t\t\t\t\t BufferMemory *mem)\n+{\n+\tbuffer->request_ = request;\n+\tbuffer->mem_ = mem;\n+}\n+\n /**\n * \\brief Slot for the MediaDevice disconnected signal\n */\n", "prefixes": [ "libcamera-devel", "v2", "04/14" ] }