From patchwork Fri Jan 27 15:43:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18212 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3DAF0BDC71 for ; Fri, 27 Jan 2023 15:43:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id ED1FD62600; Fri, 27 Jan 2023 16:43:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1674834231; bh=oJDUAEahPnQTy8VjBnFaA8X0iM7MlZ41x4e3hveQ0hw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=nKXUNXP+7i0dY5rv5uaaAiZvE28y3O3SE5za9/yk+BH6w4KLxppB18/iOdJ75JvtS GMDGzseaafLjf8Q3LrhaiI2Nj/bMLT5RxWufMsNHh5XteI79dtApXyEZQpQxs4CFRB Qj0OzhZjqTv+b0bo20Fd6w97jvKQbf9RqOwV6Wtn6QtRMMtJbrwfKTUWXhX5/4gLMQ DBHFdA4RnTMzMQujmHx24NRR/fymnVWlkjarlMKKBRsufLx2z9VA++YX9UUhSXkaCr pCDRj3kJuhYcJdr/eevmK8qrxgRVheujXNnfaV1Jy/aPJidO7yJMV234/34GQVPUIE ugK4ZN5x4Lktg== Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6291A625E7 for ; Fri, 27 Jan 2023 16:43:43 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Zr55Ty1p"; dkim-atps=neutral Received: by mail-wm1-x330.google.com with SMTP id f12-20020a7bc8cc000000b003daf6b2f9b9so5679250wml.3 for ; Fri, 27 Jan 2023 07:43:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jWVV/JyEAPl4kBWc5ldf5h6NOU1c89AUGkoy8ucYGBU=; b=Zr55Ty1pf4w84UlyLtNCTSMPly7DgaWDUFRyIaExdiLEebHabYa2OircgAdylFNLV7 RmNp8P8M49gIihIIkhbfyL/Ec7PWfmgD2u5cfIb9N6XhIKRcD9eTYIrQzfIg28v5ZGKg e52mce0+hphN4s40yCRU/vwhGX0Uj6KijUjTI1hxUD2mjsvRWB0Ae/UHdQEjUhfiEQW4 ENAogVgPpNP35gorUO5h7MkjOE0n9yvk4JIdTqqz9fT7YQqyoEqj2mIIy++H+W3TU7TW +nWcV2R0Sh1TTAutxQhHh1iklfn+ZOJ9qiN6DtGnvFckAa6m22Qty4WEVBkfvx+E+/jX oqew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jWVV/JyEAPl4kBWc5ldf5h6NOU1c89AUGkoy8ucYGBU=; b=I2Y3JA1jMwelLqfN+lC3TT+rj4XJ8r9++dPeeeQJL3WPZabmjIGOkNi+9WbxyG4oYi KWpdYOsJ01oe2YEBaCPFV88ETa4gUfQB6EpGhaRkE47CIXsgO+tfbbMSDOEOUUFddTBT M2CD+BYYaf8czO8NJmZjd5IHDC3IMJGZ3jWdUV5dk3jLvcti33n8UtGipHyEqMWz5/9A abnmUV1AdN1R0Njqic426P7WPeO5vaV6CGWQnGVsZLYtFh9K6nHb/14ocRp1n9PVSLrx tc2LEc5gH3OKVTEHKIgzGhzfOo+RIO999UZh+39WLAquqBUrowPiMluDhuL8kshcn1GS J8tw== X-Gm-Message-State: AFqh2kpYzTqilRKq4yH0opPMY5fiJ58W1MRFX1JVLijC8V7/FJEgSNRQ sFTfI4KjjGTu1jIwETVRnFT4l/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 k28-20020a05600c1c9c00b003d349db9b25mr37690517wms.26.1674834222918; Fri, 27 Jan 2023 07:43:42 -0800 (PST) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id h18-20020a05600c30d200b003c21ba7d7d6sm4549566wmn.44.2023.01.27.07.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 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 Subject: [libcamera-devel] [PATCH v6 12/15] libcamera: apps: lcc: Make rolesMap global X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Move rolesMap out of the nameParameters() function to allow use with other functions in the file. Additionally enclose all global variables in an unnamed namespace. Signed-off-by: Naushir Patuck Reviewed-by: Kieran Bingham --- src/apps/lc-compliance/capture_test.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/apps/lc-compliance/capture_test.cpp b/src/apps/lc-compliance/capture_test.cpp index 1dcfcf92fc8c..37138dfb3d2e 100644 --- a/src/apps/lc-compliance/capture_test.cpp +++ b/src/apps/lc-compliance/capture_test.cpp @@ -15,6 +15,15 @@ using namespace libcamera; +namespace { + +std::map rolesMap = { + { StreamRole::Raw, "Raw" }, + { StreamRole::StillCapture, "StillCapture" }, + { StreamRole::VideoRecording, "VideoRecording" }, + { StreamRole::Viewfinder, "Viewfinder" } +}; + const std::vector NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; const std::vector ROLES = { StreamRole::Raw, @@ -23,6 +32,8 @@ const std::vector ROLES = { StreamRole::Viewfinder }; +} /* namespace */ + class SingleStream : public testing::TestWithParam> { public: @@ -59,13 +70,6 @@ void SingleStream::TearDown() std::string SingleStream::nameParameters(const testing::TestParamInfo &info) { - std::map rolesMap = { - { StreamRole::Raw, "Raw" }, - { StreamRole::StillCapture, "StillCapture" }, - { StreamRole::VideoRecording, "VideoRecording" }, - { StreamRole::Viewfinder, "Viewfinder" } - }; - std::string roleName = rolesMap[std::get<0>(info.param)]; std::string numRequestsName = std::to_string(std::get<1>(info.param));