Patch Detail
Show a patch.
GET /api/patches/16204/?format=api
{ "id": 16204, "url": "https://patchwork.libcamera.org/api/patches/16204/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16204/", "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": "<20220613060345.229191-2-utkarsh02t@gmail.com>", "date": "2022-06-13T06:03:43", "name": "[libcamera-devel,1/3] qcam: Queue requests only through MainWindow::queueRequest()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "180bd2f669112390bd4a12208194ad7e838152b5", "submitter": { "id": 114, "url": "https://patchwork.libcamera.org/api/people/114/?format=api", "name": "Utkarsh Tiwari", "email": "utkarsh02t@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16204/mbox/", "series": [ { "id": 3171, "url": "https://patchwork.libcamera.org/api/series/3171/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3171", "date": "2022-06-13T06:03:42", "name": "Introduce capture scripts to qcam", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3171/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16204/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16204/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 EDCF4BD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Jun 2022 06:04:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8952765639;\n\tMon, 13 Jun 2022 08:04:03 +0200 (CEST)", "from mail-pf1-x430.google.com (mail-pf1-x430.google.com\n\t[IPv6:2607:f8b0:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE417600F0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jun 2022 08:04:01 +0200 (CEST)", "by mail-pf1-x430.google.com with SMTP id w21so4921199pfc.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 12 Jun 2022 23:04:01 -0700 (PDT)", "from localhost.localdomain ([2404:bd00:3:d6be:8959:67fc:32d7:74a0])\n\tby smtp.gmail.com with ESMTPSA id\n\tx14-20020a170902a38e00b00161478027f5sm4087908pla.150.2022.06.12.23.03.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 12 Jun 2022 23:03:59 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655100243;\n\tbh=I1/n3GkDGO5FHN+zYKCrKE3Vnc46aAt+/rUZhkTu/so=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=zJqIeJfJqox1LGEOkBFlu70gwLu5iewZ6gOnOnhoaDn9R+oM/gGn9R15hudaAexoz\n\t4nwtOnSS6hy7LdQpDP/mgzx1bi0M4tp+aKrXQoeNbNCqXkt/1rEpAvDbP41Gru1ySm\n\tmUnpywZ4jDgfZJkjpauqMlPQuUNHQax10q+BxoG8H9c4bDZQ+ofMrLkfYUQ7+hzbZ7\n\tSZOM/yOVab1wezSQPA8vs2ugJbOaShYRfhrKBMJQNPv48KkvR5auDBQj9zJI7dtLg8\n\tnYRMNGnPNaIXeeCPEvqy0FWm+7tQ35pgqBanvhZVhAGTnEGgNtOCUnAXOSTss1ht3W\n\t4YfbPr+PhnYdQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=NnK+9RyOaqMX10qXFF7tBZgLxoOzFpkS6kLy2BPVVO4=;\n\tb=e8F4caBMf5c1EGh7cnYUXt85h9SnpPH4e2bFT5ae0RdB79MVI54tsgZNARdIa5ZZFe\n\tJk/9Qg3F5R26RylXHNreuUmA6CcNLEaZ4gqoVD6/dEgPzlw/jZNFy68L31STjpT8P6uY\n\tXzZsIb0abEHDeDDeRteD7BvGMN1XMvGbzM00rZmIMMuQOtYEj9b4U20iMWaWwo8UkQE/\n\taXeA6zuT99XBW6lU+V5k+pcfr/z0Ny8jMKMpa7tCsRZsy+JkrJyWuhyF4rSAQbGQrmsH\n\tBF8oAdVr7VAeR5HKcbs6X/v2K27e+LEfEAYmeCISQeY/hsWlmlG+9HxIasMJKZ+lR6EM\n\tqxFg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"e8F4caBM\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=NnK+9RyOaqMX10qXFF7tBZgLxoOzFpkS6kLy2BPVVO4=;\n\tb=hq+hMbFEfoQqyLy18SnPfKJHvOsfC9u1ZzLdrEUkSq3TODNX/+3083MEWtsZFlQG5Z\n\tPxgjBFzlV9XhkDWESxpmMxZIEsezE/ZDvikRMbhFXf0ICutFag3uTxQvSBUsFy2Ogqao\n\tNNK2vveT3Y4+Y9HYUdyEE26o5Wu4/tcYOhv4MCtTMkeg3bUDXZH4+zNhAQJCs8NOS4PU\n\tBOrZAqDN7nDUD4p4aHEUp21D6A9jOJVGIolu/iMTKuc3nWP5GI30nAeXDb8z+E7DPR2g\n\tZRZqgD6EgmaC4JWY5l4M4z958lMAgopES4fkH8noLT9IDa7+YuIzqgs00Mn6bqYz5ozA\n\tRb/Q==", "X-Gm-Message-State": "AOAM532D/DXgMCJbr2yXzEwu994ciTXl2F9ypMnnkhndIr1ooiG2an6o\n\t1vSs/OEOoUhjSbwUkn2mW++FU/FRPD8=", "X-Google-Smtp-Source": "ABdhPJw+XasmsP2H6rmpjndndFPR9THK9bP/bBaGRqT0nICL8ltMr0/7mHA5sz64sDiUB08huh7oaw==", "X-Received": "by 2002:a05:6a00:338e:b0:51b:c452:4210 with SMTP id\n\tcm14-20020a056a00338e00b0051bc4524210mr57607177pfb.69.1655100240146; \n\tSun, 12 Jun 2022 23:04:00 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 13 Jun 2022 11:33:43 +0530", "Message-Id": "<20220613060345.229191-2-utkarsh02t@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220613060345.229191-1-utkarsh02t@gmail.com>", "References": "<20220613060345.229191-1-utkarsh02t@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/3] qcam: Queue requests only through\n\tMainWindow::queueRequest()", "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>", "From": "Utkarsh Tiwari via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Utkarsh Tiwari <utkarsh02t@gmail.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Currently whenever we want to queue a request we use the camera directly\n\nCentralize all the queuing to a single function\n\nSigned-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com>\n---\n src/qcam/main_window.cpp | 14 +++++++++-----\n src/qcam/main_window.h | 3 ++-\n 2 files changed, 11 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex dd0e51f5..5ac31d9a 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -119,14 +119,14 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)\n \tif (renderType == \"qt\") {\n \t\tViewFinderQt *viewfinder = new ViewFinderQt(this);\n \t\tconnect(viewfinder, &ViewFinderQt::renderComplete,\n-\t\t\tthis, &MainWindow::queueRequest);\n+\t\t\tthis, &MainWindow::refillRequest);\n \t\tviewfinder_ = viewfinder;\n \t\tsetCentralWidget(viewfinder);\n #ifndef QT_NO_OPENGL\n \t} else if (renderType == \"gles\") {\n \t\tViewFinderGL *viewfinder = new ViewFinderGL(this);\n \t\tconnect(viewfinder, &ViewFinderGL::renderComplete,\n-\t\t\tthis, &MainWindow::queueRequest);\n+\t\t\tthis, &MainWindow::refillRequest);\n \t\tviewfinder_ = viewfinder;\n \t\tsetCentralWidget(viewfinder);\n #endif\n@@ -521,7 +521,7 @@ int MainWindow::startCapture()\n \n \t/* Queue all requests. */\n \tfor (std::unique_ptr<Request> &request : requests_) {\n-\t\tret = camera_->queueRequest(request.get());\n+\t\tret = queueRequest(request.get());\n \t\tif (ret < 0) {\n \t\t\tqWarning() << \"Can't queue request\";\n \t\t\tgoto error_disconnect;\n@@ -755,7 +755,7 @@ void MainWindow::processViewfinder(FrameBuffer *buffer)\n \tviewfinder_->render(buffer, mappedBuffers_[buffer].get());\n }\n \n-void MainWindow::queueRequest(FrameBuffer *buffer)\n+void MainWindow::refillRequest(FrameBuffer *buffer)\n {\n \tRequest *request;\n \t{\n@@ -784,6 +784,10 @@ void MainWindow::queueRequest(FrameBuffer *buffer)\n \t\t\tqWarning() << \"No free buffer available for RAW capture\";\n \t\t}\n \t}\n+\tqueueRequest(request);\n+}\n \n-\tcamera_->queueRequest(request);\n+int MainWindow::queueRequest(Request *request)\n+{\n+\treturn camera_->queueRequest(request);\n }\ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex 3fbe872c..251b8335 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -66,7 +66,7 @@ private Q_SLOTS:\n \tvoid processRaw(libcamera::FrameBuffer *buffer,\n \t\t\tconst libcamera::ControlList &metadata);\n \n-\tvoid queueRequest(libcamera::FrameBuffer *buffer);\n+\tvoid refillRequest(libcamera::FrameBuffer *buffer);\n \n private:\n \tint createToolbars();\n@@ -80,6 +80,7 @@ private:\n \tvoid addCamera(std::shared_ptr<libcamera::Camera> camera);\n \tvoid removeCamera(std::shared_ptr<libcamera::Camera> camera);\n \n+\tint queueRequest(libcamera::Request* request);\n \tvoid requestComplete(libcamera::Request *request);\n \tvoid processCapture();\n \tvoid processHotplug(HotplugEvent *e);\n", "prefixes": [ "libcamera-devel", "1/3" ] }