Patch Detail
Show a patch.
GET /api/1.1/patches/17022/?format=api
{ "id": 17022, "url": "https://patchwork.libcamera.org/api/1.1/patches/17022/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17022/", "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": "<20220807203204.152358-5-utkarsh02t@gmail.com>", "date": "2022-08-07T20:32:04", "name": "[libcamera-devel,v6,4/4] qcam: Add --script to load capture script", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6d54258de76053de121436b3c97c5a254a199dc1", "submitter": { "id": 114, "url": "https://patchwork.libcamera.org/api/1.1/people/114/?format=api", "name": "Utkarsh Tiwari", "email": "utkarsh02t@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17022/mbox/", "series": [ { "id": 3385, "url": "https://patchwork.libcamera.org/api/1.1/series/3385/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3385", "date": "2022-08-07T20:32:00", "name": "Introduce capture scripts to qcam", "version": 6, "mbox": "https://patchwork.libcamera.org/series/3385/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17022/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17022/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 8D55BBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 7 Aug 2022 20:32:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 45E7463336;\n\tSun, 7 Aug 2022 22:32:29 +0200 (CEST)", "from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com\n\t[IPv6:2607:f8b0:4864:20::102a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6990063327\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 7 Aug 2022 22:32:28 +0200 (CEST)", "by mail-pj1-x102a.google.com with SMTP id b4so7082311pji.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 07 Aug 2022 13:32:28 -0700 (PDT)", "from localhost.localdomain ([2404:bd00:3:d2bc:8eec:115d:8ea8:b700])\n\tby smtp.gmail.com with ESMTPSA id\n\tx29-20020aa7941d000000b0052d194a6602sm7006334pfo.102.2022.08.07.13.32.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 07 Aug 2022 13:32:26 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659904349;\n\tbh=k4GIaMoB7l5a+5j5zmU+WTsJMR1CqBU9pK40vIr6+Ps=;\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=fn5HRKWo8T6Lk0jenH0YVkMJtlt8QOqRl5vlJqsQKxeQ1sE9NlP2d3dVm2/ttzdk3\n\t49tZwk/KrFNE42kJuDsSqeQkqoXz+EhvflzHONZpamDql4jHZfVvCu1w+zTxUBsJ51\n\t5cGjeBQZdmF6nj9p1IKmgbxB9P3cQCwlZVlBPz4FCxj8tO98NeF5mdI8XNI1FVFyVS\n\ttgn/lonwy7ud+znofcLYqo8njwqUULDY1l7CUR8It+oKehr6eKnUweo8oA2c1np5EI\n\tq5jlL5hYfc/HrLbAaAlniFvWPbN/sGKnuaEaPOoINS7au/FaUsKZtipRPztPAzvMuj\n\tw6eJPU0BZCTRw==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc;\n\tbh=OFhf8uHWyTxzs9/ji3mmENRnTkopYCwLKyaZSOgDTG4=;\n\tb=bTP0kbPsMT9Qn1qLO+qPRveqtplevHN/NTDMYdoEQA+XI136tfv9JEDl3Nb1ZH7ZQd\n\t7sIeqFWx8+pdw/R1uO6wqjrSs6SdMDZde2vC1kgzER6lCVjVCiHWLWTqBmcI+/MNTNzs\n\t2d0MqJ+qpUY1cbXtB56715i9hZtqOpp+bZRIrXBH7oP6BtELmnP1sepP3iEZ95oWgUcd\n\tL4fKbHKVnC6lr7o1hUyRif+rM5HKp+xgmyaAFJnLq5/lFTNtqusPfvePL6PBPQEWszdp\n\tBHBIEnLKAPiZeW9SsMQTl7w6kX2VMnRAsNCJ5iT/n6ZLefV+AXKv0mw7SX8YVvLaL2sc\n\tgyMw==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"bTP0kbPs\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc;\n\tbh=OFhf8uHWyTxzs9/ji3mmENRnTkopYCwLKyaZSOgDTG4=;\n\tb=dvR1zd0J7m3WIzr7ITzGXCtgQxyKUFIbCCN0z804u+xIZymWc8aNjoXzGtjf+xOMFv\n\tFdK9LXSXAcfEFeSSeury3+gFkNFCkxAYoKbkbEeQSlqBjMKoVTUZaRaDmpz8SSFcxB7y\n\tBrVX9+1XBWaanFkLAuNguvS1C9dAAO47ASHa/xX7DOiSGEsN4XMKAK68es3ryZ3yfFqw\n\ttkOGs6eVKbnrvcFyhcEYVr5rBRcKyQSBKMn7wD2D198RgEkPtO5lFURLrQTQ4NohRpiN\n\t37MyPxPT3Ntc2OHdj0YQNdlA3uAcn9ixKCuRCYXxfLoV1cxtEg7P3ZL9W4i8CVViLEIK\n\tDwwg==", "X-Gm-Message-State": "ACgBeo0OQ/nAY2K+P5PU0/GYN9dY/nXkMuq/dlT/13PD94iFBRmbtqIL\n\tVvyiCoFQyw3TlyxkkmU80hdRJeFCqJ0=", "X-Google-Smtp-Source": "AA6agR5FWWMcERP+vtqsYN+lRzS41wBg1s6CCIED9lQMG9zHDY3PnWWUfu8pTZwuaWwQbzMOc3bIig==", "X-Received": "by 2002:a17:902:e952:b0:16d:2552:f2eb with SMTP id\n\tb18-20020a170902e95200b0016d2552f2ebmr15788985pll.76.1659904346791; \n\tSun, 07 Aug 2022 13:32:26 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 8 Aug 2022 02:02:04 +0530", "Message-Id": "<20220807203204.152358-5-utkarsh02t@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220807203204.152358-1-utkarsh02t@gmail.com>", "References": "<20220807203204.152358-1-utkarsh02t@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v6 4/4] qcam: Add --script to load capture\n\tscript", "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": "Add --script as an individual option to load capture scripts.\nLoad the capture script before starting the capture.\n\nIf an invalid capture script has been given, quit the application.\n\nSigned-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com>\n---\n src/qcam/main.cpp | 3 +++\n src/qcam/main_window.cpp | 6 ++++++\n src/qcam/main_window.h | 1 +\n 3 files changed, 10 insertions(+)", "diff": "diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\nindex d3f01a85..91166be5 100644\n--- a/src/qcam/main.cpp\n+++ b/src/qcam/main.cpp\n@@ -43,6 +43,9 @@ OptionsParser::Options parseOptions(int argc, char *argv[])\n \t\t\t \"Set configuration of a camera stream\", \"stream\", true);\n \tparser.addOption(OptVerbose, OptionNone,\n \t\t\t \"Print verbose log messages\", \"verbose\");\n+\tparser.addOption(OptCaptureScript, OptionString,\n+\t\t\t \"Load a capture session configuration script from a file\",\n+\t\t\t \"script\", ArgumentRequired, \"script\");\n \n \tOptionsParser::Options options = parser.parse(argc, argv);\n \tif (options.isSet(OptHelp))\ndiff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex e354ba10..51088658 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -146,6 +146,9 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)\n \tcm_->cameraAdded.connect(this, &MainWindow::addCamera);\n \tcm_->cameraRemoved.connect(this, &MainWindow::removeCamera);\n \n+\tif (options_.isSet(OptCaptureScript))\n+\t\tscriptPath_ = options_[OptCaptureScript].toString();\n+\n \t/* Open the camera and start capture. */\n \tret = openCamera();\n \tif (ret < 0) {\n@@ -320,6 +323,9 @@ void MainWindow::loadCaptureScript()\n \tif (!script_->valid()) {\n \t\tscript_.reset();\n \n+\t\tif (options_.isSet(OptCaptureScript))\n+\t\t\tquit();\n+\n \t\tQMessageBox::critical(this, \"Invalid Script\",\n \t\t\t\t \"Couldn't load the capture script\");\n \t}\ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex 01466e28..fe4dba8d 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -46,6 +46,7 @@ enum {\n \tOptRenderer = 'r',\n \tOptStream = 's',\n \tOptVerbose = 'v',\n+\tOptCaptureScript = 256,\n };\n \n class MainWindow : public QMainWindow\n", "prefixes": [ "libcamera-devel", "v6", "4/4" ] }