Show a patch.

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

{
    "id": 2265,
    "url": "https://patchwork.libcamera.org/api/patches/2265/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2265/",
    "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": "<20191028022525.796995-7-niklas.soderlund@ragnatech.se>",
    "date": "2019-10-28T02:25:19",
    "name": "[libcamera-devel,RFC,06/12] libcamera: stream: Add prototypes for new interface",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "2ec98452c20b1db36e560710c5176c98be2278be",
    "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/2265/mbox/",
    "series": [
        {
            "id": 561,
            "url": "https://patchwork.libcamera.org/api/series/561/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=561",
            "date": "2019-10-28T02:25:13",
            "name": "libcamera: Rework buffer API",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/561/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2265/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2265/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 1AA3F61509\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 03:25:53 +0100 (CET)",
            "from localhost.localdomain (unknown [93.2.121.143])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 41b3fa67-f92a-11e9-903a-005056917f90;\n\tMon, 28 Oct 2019 03:25:50 +0100 (CET)"
        ],
        "X-Halon-ID": "41b3fa67-f92a-11e9-903a-005056917f90",
        "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": "Mon, 28 Oct 2019 03:25:19 +0100",
        "Message-Id": "<20191028022525.796995-7-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20191028022525.796995-1-niklas.soderlund@ragnatech.se>",
        "References": "<20191028022525.796995-1-niklas.soderlund@ragnatech.se>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC 06/12] libcamera: stream: Add prototypes for\n\tnew interface",
        "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": "Mon, 28 Oct 2019 02:25:53 -0000"
    },
    "content": "The buffer allocation rework will remove most of the methods in the\nStream class. The methods who deals with buffers will be virtual and\nimplemented in a subclass. This change adds the prototypes for the new\ninterface with an empty default implementation.\n\nOnce the new buffer allocation work is completed the two added\nprototypes here will be turned into pure virtual functions preventing\nthe base Stream class from being instantiated.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/stream.h | 4 ++++\n 1 file changed, 4 insertions(+)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 2e619cdf0e89bbc7..dac4831cfa1a9b1d 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -73,6 +73,7 @@ class Stream\n {\n public:\n \tStream();\n+\tvirtual ~Stream(){};\n \n \tstd::unique_ptr<Buffer> createBuffer(unsigned int index);\n \tstd::unique_ptr<Buffer> createBuffer(const std::array<int, 3> &fds);\n@@ -85,6 +86,9 @@ public:\n protected:\n \tfriend class Camera;\n \n+\tvirtual int allocateBuffers(std::vector<Buffer *> *buffers) { return -EINVAL; }\n+\tvirtual int importBuffers(bool enable) { return -EINVAL; }\n+\n \tint mapBuffer(const Buffer *buffer);\n \tvoid unmapBuffer(const Buffer *buffer);\n \n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "06/12"
    ]
}