Show a patch.

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

{
    "id": 3247,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3247/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3247/",
    "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-5-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-23T14:21:48",
    "name": "[libcamera-devel,04/21] qcam: main_window: Move request queuing to a separate function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "66618c9cd7f3303ebf13f7adb11d9025216564de",
    "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/3247/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/3247/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3247/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 AF04562BFC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 15:22:19 +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 57B72308\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 15:22:19 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584973339;\n\tbh=MqK7QUbiwoSiHIC626STnQgrKoRO1R9/LuHmJEjqzCw=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Mkh9097dYn6fir5OUgoHxERp90pQBRb3DzIqLjZfbj1pePtF92Di1NMt4KyD49tNf\n\tWH4sOO3G8gtecSpwmvPYdyym0FpYWHwaq558kJrvHqh9F2CkYpvntqOV/yQQtD99Ry\n\txieQabvpRzc/kpCJ8FJQMA9t2Q/H2qJoxdqn+gTQ=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 23 Mar 2020 16:21:48 +0200",
        "Message-Id": "<20200323142205.28342-5-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 04/21] qcam: main_window: Move request\n\tqueuing to a separate function",
        "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:20 -0000"
    },
    "content": "Requests are requeued synchronously from the completion handler. To\nprepare for delayed requeuing, move the queuing to a separate function.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/main_window.cpp | 29 +++++++++++++++--------------\n src/qcam/main_window.h   |  1 +\n 2 files changed, 16 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex e0668176e427..354a53367d0f 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -389,20 +389,7 @@ void MainWindow::requestComplete(Request *request)\n \n \tdisplay(buffer);\n \n-\trequest = camera_->createRequest();\n-\tif (!request) {\n-\t\tstd::cerr << \"Can't create request\" << std::endl;\n-\t\treturn;\n-\t}\n-\n-\tfor (auto it = buffers.begin(); it != buffers.end(); ++it) {\n-\t\tStream *stream = it->first;\n-\t\tFrameBuffer *buffer = it->second;\n-\n-\t\trequest->addBuffer(stream, buffer);\n-\t}\n-\n-\tcamera_->queueRequest(request);\n+\tqueueRequest(buffer);\n }\n \n int MainWindow::display(FrameBuffer *buffer)\n@@ -417,3 +404,17 @@ int MainWindow::display(FrameBuffer *buffer)\n \n \treturn 0;\n }\n+\n+void MainWindow::queueRequest(FrameBuffer *buffer)\n+{\n+\tRequest *request = camera_->createRequest();\n+\tif (!request) {\n+\t\tstd::cerr << \"Can't create request\" << std::endl;\n+\t\treturn;\n+\t}\n+\n+\tStream *stream = config_->at(0).stream();\n+\trequest->addBuffer(stream, buffer);\n+\n+\tcamera_->queueRequest(request);\n+}\ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex 40aa10aaea8e..720a3393e3dc 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -58,6 +58,7 @@ private:\n \n \tvoid requestComplete(Request *request);\n \tint display(FrameBuffer *buffer);\n+\tvoid queueRequest(FrameBuffer *buffer);\n \n \tQString title_;\n \tQTimer titleTimer_;\n",
    "prefixes": [
        "libcamera-devel",
        "04/21"
    ]
}