summaryrefslogtreecommitdiff
path: root/src/apps/lc-compliance/capture_test.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-23 02:51:10 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-11-25 10:52:06 +0200
commit81e7689bb168a74c0822846729d992128da97322 (patch)
tree9814d804ce74030697d411710170f3d03b180b05 /src/apps/lc-compliance/capture_test.cpp
parentbaf3be12effed489770aaf02b9df3b743d4b7e50 (diff)
libcamera: stream: Turn StreamRole into scoped enumeration
The StreamRole enum has enumerators such as 'Raw' that are too generic to be in the global libcamera namespace. Turn it into a scoped enum to avoid namespace clashes, and update users accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/apps/lc-compliance/capture_test.cpp')
-rw-r--r--src/apps/lc-compliance/capture_test.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/apps/lc-compliance/capture_test.cpp b/src/apps/lc-compliance/capture_test.cpp
index 52578207..1dcfcf92 100644
--- a/src/apps/lc-compliance/capture_test.cpp
+++ b/src/apps/lc-compliance/capture_test.cpp
@@ -16,7 +16,12 @@
using namespace libcamera;
const std::vector<int> NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 };
-const std::vector<StreamRole> ROLES = { Raw, StillCapture, VideoRecording, Viewfinder };
+const std::vector<StreamRole> ROLES = {
+ StreamRole::Raw,
+ StreamRole::StillCapture,
+ StreamRole::VideoRecording,
+ StreamRole::Viewfinder
+};
class SingleStream : public testing::TestWithParam<std::tuple<StreamRole, int>>
{
@@ -54,10 +59,12 @@ void SingleStream::TearDown()
std::string SingleStream::nameParameters(const testing::TestParamInfo<SingleStream::ParamType> &info)
{
- std::map<StreamRole, std::string> rolesMap = { { Raw, "Raw" },
- { StillCapture, "StillCapture" },
- { VideoRecording, "VideoRecording" },
- { Viewfinder, "Viewfinder" } };
+ std::map<StreamRole, std::string> 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));