Show a patch.

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

{
    "id": 11080,
    "url": "https://patchwork.libcamera.org/api/patches/11080/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11080/",
    "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-2-laurent.pinchart@ideasonboard.com>",
    "date": "2021-01-31T22:46:43",
    "name": "[libcamera-devel,01/20] libcamera: pipeline: simple: Manage converter with std::unique_ptr<>",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "48f82927d815774e4191179712030370a95b9a32",
    "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/11080/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/11080/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11080/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 DF673BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 31 Jan 2021 22:47:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ED465683DC;\n\tSun, 31 Jan 2021 23:47:28 +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 E1A48683D0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 31 Jan 2021 23:47:27 +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 63BF68A0;\n\tSun, 31 Jan 2021 23:47:27 +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=\"RH34UXNz\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612133247;\n\tbh=14wtconu64Dsy+1FTRbga44qZgReUcTY8zTR+TWxIEk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=RH34UXNzOM8DdzjkCuKzRmkQRGRF9s6tsFFEkUKvgQoF+GDz9JCGOrG5ju+AE9PRu\n\tyS2wA1wylb8ty4agIJ5AwLTKYS/q2yWJmi5GKhxL+2NvAyzQ6X+4ai6Fy+zSI/IAh+\n\to1qAKpskg6b3/fEYcUXHaEN1m/NAoxG9umW65eQc=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  1 Feb 2021 00:46:43 +0200",
        "Message-Id": "<20210131224702.8838-2-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 01/20] libcamera: pipeline: simple: Manage\n\tconverter with std::unique_ptr<>",
        "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": "Replace manual destruction of the converter with std::unique_ptr<>. This\nremoves the need for the SimplePipelineHandler destructor.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 17 +++++------------\n 1 file changed, 5 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 23320d2687e1..b7aa3d034568 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -116,7 +116,6 @@ class SimplePipelineHandler : public PipelineHandler\n {\n public:\n \tSimplePipelineHandler(CameraManager *manager);\n-\t~SimplePipelineHandler();\n \n \tCameraConfiguration *generateConfiguration(Camera *camera,\n \t\t\t\t\t\t   const StreamRoles &roles) override;\n@@ -132,7 +131,7 @@ public:\n \n \tV4L2VideoDevice *video(const MediaEntity *entity);\n \tV4L2Subdevice *subdev(const MediaEntity *entity);\n-\tSimpleConverter *converter() { return converter_; }\n+\tSimpleConverter *converter() { return converter_.get(); }\n \n protected:\n \tint queueRequestDevice(Camera *camera, Request *request) override;\n@@ -151,7 +150,7 @@ private:\n \tstd::map<const MediaEntity *, std::unique_ptr<V4L2VideoDevice>> videos_;\n \tstd::map<const MediaEntity *, V4L2Subdevice> subdevs_;\n \n-\tSimpleConverter *converter_;\n+\tstd::unique_ptr<SimpleConverter> converter_;\n \tbool useConverter_;\n \tstd::vector<std::unique_ptr<FrameBuffer>> converterBuffers_;\n \tstd::queue<FrameBuffer *> converterQueue_;\n@@ -507,15 +506,10 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()\n  */\n \n SimplePipelineHandler::SimplePipelineHandler(CameraManager *manager)\n-\t: PipelineHandler(manager), converter_(nullptr)\n+\t: PipelineHandler(manager)\n {\n }\n \n-SimplePipelineHandler::~SimplePipelineHandler()\n-{\n-\tdelete converter_;\n-}\n-\n CameraConfiguration *SimplePipelineHandler::generateConfiguration(Camera *camera,\n \t\t\t\t\t\t\t\t  const StreamRoles &roles)\n {\n@@ -763,12 +757,11 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)\n \n \t/* Open the converter, if any. */\n \tif (converter) {\n-\t\tconverter_ = new SimpleConverter(converter);\n+\t\tconverter_ = std::make_unique<SimpleConverter>(converter);\n \t\tif (converter_->open() < 0) {\n \t\t\tLOG(SimplePipeline, Warning)\n \t\t\t\t<< \"Failed to open converter, disabling format conversion\";\n-\t\t\tdelete converter_;\n-\t\t\tconverter_ = nullptr;\n+\t\t\tconverter_.reset();\n \t\t} else {\n \t\t\tconverter_->bufferReady.connect(this, &SimplePipelineHandler::converterDone);\n \t\t}\n",
    "prefixes": [
        "libcamera-devel",
        "01/20"
    ]
}