Patch Detail
Show a patch.
GET /api/patches/9610/?format=api
{ "id": 9610, "url": "https://patchwork.libcamera.org/api/patches/9610/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9610/", "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": "<20200915024623.30667-5-laurent.pinchart@ideasonboard.com>", "date": "2020-09-15T02:46:23", "name": "[libcamera-devel,v7,4/4] qcam: Add additional command line option to select the renderer type", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "bc1d9a63b6faebebc966891e55a85d0750677a67", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9610/mbox/", "series": [ { "id": 1290, "url": "https://patchwork.libcamera.org/api/series/1290/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1290", "date": "2020-09-15T02:46:19", "name": "[libcamera-devel,v7,1/4] qcam: Add OpenGL shader code as Qt resource", "version": 7, "mbox": "https://patchwork.libcamera.org/series/1290/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9610/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9610/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 4B827C3B5D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Sep 2020 02:47:00 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 181F162E10;\n\tTue, 15 Sep 2020 04:47:00 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C58462DF9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Sep 2020 04:46:57 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C3C1275;\n\tTue, 15 Sep 2020 04:46:56 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"s6sQ/57S\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600138016;\n\tbh=j+qUxXTjQsNxQPpNjNZoFEIMTLbzGMhnpCyMnLLHSew=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=s6sQ/57SoTmJFTmGm/1YOTkXe8utyv02/vh0gShAcAOEvSDRg/ZxIb2M3opsWRNVx\n\tGybM4vCxOF3kqld/wPm15HNae/DixN+c11KYGRYS06/KDsq6pmry6tVDL8dcBxU+Lw\n\tennp6EQou67oaWAqMcrEZ4BhOZ68czCMEMHKKKts=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org,\n\tShow Liu <show.liu@linaro.org>", "Date": "Tue, 15 Sep 2020 05:46:23 +0300", "Message-Id": "<20200915024623.30667-5-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200915024623.30667-1-laurent.pinchart@ideasonboard.com>", "References": "<20200915024623.30667-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v7 4/4] qcam: Add additional command line\n\toption to select the renderer type", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Show Liu <show.liu@linaro.org>\n\nAdd new option \"--renderer=qt|gles\" to select the renderer type,\n\"--renderer=gles\" to accelerate format conversion and rendering\n\"--renderer=qt\" is the original Qt rendering.\n\nSigned-off-by: Show Liu <show.liu@linaro.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/main.cpp | 3 +++\n src/qcam/main_window.cpp | 32 +++++++++++++++++++++++++++-----\n src/qcam/main_window.h | 1 +\n 3 files changed, 31 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\nindex bae358df0877..f60d3cef0ecb 100644\n--- a/src/qcam/main.cpp\n+++ b/src/qcam/main.cpp\n@@ -33,6 +33,9 @@ OptionsParser::Options parseOptions(int argc, char *argv[])\n \t\t\t ArgumentRequired, \"camera\");\n \tparser.addOption(OptHelp, OptionNone, \"Display this help message\",\n \t\t\t \"help\");\n+\tparser.addOption(OptRenderer, OptionString,\n+\t\t\t \"Choose the renderer type {qt,gles} (default: qt)\",\n+\t\t\t \"renderer\", ArgumentRequired, \"renderer\");\n \tparser.addOption(OptStream, &streamKeyValue,\n \t\t\t \"Set configuration of a camera stream\", \"stream\", true);\n \ndiff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 7406f0bd4512..e5233f4fb706 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -28,6 +28,7 @@\n #include <libcamera/version.h>\n \n #include \"dng_writer.h\"\n+#include \"viewfinder_gl.h\"\n #include \"viewfinder_qt.h\"\n \n using namespace libcamera;\n@@ -106,11 +107,32 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)\n \tsetWindowTitle(title_);\n \tconnect(&titleTimer_, SIGNAL(timeout()), this, SLOT(updateTitle()));\n \n-\tViewFinderQt *viewfinder = new ViewFinderQt(this);\n-\tconnect(viewfinder, &ViewFinderQt::renderComplete,\n-\t\tthis, &MainWindow::queueRequest);\n-\tviewfinder_ = viewfinder;\n-\tsetCentralWidget(viewfinder);\n+\t/* Renderer type Qt or GLES, select Qt by default. */\n+\tstd::string renderType = \"qt\";\n+\tif (options_.isSet(OptRenderer))\n+\t\trenderType = options_[OptRenderer].toString();\n+\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\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\tviewfinder_ = viewfinder;\n+\t\tsetCentralWidget(viewfinder);\n+#endif\n+\t} else {\n+\t\tqWarning() << \"Invalid render type\"\n+\t\t\t << QString::fromStdString(renderType);\n+\t\tquit();\n+\t\treturn;\n+\t}\n+\n \tadjustSize();\n \n \t/* Hotplug/unplug support */\ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex 3d21779e3f4a..5c61a4dfce53 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -37,6 +37,7 @@ class HotplugEvent;\n enum {\n \tOptCamera = 'c',\n \tOptHelp = 'h',\n+\tOptRenderer = 'r',\n \tOptStream = 's',\n };\n \n", "prefixes": [ "libcamera-devel", "v7", "4/4" ] }