Patch Detail
Show a patch.
GET /api/1.1/patches/17271/?format=api
{ "id": 17271, "url": "https://patchwork.libcamera.org/api/1.1/patches/17271/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17271/", "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": "<20220831054938.21617-8-utkarsh02t@gmail.com>", "date": "2022-08-31T05:49:38", "name": "[libcamera-devel,v9,7/7] qcam: Add --script to load capture script", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f97322e80ec12466eed5829652fc792c936b6a2e", "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/17271/mbox/", "series": [ { "id": 3457, "url": "https://patchwork.libcamera.org/api/1.1/series/3457/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3457", "date": "2022-08-31T05:49:31", "name": "Introduce capture scripts to qcam", "version": 9, "mbox": "https://patchwork.libcamera.org/series/3457/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17271/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17271/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 7D66CC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 31 Aug 2022 05:50:13 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 361A861FCE;\n\tWed, 31 Aug 2022 07:50:13 +0200 (CEST)", "from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com\n\t[IPv6:2607:f8b0:4864:20::1035])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E23F61FBC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 31 Aug 2022 07:50:12 +0200 (CEST)", "by mail-pj1-x1035.google.com with SMTP id\n\tw88-20020a17090a6be100b001fbb0f0b013so13967228pjj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Aug 2022 22:50:12 -0700 (PDT)", "from devut-HP-Laptop-14q-cs0xxx.. ([103.36.82.122])\n\tby smtp.gmail.com with ESMTPSA id\n\tq19-20020aa79833000000b00537eacc8fa6sm8307333pfl.40.2022.08.30.22.50.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 30 Aug 2022 22:50:10 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1661925013;\n\tbh=sfCzj5KVEAzrKNuGbN4WwAUaNUY/CmOphjxwj3CPXOI=;\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=fQh5hiYdG321ijvfr9jqZGmmeWcXBcvs5g82gEQdG4qrISfWz9HTvAUaHyhj0sY6F\n\tK1JRHvlFv920dKkx9P9BRv5jM/oQ3ijrdM1epY4yh4aSfW739tnV+DPZiDz4YuAK1N\n\tOneDlpXeFMfWykrj5iBT8pB1JszmKu9mB6bdYqvPTOINCDt1F4+Md+i2SQSxFJtjWp\n\tGuIOf96mEsPTOhvV3BcjEIayGEQyZ8fytSxns7r4s3Ry8DhZm5FMHUkhkYJjrz4dth\n\t37beAAVYaigKh8cNBcoJfCx8GIZu6uQ1nIURCrThxwCws/0F3zEIiG6wgInPlnuTnq\n\tlBCTsQoZM6Whw==", "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=qi9RfznzV8BFNNvtVx87j3wkZRX+zAexw9WtM1zCQ94=;\n\tb=HAOrPXQA/Yxll96GqY5xcM7YQ3Zg/kXbRI6QSVw6UuX4TJPacU2je0Y146fzt39N9D\n\tF73PuNxb/WLNxPHmFztqnOgDKbn8zrQHj2gsymp3G+95xqug3aNei8njF0IxWmMmXTM1\n\tkzHEns67ETsgzBQtT4rUEq1XTLgEylTmgKpUTagkZX5qTMXKsE8QugXAs/Ct//6d1tUW\n\tmb4YUTihsBZZVrM7JNup7ieMmfiRm0/Ya8K/v0ERlH346Or0/qZRyvDS4xLhKNFTFIIi\n\tT9Y1h05ZPhuVQ0hdwj1rxzqTj8ClI07W734GYwL9z4oyy4QGTDQ3d7B5AzIMz+psOhQh\n\tJgeA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"HAOrPXQA\"; 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=qi9RfznzV8BFNNvtVx87j3wkZRX+zAexw9WtM1zCQ94=;\n\tb=TH/8HTk0jb4Xu7ufUBYr0sHitt6B3iTYT0kE6u/zWnbxPPsL+xKIpZGx0od5TFU6qR\n\tpeIaW/hpSK+abGW/zZXBoyosa26ILX3EtywE2bTuTvP93ItzQiYf5UZeNPlrrBH4lp+T\n\t5pg0xKSGh53TaCSrrXA4dQBIVjUItjzjkwZNMjkYPyZXx6YcFOw2gx03OcOB/DRL0CyS\n\tixdu8av8pUQNjVsLMNom/ov2ieg4wkby5ef4Z9hI0SgcQ+8P1U9JQA3UeXv7y1YWnbn1\n\t++/CvGkBH3agT84W/bvttl2MQKJuNwP2LrKL0nzXHht4DfW+Ri8k+GmRewUremapK78g\n\tps+Q==", "X-Gm-Message-State": "ACgBeo0eQa04YAPSV0Uwr/50Hhio4W2b2o2RIGcJrPdAmEKf47hIo9xD\n\tkKXyqHL73hXzTTuoyAoXg+E5Ld/DKEc=", "X-Google-Smtp-Source": "AA6agR4f2EGeNST++y+3++x4pJHSS/oN3wHuYpSI/n7thuzuGtqMcmPNprB50QeY8TWBx87IGy1xuA==", "X-Received": "by 2002:a17:90a:8a90:b0:1fd:bf26:58fb with SMTP id\n\tx16-20020a17090a8a9000b001fdbf2658fbmr1575704pjn.91.1661925010628; \n\tTue, 30 Aug 2022 22:50:10 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 31 Aug 2022 11:19:38 +0530", "Message-Id": "<20220831054938.21617-8-utkarsh02t@gmail.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220831054938.21617-1-utkarsh02t@gmail.com>", "References": "<20220831054938.21617-1-utkarsh02t@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v9 7/7] 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, display an critical error\nQMessageBox and close the application.\n---\n Differences from v8:\n 1. Functionally the patch remains same.\n 2. The difference is that checking for OptCaptureScript is now done\n in MainWindow::MainWindow()\n src/qcam/main.cpp | 3 +++\n src/qcam/main_window.cpp | 11 +++++++++--\n src/qcam/main_window.h | 1 +\n 3 files changed, 13 insertions(+), 2 deletions(-)", "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 af992b94..e488b67f 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -145,6 +145,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 \tcameraSelectorDialog_ = new CameraSelectorDialog(cm_, scriptPath_, this);\n \tconnect(cameraSelectorDialog_, &CameraSelectorDialog::stopCaptureScript,\n \t\tthis, &MainWindow::stopCaptureScript);\n@@ -157,9 +160,13 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)\n \t}\n \n \t/* Start capture script. */\n-\tif (!scriptPath_.empty())\n+\tif (!scriptPath_.empty()) {\n \t\tret = loadCaptureScript();\n-\n+\t\tif (options_.isSet(OptCaptureScript)) {\n+\t\t\tquit();\n+\t\t\treturn;\n+\t\t}\n+\t}\n \tstartStopAction_->setChecked(true);\n }\n \ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex 7c877ae1..24ebd019 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -45,6 +45,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", "v9", "7/7" ] }