Patch Detail
Show a patch.
GET /api/1.1/patches/16997/?format=api
{ "id": 16997, "url": "https://patchwork.libcamera.org/api/1.1/patches/16997/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16997/", "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": "<20220806190433.59128-5-utkarsh02t@gmail.com>", "date": "2022-08-06T19:04:33", "name": "[libcamera-devel,v2,4/4] qcam: CamSelectDialog: Display Location and Model propety of camera", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "cb7ae2a360fdcc4aa13a5fcc3adcdf7de14e97b8", "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/16997/mbox/", "series": [ { "id": 3379, "url": "https://patchwork.libcamera.org/api/1.1/series/3379/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3379", "date": "2022-08-06T19:04:29", "name": "Improve Camera Selection GUI in QCam", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3379/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16997/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16997/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 2B781BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 6 Aug 2022 19:05:02 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CB6B363337;\n\tSat, 6 Aug 2022 21:05:01 +0200 (CEST)", "from mail-pf1-x434.google.com (mail-pf1-x434.google.com\n\t[IPv6:2607:f8b0:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A70A163330\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 6 Aug 2022 21:04:59 +0200 (CEST)", "by mail-pf1-x434.google.com with SMTP id f28so4945857pfk.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 06 Aug 2022 12:04:59 -0700 (PDT)", "from localhost.localdomain ([2404:bd00:3:daa9:adf3:a099:1bff:e55])\n\tby smtp.gmail.com with ESMTPSA id\n\tz17-20020aa79911000000b0052f20d70845sm406025pff.150.2022.08.06.12.04.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 06 Aug 2022 12:04:57 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659812701;\n\tbh=MyUpLSLEtM5kTr87vZBJ+qzN24xO8h0IJIlJOXFOTdE=;\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=yIucVNlDwzGR4k5/k8ta9i0TiQ1XZxDEOEoHpw/duMk7iE8RHno7zWQ1Dho3zouKy\n\t4jXWdAKckdBsRGawt3hTtcIlEWJsyj2MU6WFItI6p0AxO014IHPnIJEsTOKEgC/0wd\n\tP45NrdcZyg0QyfmKcU1Ghopqq6R2S+jLKoXAjKSiDHR4usVqKq8mqViSjlIDhtgw6R\n\teOhCckRLisVzXP3Qp2+543zGThNwmG9yvxM6L72CdAsVned+cIXlFKODRc2ddtkNjr\n\t62Qoi4F0u2ezI7qZvbVw5dFg/BHbf/ZBl/JaSpMsdYNGK6ieMGHPA/ur3Pv+0MpuZ2\n\tTNfLsBa3KvF4w==", "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=YrgsQJ2JjVrN6lqcP3OJCWFTFg1HvBD3vVFd1HXpkVk=;\n\tb=MOITIItxBzjS5VFUdHHyq+BvcKcuuQKpGo3barI6Ah+4KayxVoPeh+FzG2zBdPKAUA\n\tm5ENr1pEFEOV/NNmaS2ft8cXAIhzZAcP5NnKde86pImOKpap6WNQBNSjgSswNsfxVE3t\n\trQ5t6cYvxocbp8vD6cBnb3myM/Cqv/KjdlurBjWL7rRNieMeTG2i10MswFsFoRwg+qn8\n\t4ini34u7A2oyp3nXH76pYFeTqSSQfRSV0kLRNOhqwDMWltICDFZlTpzlalXTB/yEZvnH\n\tPGPGDklIzmUTrQ2q5PwA9Y9vz+GlHMHs6yONwVNNKSzFC/+Ylj93PbRUQRUPx53qMn49\n\tLP4w==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"MOITIItx\"; 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=YrgsQJ2JjVrN6lqcP3OJCWFTFg1HvBD3vVFd1HXpkVk=;\n\tb=QhjeCJ+j2VlJWXznj0dG9Kxay/nfJT8rVjKOEiuW1vG47ajCnzlOo3iPy/7xvxLegO\n\tUpc5JN21oU8XxXJOZ5X7++2f/cMeHdxLXeaAfaaDiPZXiOc77Kb24l2aF8Zb1wbeqcp5\n\tqq1WkPAGgLEpyu9EvQXXzNc0H27DF2APpfrqWJwXi/9jBKsZmYrFjU0KB5dVin0EGwX+\n\todY2esJrrcBsgRKL/MOS8f2JnFvsXPEnMZd82Cv6dLOMogD1qh9WdlhE4WLgl9MEXuPD\n\tagZkuhf2GKlJAMqD+Hju/MxfVOkIzlw70mVmcwLc7zyZq6r1ohpdHsyusj+qrJT2XJaN\n\tCmsQ==", "X-Gm-Message-State": "ACgBeo0ExOo5wEjKncUdo1ectmSapOlOyma5wPq29UVRyui3/+t5RRj4\n\t0EsaJFnW75rDlM13gUD2z+M73Tpf/8A=", "X-Google-Smtp-Source": "AA6agR74dMUBdjdPIsxP8R3GJ99RbTxnMNJyEiPwQMzksxToP4kxf0uyhZ9kgro6mtziD1RID7ewow==", "X-Received": "by 2002:a63:2254:0:b0:41c:4b26:863d with SMTP id\n\tt20-20020a632254000000b0041c4b26863dmr10045659pgm.4.1659812697933; \n\tSat, 06 Aug 2022 12:04:57 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 7 Aug 2022 00:34:33 +0530", "Message-Id": "<20220806190433.59128-5-utkarsh02t@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220806190433.59128-1-utkarsh02t@gmail.com>", "References": "<20220806190433.59128-1-utkarsh02t@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 4/4] qcam: CamSelectDialog: Display\n\tLocation and Model propety of camera", "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": "The camera selection dialog currently only displays the camera Id.\nDisplay the camera location and camera model if available.\n\nSigned-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com>\n---\n src/qcam/cam_select_dialog.h | 54 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 54 insertions(+)", "diff": "diff --git a/src/qcam/cam_select_dialog.h b/src/qcam/cam_select_dialog.h\nindex a5189ec3..0200d374 100644\n--- a/src/qcam/cam_select_dialog.h\n+++ b/src/qcam/cam_select_dialog.h\n@@ -12,11 +12,14 @@\n \n #include <libcamera/camera.h>\n #include <libcamera/camera_manager.h>\n+#include <libcamera/controls.h>\n+#include <libcamera/property_ids.h>\n \n #include <QComboBox>\n #include <QDialog>\n #include <QDialogButtonBox>\n #include <QFormLayout>\n+#include <QLabel>\n #include <QString>\n \n class CamSelectDialog : public QDialog\n@@ -34,6 +37,17 @@ public:\n \t\tfor (const auto &cam : cm_->cameras())\n \t\t\tcameraIdComboBox_->addItem(QString::fromStdString(cam->id()));\n \n+\t\t/* Set camera information labels. */\n+\t\tcameraLocation_ = new QLabel;\n+\t\tcameraModel_ = new QLabel;\n+\n+\t\tupdateCamInfo(cm_->get(getCurrentCamera()));\n+\t\tconnect(cameraIdComboBox_, &QComboBox::currentTextChanged,\n+\t\t\tthis, [&]() {\n+\t\t\t\tupdateCamInfo(cm_->get(\n+\t\t\t\t\tcameraIdComboBox_->currentText().toStdString()));\n+\t\t\t});\n+\n \t\t/* Setup the QDialogButton Box */\n \t\tQDialogButtonBox *dialogButtonBox =\n \t\t\tnew QDialogButtonBox(QDialogButtonBox::Ok |\n@@ -46,6 +60,8 @@ public:\n \n \t\t/* Set the layout. */\n \t\tcamSelectDialogLayout->addRow(\"Camera: \", cameraIdComboBox_);\n+\t\tcamSelectDialogLayout->addRow(\"Location: \", cameraLocation_);\n+\t\tcamSelectDialogLayout->addRow(\"Model: \", cameraModel_);\n \t\tcamSelectDialogLayout->addWidget(dialogButtonBox);\n \t}\n \n@@ -75,9 +91,47 @@ public:\n \t\tcameraIdComboBox_->removeItem(cameraIndex);\n \t}\n \n+\t/* Camera Information */\n+\tvoid updateCamInfo(const std::shared_ptr<libcamera::Camera> &camera)\n+\t{\n+\t\tif (camera == nullptr)\n+\t\t\treturn;\n+\n+\t\tconst libcamera::ControlList &cameraProperties = camera->properties();\n+\n+\t\tconst auto &location =\n+\t\t\tcameraProperties.get(libcamera::properties::Location);\n+\t\tif (location) {\n+\t\t\tswitch (*location) {\n+\t\t\tcase libcamera::properties::CameraLocationFront:\n+\t\t\t\tcameraLocation_->setText(\"Internal front camera \");\n+\t\t\t\tbreak;\n+\t\t\tcase libcamera::properties::CameraLocationBack:\n+\t\t\t\tcameraLocation_->setText(\"Internal back camera \");\n+\t\t\t\tbreak;\n+\t\t\tcase libcamera::properties::CameraLocationExternal:\n+\t\t\t\tcameraLocation_->setText(\"External camera \");\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tcameraLocation_->setText(QString());\n+\t\t\t}\n+\t\t} else {\n+\t\t\tcameraLocation_->setText(QString());\n+\t\t}\n+\n+\t\tconst auto &model = cameraProperties.get(libcamera::properties::Model);\n+\n+\t\tif (model)\n+\t\t\tcameraModel_->setText(QString::fromStdString(*model));\n+\t\telse\n+\t\t\tcameraModel_->setText(QString());\n+\t}\n+\n private:\n \tlibcamera::CameraManager *cm_;\n \n \t/* UI elements. */\n \tQComboBox *cameraIdComboBox_;\n+\tQLabel *cameraLocation_;\n+\tQLabel *cameraModel_;\n };\n", "prefixes": [ "libcamera-devel", "v2", "4/4" ] }