From patchwork Fri Feb 3 09:44:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18250 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 3781FC329C for ; Fri, 3 Feb 2023 09:44:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D7470625EB; Fri, 3 Feb 2023 10:44:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675417474; 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=ZxOpmY8K1sG4vPIzCzztvCtHySu8+o8unfxHmMouWEnsfOL9JTjHmxfCUGjoCOYqy fuobu+Xs3Z9rQXUhdk+s0+r6a0U2Ng2OMnsDcIuYMthXeLGJR1wuOGgNXepSATZcls pfU/Fhlaod7kLEZMwBvVV7Gi6NswfvXcVZ7nFqkGcpM++1txQNSHE7GkgEAz17m66T imcib2fTjbatmgD/+ZG6bY56S8PfvHVIa2f+YeVK1YFZbCRg1+DeSA8PW15v5gvbhc mQUvGO1H/xNcvCSA0DiI7L6EZ7Y5KG5rgLO8t2m9182NQiqtkLfc09pZFy0UD6JBj5 qgDKKmIljjyRQ== Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EA24D625EF for ; Fri, 3 Feb 2023 10:44:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="NRb+2/HC"; dkim-atps=neutral Received: by mail-wr1-x42e.google.com with SMTP id h16so4078210wrz.12 for ; Fri, 03 Feb 2023 01:44:30 -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=NRb+2/HCd1oet1cyBj66yj8cZF54g/7Q0a75cobvK0oIidV5L5esSjT+1eBX1GY53u ymeDZ3QyVBy5mUmf0SnwVpMFUEpj9wZqoHhbByXRX0/QKGRUbiEEESBNhzfkfxkl+YYr 4MpZPIdsNU+ftjCdITynvgzuJq2IU+iNV61stqL1Cn8FO+z5CWLDfxJUujp6EhBJjkJM dk1PK3zM15af2nvimEfqPHNkJ9vOPQ3nlWiSrLdSul75X5U+N0Rrvl3WZGnMHOtk6zlL Fq96iKCsdg2Ll+9JZ3TraI+NYqV/CqqiK2e8+7ONsq5bjWYxZmnA+3RoS02hmGO1sedq ewlA== 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=X0CFK0GTwHm5eMQgc62KgMvwHn8kvDAgeBIGLhIyq/fLnK3MuX0HfInlbQxOdfBZWz IZG/IxGrm2gkreBryXS4ZZhCCsjlgANFa4XwVATNnboa+g6GBVtoS9R0pqfj/6eFuRva czXcaRvdSa9Rjp5qo0u6y2KwJUWoqGBpAE1Ao5ZrPLf2DKKjS9HpfC+Z/G9lN6G+eCs0 DUuYrkgrxQ9bT3xfxkydocyx9cfH/8zZR1SZrJCHT8dUqLHn4V4LPPSM27032wzGED4l LAVMzwuqULbIswRQFJB1vDyBEBk47xchG7QiN6Zuso+ixNQyq9lQ1U1KqmeArxfOkn2B w3+Q== X-Gm-Message-State: AO0yUKXTq/z4y0k4xUVetoSznFNol2r9uZ81AmYY749g0MvGMMJ9iBO/ hSwi/N9itbB0v9TScquAqRNHTV2ADU6VG1Y6TaEgag== X-Google-Smtp-Source: AK7set+b0FVVXL6Tr46NO40Kp8aqeSMuPusH1IxWt9QIfv6Vd2dOlDlcYCfl9lYbpqL96Oz+kUA4Wg== X-Received: by 2002:adf:c644:0:b0:2c3:d707:7339 with SMTP id u4-20020adfc644000000b002c3d7077339mr736984wrg.6.1675417470285; Fri, 03 Feb 2023 01:44:30 -0800 (PST) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id f17-20020a5d50d1000000b002bfe266d710sm1562503wrt.90.2023.02.03.01.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 01:44:29 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Fri, 3 Feb 2023 09:44:21 +0000 Message-Id: <20230203094424.25243-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230203094424.25243-1-naush@raspberrypi.com> References: <20230203094424.25243-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 5/8] 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 --- 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));