Show a patch.

GET /api/patches/23137/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23137,
    "url": "https://patchwork.libcamera.org/api/patches/23137/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23137/",
    "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": "<20250404074624.2975182-4-paul.elder@ideasonboard.com>",
    "date": "2025-04-04T07:46:23",
    "name": "[3/3] libcamera: v4l2: Remove fromEntityName(MediaDevice*)",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "515a85169fd663f6312e6b1213256a13e42e093e",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23137/mbox/",
    "series": [
        {
            "id": 5113,
            "url": "https://patchwork.libcamera.org/api/series/5113/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5113",
            "date": "2025-04-04T07:46:20",
            "name": "libcamera: pipeline: Use shared pointers for MediaDevice",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5113/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23137/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23137/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 393CBC3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Apr 2025 07:46:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E13F668994;\n\tFri,  4 Apr 2025 09:46:44 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 60D70689A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Apr 2025 09:46:40 +0200 (CEST)",
            "from neptunite.flets-east.jp (unknown\n\t[IPv6:2404:7a81:160:2100:cd45:d129:c842:b4ce])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 009A8E7C;\n\tFri,  4 Apr 2025 09:44:44 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"k3luEyQy\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743752686;\n\tbh=93RY5jnnnjYjjAm+2P+LXmX/6tBKmI3TYg5wKctvC+4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=k3luEyQyP1JuX68lQuvxU05NTOA0MOlzcwOCej0ZEzAW4iaUQq3vDoa4oqMDtpfxq\n\t5pxdBQaUQbCB+BLm3cLiPyIgBAFqqAPn6lncpP95Rkdxd0D+YhtAk5Knlixyw8JF7c\n\tD08vK4L80XCK47pMPn4d3zDAOVDbBcGOhHv9wpuE=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[PATCH 3/3] libcamera: v4l2: Remove fromEntityName(MediaDevice*)",
        "Date": "Fri,  4 Apr 2025 16:46:23 +0900",
        "Message-ID": "<20250404074624.2975182-4-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.47.2",
        "In-Reply-To": "<20250404074624.2975182-1-paul.elder@ideasonboard.com>",
        "References": "<20250404074624.2975182-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nNow that all users of the fromEntityName() helpers use the shared_ptr\nvariant, remove the original functions that are no longer used.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/internal/v4l2_subdevice.h   |  2 --\n include/libcamera/internal/v4l2_videodevice.h |  2 --\n src/libcamera/v4l2_subdevice.cpp              | 17 +----------------\n src/libcamera/v4l2_videodevice.cpp            | 17 +----------------\n 4 files changed, 2 insertions(+), 36 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\nindex 08216cd56bc3..1ad21fdc6a27 100644\n--- a/include/libcamera/internal/v4l2_subdevice.h\n+++ b/include/libcamera/internal/v4l2_subdevice.h\n@@ -161,8 +161,6 @@ public:\n \tconst std::string &model();\n \tconst V4L2SubdeviceCapability &caps() const { return caps_; }\n \n-\tstatic std::unique_ptr<V4L2Subdevice>\n-\tfromEntityName(const MediaDevice *media, const std::string &entity);\n \tstatic std::unique_ptr<V4L2Subdevice>\n \tfromEntityName(std::shared_ptr<const MediaDevice>, const std::string &entity);\n \ndiff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex e35fb11bc99f..640990e279e2 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -226,8 +226,6 @@ public:\n \tvoid setDequeueTimeout(utils::Duration timeout);\n \tSignal<> dequeueTimeout;\n \n-\tstatic std::unique_ptr<V4L2VideoDevice>\n-\tfromEntityName(const MediaDevice *media, const std::string &entity);\n \tstatic std::unique_ptr<V4L2VideoDevice>\n \tfromEntityName(std::shared_ptr<const MediaDevice>, const std::string &entity);\n \ndiff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 13f5316a3fc3..305a1b0f1bae 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -1756,7 +1756,7 @@ const std::string &V4L2Subdevice::model()\n  * \\return A newly created V4L2Subdevice on success, nullptr otherwise\n  */\n std::unique_ptr<V4L2Subdevice>\n-V4L2Subdevice::fromEntityName(const MediaDevice *media,\n+V4L2Subdevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n \t\t\t      const std::string &entity)\n {\n \tMediaEntity *mediaEntity = media->getEntityByName(entity);\n@@ -1766,21 +1766,6 @@ V4L2Subdevice::fromEntityName(const MediaDevice *media,\n \treturn std::make_unique<V4L2Subdevice>(mediaEntity);\n }\n \n-/**\n- * \\brief Create a new video subdevice instance from \\a entity in media device\n- * \\a media\n- * \\param[in] media The media device where the entity is registered\n- * \\param[in] entity The media entity name\n- *\n- * \\return A newly created V4L2Subdevice on success, nullptr otherwise\n- */\n-std::unique_ptr<V4L2Subdevice>\n-V4L2Subdevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n-\t\t\t      const std::string &entity)\n-{\n-\treturn fromEntityName(media.get(), entity);\n-}\n-\n std::string V4L2Subdevice::logPrefix() const\n {\n \treturn \"'\" + entity_->name() + \"'\";\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex ce7be7deb91f..9769243de8cc 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -2099,7 +2099,7 @@ void V4L2VideoDevice::watchdogExpired()\n  * \\return A newly created V4L2VideoDevice on success, nullptr otherwise\n  */\n std::unique_ptr<V4L2VideoDevice>\n-V4L2VideoDevice::fromEntityName(const MediaDevice *media,\n+V4L2VideoDevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n \t\t\t\tconst std::string &entity)\n {\n \tMediaEntity *mediaEntity = media->getEntityByName(entity);\n@@ -2109,21 +2109,6 @@ V4L2VideoDevice::fromEntityName(const MediaDevice *media,\n \treturn std::make_unique<V4L2VideoDevice>(mediaEntity);\n }\n \n-/**\n- * \\brief Create a new video device instance from \\a entity in media device\n- * \\a media\n- * \\param[in] media The media device where the entity is registered\n- * \\param[in] entity The media entity name\n- *\n- * \\return A newly created V4L2VideoDevice on success, nullptr otherwise\n- */\n-std::unique_ptr<V4L2VideoDevice>\n-V4L2VideoDevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n-\t\t\t\tconst std::string &entity)\n-{\n-\treturn fromEntityName(media.get(), entity);\n-}\n-\n /**\n  * \\brief Convert \\a PixelFormat to a V4L2PixelFormat supported by the device\n  * \\param[in] pixelFormat The PixelFormat to convert\n",
    "prefixes": [
        "3/3"
    ]
}