Show a patch.

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

{
    "id": 3258,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3258/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3258/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200323142205.28342-15-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-23T14:21:58",
    "name": "[libcamera-devel,14/21] qcam: viewfinder: Move multi-planar check into viewfinder",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "43b665b230e9c34240a4626849ed87f0d57f2cf1",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3258/mbox/",
    "series": [
        {
            "id": 760,
            "url": "https://patchwork.libcamera.org/api/1.1/series/760/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=760",
            "date": "2020-03-23T14:21:44",
            "name": "qcam: Bypass format conversion when not required",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/760/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3258/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3258/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E72862C43\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 15:22:23 +0100 (CET)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C690711FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 15:22:22 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584973342;\n\tbh=73DZW4P+YJYZlOKUVjd+jGYbROnoK66kdikqo+TUOnc=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=mW2mhxWfKFQCF2yz7EzQw9M70W2848oOfeIMz53lpCcvbU+vaLlGhr0dQgf6JQAXj\n\tghUzyaDHxlKCaWvvvDBP5B5asVaVDrSvkkpD1P5QnC0ddUqEgAawwuT1oULNuTVQHT\n\tMVYJuhVzXpCBDlQ4kKOnNygLgwQh6CmUIzRPWCkw=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 23 Mar 2020 16:21:58 +0200",
        "Message-Id": "<20200323142205.28342-15-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200323142205.28342-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200323142205.28342-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 14/21] qcam: viewfinder: Move multi-planar\n\tcheck into viewfinder",
        "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, 23 Mar 2020 14:22:28 -0000"
    },
    "content": "The lack of support for multiplanar buffers comes from the viewfinder.\nMove the corresponding check from MainWindow.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/main_window.cpp | 7 +------\n src/qcam/main_window.h   | 2 +-\n src/qcam/viewfinder.cpp  | 6 ++++++\n 3 files changed, 8 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex c0feb91a6fb1..ad0d6bf4f3e5 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -519,14 +519,9 @@ void MainWindow::processCapture()\n \tqueueRequest(buffer);\n }\n \n-int MainWindow::display(FrameBuffer *buffer)\n+void MainWindow::display(FrameBuffer *buffer)\n {\n-\tif (buffer->planes().size() != 1)\n-\t\treturn -EINVAL;\n-\n \tviewfinder_->display(buffer, &mappedBuffers_[buffer]);\n-\n-\treturn 0;\n }\n \n void MainWindow::queueRequest(FrameBuffer *buffer)\ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex 0918ae5307d8..03db761b58e4 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -65,7 +65,7 @@ private:\n \n \tvoid requestComplete(Request *request);\n \tvoid processCapture();\n-\tint display(FrameBuffer *buffer);\n+\tvoid display(FrameBuffer *buffer);\n \tvoid queueRequest(FrameBuffer *buffer);\n \n \t/* UI elements */\ndiff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp\nindex d00edc33dfb7..b8feabd5d189 100644\n--- a/src/qcam/viewfinder.cpp\n+++ b/src/qcam/viewfinder.cpp\n@@ -11,6 +11,7 @@\n #include <QImageWriter>\n #include <QMutexLocker>\n #include <QPainter>\n+#include <QtDebug>\n \n #include \"format_converter.h\"\n \n@@ -27,6 +28,11 @@ ViewFinder::~ViewFinder()\n void ViewFinder::display(const libcamera::FrameBuffer *buffer,\n \t\t\t MappedBuffer *map)\n {\n+\tif (buffer->planes().size() != 1) {\n+\t\tqWarning() << \"Multi-planar buffers are not supported\";\n+\t\treturn;\n+\t}\n+\n \tQMutexLocker locker(&mutex_);\n \n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "14/21"
    ]
}