Patch Detail
Show a patch.
GET /api/patches/18212/?format=api
{ "id": 18212, "url": "https://patchwork.libcamera.org/api/patches/18212/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18212/", "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": "<20230127154322.29019-13-naush@raspberrypi.com>", "date": "2023-01-27T15:43:19", "name": "[libcamera-devel,v6,12/15] libcamera: apps: lcc: Make rolesMap global", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "e92f87e1a96cd23db6e69ae667409db1fa788396", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18212/mbox/", "series": [ { "id": 3728, "url": "https://patchwork.libcamera.org/api/series/3728/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3728", "date": "2023-01-27T15:43:07", "name": "[libcamera-devel,v6,01/15] libcamera: stream: Add stream hints to StreamConfiguration", "version": 6, "mbox": "https://patchwork.libcamera.org/series/3728/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18212/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18212/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 3DAF0BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jan 2023 15:43:52 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ED1FD62600;\n\tFri, 27 Jan 2023 16:43:51 +0100 (CET)", "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6291A625E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jan 2023 16:43:43 +0100 (CET)", "by mail-wm1-x330.google.com with SMTP id\n\tf12-20020a7bc8cc000000b003daf6b2f9b9so5679250wml.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jan 2023 07:43:43 -0800 (PST)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th18-20020a05600c30d200b003c21ba7d7d6sm4549566wmn.44.2023.01.27.07.43.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Jan 2023 07:43:42 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674834231;\n\tbh=oJDUAEahPnQTy8VjBnFaA8X0iM7MlZ41x4e3hveQ0hw=;\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=nKXUNXP+7i0dY5rv5uaaAiZvE28y3O3SE5za9/yk+BH6w4KLxppB18/iOdJ75JvtS\n\tGMDGzseaafLjf8Q3LrhaiI2Nj/bMLT5RxWufMsNHh5XteI79dtApXyEZQpQxs4CFRB\n\tQj0OzhZjqTv+b0bo20Fd6w97jvKQbf9RqOwV6Wtn6QtRMMtJbrwfKTUWXhX5/4gLMQ\n\tDBHFdA4RnTMzMQujmHx24NRR/fymnVWlkjarlMKKBRsufLx2z9VA++YX9UUhSXkaCr\n\tpCDRj3kJuhYcJdr/eevmK8qrxgRVheujXNnfaV1Jy/aPJidO7yJMV234/34GQVPUIE\n\tugK4ZN5x4Lktg==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=jWVV/JyEAPl4kBWc5ldf5h6NOU1c89AUGkoy8ucYGBU=;\n\tb=Zr55Ty1pf4w84UlyLtNCTSMPly7DgaWDUFRyIaExdiLEebHabYa2OircgAdylFNLV7\n\tRmNp8P8M49gIihIIkhbfyL/Ec7PWfmgD2u5cfIb9N6XhIKRcD9eTYIrQzfIg28v5ZGKg\n\te52mce0+hphN4s40yCRU/vwhGX0Uj6KijUjTI1hxUD2mjsvRWB0Ae/UHdQEjUhfiEQW4\n\tENAogVgPpNP35gorUO5h7MkjOE0n9yvk4JIdTqqz9fT7YQqyoEqj2mIIy++H+W3TU7TW\n\t+nWcV2R0Sh1TTAutxQhHh1iklfn+ZOJ9qiN6DtGnvFckAa6m22Qty4WEVBkfvx+E+/jX\n\toqew==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Zr55Ty1p\"; 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\t:subject:date:message-id:reply-to;\n\tbh=jWVV/JyEAPl4kBWc5ldf5h6NOU1c89AUGkoy8ucYGBU=;\n\tb=I2Y3JA1jMwelLqfN+lC3TT+rj4XJ8r9++dPeeeQJL3WPZabmjIGOkNi+9WbxyG4oYi\n\tKWpdYOsJ01oe2YEBaCPFV88ETa4gUfQB6EpGhaRkE47CIXsgO+tfbbMSDOEOUUFddTBT\n\tM2CD+BYYaf8czO8NJmZjd5IHDC3IMJGZ3jWdUV5dk3jLvcti33n8UtGipHyEqMWz5/9A\n\tabnmUV1AdN1R0Njqic426P7WPeO5vaV6CGWQnGVsZLYtFh9K6nHb/14ocRp1n9PVSLrx\n\ttc2LEc5gH3OKVTEHKIgzGhzfOo+RIO999UZh+39WLAquqBUrowPiMluDhuL8kshcn1GS\n\tJ8tw==", "X-Gm-Message-State": "AFqh2kpYzTqilRKq4yH0opPMY5fiJ58W1MRFX1JVLijC8V7/FJEgSNRQ\n\tsFTfI4KjjGTu1jIwETVRnFT4l/mxa+sDnzf7Wq8=", "X-Google-Smtp-Source": "AMrXdXvfJKPzs/kdTMKSJAp+wHU+YRw56jt9Qpx2D3hR+3iJVdrEWSq2+r+Aqn97f4rT8mFxjyD0KA==", "X-Received": "by 2002:a05:600c:1c9c:b0:3d3:49db:9b25 with SMTP id\n\tk28-20020a05600c1c9c00b003d349db9b25mr37690517wms.26.1674834222918; \n\tFri, 27 Jan 2023 07:43:42 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 27 Jan 2023 15:43:19 +0000", "Message-Id": "<20230127154322.29019-13-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230127154322.29019-1-naush@raspberrypi.com>", "References": "<20230127154322.29019-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v6 12/15] libcamera: apps: lcc: Make\n\trolesMap global", "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Move rolesMap out of the nameParameters() function to allow use with\nother functions in the file. Additionally enclose all global variables\nin an unnamed namespace.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/apps/lc-compliance/capture_test.cpp | 18 +++++++++++-------\n 1 file changed, 11 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/apps/lc-compliance/capture_test.cpp b/src/apps/lc-compliance/capture_test.cpp\nindex 1dcfcf92fc8c..37138dfb3d2e 100644\n--- a/src/apps/lc-compliance/capture_test.cpp\n+++ b/src/apps/lc-compliance/capture_test.cpp\n@@ -15,6 +15,15 @@\n \n using namespace libcamera;\n \n+namespace {\n+\n+std::map<StreamRole, std::string> rolesMap = {\n+\t{ StreamRole::Raw, \"Raw\" },\n+\t{ StreamRole::StillCapture, \"StillCapture\" },\n+\t{ StreamRole::VideoRecording, \"VideoRecording\" },\n+\t{ StreamRole::Viewfinder, \"Viewfinder\" }\n+};\n+\n const std::vector<int> NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 };\n const std::vector<StreamRole> ROLES = {\n \tStreamRole::Raw,\n@@ -23,6 +32,8 @@ const std::vector<StreamRole> ROLES = {\n \tStreamRole::Viewfinder\n };\n \n+} /* namespace */\n+\n class SingleStream : public testing::TestWithParam<std::tuple<StreamRole, int>>\n {\n public:\n@@ -59,13 +70,6 @@ void SingleStream::TearDown()\n \n std::string SingleStream::nameParameters(const testing::TestParamInfo<SingleStream::ParamType> &info)\n {\n-\tstd::map<StreamRole, std::string> rolesMap = {\n-\t\t{ StreamRole::Raw, \"Raw\" },\n-\t\t{ StreamRole::StillCapture, \"StillCapture\" },\n-\t\t{ StreamRole::VideoRecording, \"VideoRecording\" },\n-\t\t{ StreamRole::Viewfinder, \"Viewfinder\" }\n-\t};\n-\n \tstd::string roleName = rolesMap[std::get<0>(info.param)];\n \tstd::string numRequestsName = std::to_string(std::get<1>(info.param));\n \n", "prefixes": [ "libcamera-devel", "v6", "12/15" ] }