Show a patch.

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

{
    "id": 2336,
    "url": "https://patchwork.libcamera.org/api/patches/2336/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2336/",
    "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": "<20191120015506.362440-6-niklas.soderlund@ragnatech.se>",
    "date": "2019-11-20T01:55:01",
    "name": "[libcamera-devel,v2,05/10] cam: BufferWriter: Use the libcamera namespace",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "202b5337bc3fb305a118d70b3ae3c47159b8b458",
    "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/2336/mbox/",
    "series": [
        {
            "id": 572,
            "url": "https://patchwork.libcamera.org/api/series/572/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=572",
            "date": "2019-11-20T01:54:56",
            "name": "libcamera: Fixes found while working on new",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/572/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2336/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2336/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E38C06137A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Nov 2019 02:55:31 +0100 (CET)",
            "from bismarck.berto.se (p54ac5865.dip0.t-ipconnect.de\n\t[84.172.88.101]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid d4f2ab52-0b38-11ea-a00b-005056917a89;\n\tWed, 20 Nov 2019 02:55:31 +0100 (CET)"
        ],
        "X-Halon-ID": "d4f2ab52-0b38-11ea-a00b-005056917a89",
        "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": "Wed, 20 Nov 2019 02:55:01 +0100",
        "Message-Id": "<20191120015506.362440-6-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.24.0",
        "In-Reply-To": "<20191120015506.362440-1-niklas.soderlund@ragnatech.se>",
        "References": "<20191120015506.362440-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 05/10] cam: BufferWriter: Use the\n\tlibcamera namespace",
        "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>",
        "X-List-Received-Date": "Wed, 20 Nov 2019 01:55:32 -0000"
    },
    "content": "Other parts of the cam utility uses the libcamera namespace, do the same\nin the buffer writer.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/buffer_writer.cpp | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/cam/buffer_writer.cpp b/src/cam/buffer_writer.cpp\nindex 1c044b0634672d87..c33e99c5f8173db8 100644\n--- a/src/cam/buffer_writer.cpp\n+++ b/src/cam/buffer_writer.cpp\n@@ -14,12 +14,14 @@\n \n #include \"buffer_writer.h\"\n \n+using namespace libcamera;\n+\n BufferWriter::BufferWriter(const std::string &pattern)\n \t: pattern_(pattern)\n {\n }\n \n-int BufferWriter::write(libcamera::Buffer *buffer, const std::string &streamName)\n+int BufferWriter::write(Buffer *buffer, const std::string &streamName)\n {\n \tstd::string filename;\n \tsize_t pos;\n@@ -40,8 +42,8 @@ int BufferWriter::write(libcamera::Buffer *buffer, const std::string &streamName\n \tif (fd == -1)\n \t\treturn -errno;\n \n-\tlibcamera::BufferMemory *mem = buffer->mem();\n-\tfor (libcamera::Plane &plane : mem->planes()) {\n+\tBufferMemory *mem = buffer->mem();\n+\tfor (Plane &plane : mem->planes()) {\n \t\tvoid *data = plane.mem();\n \t\tunsigned int length = plane.length();\n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "05/10"
    ]
}