Patch Detail
Show a patch.
GET /api/patches/11089/?format=api
{ "id": 11089, "url": "https://patchwork.libcamera.org/api/patches/11089/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11089/", "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": "<20210131224702.8838-11-laurent.pinchart@ideasonboard.com>", "date": "2021-01-31T22:46:52", "name": "[libcamera-devel,10/20] libcamera: pipeline: simple: Store streams in a vector", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5b2463acc9aa9f11f9558f868f44082a9f1bda08", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": { "id": 14, "url": "https://patchwork.libcamera.org/api/users/14/?format=api", "username": "pinchartl", "first_name": "Laurent", "last_name": "Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/11089/mbox/", "series": [ { "id": 1633, "url": "https://patchwork.libcamera.org/api/series/1633/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1633", "date": "2021-01-31T22:46:42", "name": "[libcamera-devel,01/20] libcamera: pipeline: simple: Manage converter with std::unique_ptr<>", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1633/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11089/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11089/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 77921BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 31 Jan 2021 22:47:41 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 315B3683F0;\n\tSun, 31 Jan 2021 23:47:41 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DB572683EE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 31 Jan 2021 23:47:31 +0100 (CET)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4C368163C; \n\tSun, 31 Jan 2021 23:47:31 +0100 (CET)" ], "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=\"GM3vk86b\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612133251;\n\tbh=c4oPxFmw6lLgdArqv9i4qy63kIjhfJYW+rlHSU0uIQU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=GM3vk86broaLMOx7ffpDYsVVf0vduwI2iBwY8/vr4SU6gtDWBKyh3ehai2OUWdxZj\n\tGU9s3DhdMQIJeKDIOG5XK5pE3bhO+/8FvqplRVbHc2LJHku+FLMMQOBbiJaceNPFIl\n\t0+bcRrS5IRuvbVoF6FSr6OmRoIe3/QhqNgkKd5/o=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 1 Feb 2021 00:46:52 +0200", "Message-Id": "<20210131224702.8838-11-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20210131224702.8838-1-laurent.pinchart@ideasonboard.com>", "References": "<20210131224702.8838-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 10/20] libcamera: pipeline: simple: Store\n\tstreams in a vector", "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>", "Cc": "Phi-Bang Nguyen <pnguyen@baylibre.com>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "To prepare for multiple streams support, store the streams in a vector\nin the SimpleCameraData class.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 19 ++++++++++++-------\n 1 file changed, 12 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex b7a890ab772e..390c87ba74d8 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -61,7 +61,6 @@ public:\n \tSimpleCameraData(SimplePipelineHandler *pipe, MediaEntity *sensor);\n \n \tbool isValid() const { return sensor_ != nullptr; }\n-\tstd::set<Stream *> streams() { return { &stream_ }; }\n \n \tint init();\n \tint setupLinks();\n@@ -80,7 +79,7 @@ public:\n \t\tSizeRange outputSizes;\n \t};\n \n-\tStream stream_;\n+\tstd::vector<Stream> streams_;\n \tstd::unique_ptr<CameraSensor> sensor_;\n \tstd::list<Entity> entities_;\n \tV4L2VideoDevice *video_;\n@@ -169,6 +168,8 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,\n {\n \tint ret;\n \n+\tstreams_.resize(1);\n+\n \t/*\n \t * Walk the pipeline towards the video node and store all entities\n \t * along the way.\n@@ -620,7 +621,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n \t\tLOG(SimplePipeline, Debug) << \"Using format converter\";\n \t}\n \n-\tcfg.setStream(&data->stream_);\n+\tcfg.setStream(&data->streams_[0]);\n \n \treturn 0;\n }\n@@ -645,7 +646,7 @@ int SimplePipelineHandler::start(Camera *camera, [[maybe_unused]] ControlList *c\n {\n \tSimpleCameraData *data = cameraData(camera);\n \tV4L2VideoDevice *video = data->video_;\n-\tunsigned int count = data->stream_.configuration().bufferCount;\n+\tunsigned int count = data->streams_[0].configuration().bufferCount;\n \tint ret;\n \n \tif (useConverter_)\n@@ -696,7 +697,7 @@ void SimplePipelineHandler::stop(Camera *camera)\n int SimplePipelineHandler::queueRequestDevice(Camera *camera, Request *request)\n {\n \tSimpleCameraData *data = cameraData(camera);\n-\tStream *stream = &data->stream_;\n+\tStream *stream = &data->streams_[0];\n \n \tFrameBuffer *buffer = request->findBuffer(stream);\n \tif (!buffer) {\n@@ -825,9 +826,13 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)\n \t\tif (ret < 0)\n \t\t\tcontinue;\n \n+\t\tstd::set<Stream *> streams;\n+\t\tstd::transform(data->streams_.begin(), data->streams_.end(),\n+\t\t\t std::inserter(streams, streams.end()),\n+\t\t\t [](Stream &stream) { return &stream; });\n+\n \t\tstd::shared_ptr<Camera> camera =\n-\t\t\tCamera::create(this, data->sensor_->id(),\n-\t\t\t\t data->streams());\n+\t\t\tCamera::create(this, data->sensor_->id(), streams);\n \t\tregisterCamera(std::move(camera), std::move(data));\n \t\tregistered = true;\n \t}\n", "prefixes": [ "libcamera-devel", "10/20" ] }