Message ID | 20250703140631.29979-1-uajain@igalia.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp index f63fcb22..feef1585 100644 --- a/src/apps/cam/camera_session.cpp +++ b/src/apps/cam/camera_session.cpp @@ -236,7 +236,17 @@ void CameraSession::listProperties() const const ControlId *id = properties::properties.at(key); std::cout << "Property: " << id->name() << " = " - << value.toString() << std::endl; + << value.toString(); + + if (value.type() == ControlTypeInteger32) { + int32_t val = value.get<int32_t>(); + const auto &iter = id->enumerators().find(val); + + if (iter != id->enumerators().end()) + std::cout << " [ " << iter->second << " ]"; + } + + std::cout << std::endl; } }
Some camera properties might be set as a enumeration for e.g. properties::Location. Instead of printing the int32_t values for the enumeration, print the enum string as well. This will enhance the readability for the user. Signed-off-by: Umang Jain <uajain@igalia.com> --- src/apps/cam/camera_session.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)