Patch Detail
Show a patch.
GET /api/patches/499/?format=api
{ "id": 499, "url": "https://patchwork.libcamera.org/api/patches/499/?format=api", "web_url": "https://patchwork.libcamera.org/patch/499/", "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": "<20190204155605.7900-1-jacopo@jmondi.org>", "date": "2019-02-04T15:56:05", "name": "[libcamera-devel] libcamera: v4l2_device: Construct from MediaEntity*", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "b8c270a80e062e445cbe1f1588a74cd105a9d9f0", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/499/mbox/", "series": [ { "id": 166, "url": "https://patchwork.libcamera.org/api/series/166/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=166", "date": "2019-02-04T15:56:05", "name": "[libcamera-devel] libcamera: v4l2_device: Construct from MediaEntity*", "version": 1, "mbox": "https://patchwork.libcamera.org/series/166/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/499/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/499/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 662DA60DBB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 4 Feb 2019 16:55:54 +0100 (CET)", "from uno.localdomain (d51A4137F.access.telenet.be [81.164.19.127])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 04A9A100003;\n\tMon, 4 Feb 2019 15:55:53 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 4 Feb 2019 16:56:05 +0100", "Message-Id": "<20190204155605.7900-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_device: Construct from\n\tMediaEntity*", "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": "Mon, 04 Feb 2019 15:55:54 -0000" }, "content": "The V4L2Device constructor wanted a \"const MediaEntity &\", while\nentities are usually retrieved by pointer before being used to construct\na V4L2Device. Change the constructor argument to \"MediaEntity *\".\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/v4l2_device.h | 2 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-\n src/libcamera/pipeline/uvcvideo.cpp | 2 +-\n src/libcamera/v4l2_device.cpp | 4 ++--\n 4 files changed, 5 insertions(+), 5 deletions(-)\n\n--\n2.20.1", "diff": "diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\nindex 4ff48fb..1067e45 100644\n--- a/src/libcamera/include/v4l2_device.h\n+++ b/src/libcamera/include/v4l2_device.h\n@@ -72,7 +72,7 @@ class V4L2Device\n {\n public:\n \texplicit V4L2Device(const std::string &deviceNode);\n-\texplicit V4L2Device(const MediaEntity &entity);\n+\texplicit V4L2Device(MediaEntity *entity);\n \tV4L2Device(const V4L2Device &) = delete;\n \t~V4L2Device();\n\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 7823bbb..fa3c522 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -182,7 +182,7 @@ V4L2Device *PipelineHandlerIPU3::createVideoDevice(unsigned int id)\n \tif (!cio2)\n \t\treturn nullptr;\n\n-\tV4L2Device *dev = new V4L2Device(*cio2);\n+\tV4L2Device *dev = new V4L2Device(cio2);\n \tif (dev->open()) {\n \t\tdelete dev;\n \t\treturn nullptr;\ndiff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex 821e4c2..e31816b 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -91,7 +91,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n\n \tfor (MediaEntity *entity : media_->entities()) {\n \t\tif (entity->flags() & MEDIA_ENT_FL_DEFAULT) {\n-\t\t\tvideo_ = new V4L2Device(*entity);\n+\t\t\tvideo_ = new V4L2Device(entity);\n \t\t\tbreak;\n \t\t}\n \t}\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 4d1f76b..61db7f6 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -169,8 +169,8 @@ V4L2Device::V4L2Device(const std::string &deviceNode)\n *\n * Construct a V4L2Device from a MediaEntity's device node path.\n */\n-V4L2Device::V4L2Device(const MediaEntity &entity)\n-\t: V4L2Device(entity.deviceNode())\n+V4L2Device::V4L2Device(MediaEntity *entity)\n+\t: V4L2Device(entity->deviceNode())\n {\n }\n\n", "prefixes": [ "libcamera-devel" ] }