* [PATCH] v4l2-info: move flags2s to v4l2-info.h
@ 2022-09-28 18:07 Deborah Brouwer
0 siblings, 0 replies; only message in thread
From: Deborah Brouwer @ 2022-09-28 18:07 UTC (permalink / raw)
To: linux-media; +Cc: hverkuil-cisco, Deborah Brouwer
Make the flag2s function available to other utilities.
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
utils/common/v4l2-info.cpp | 7 +------
utils/common/v4l2-info.h | 8 ++++++++
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/utils/common/v4l2-info.cpp b/utils/common/v4l2-info.cpp
index a7964ad0..b297d7ce 100644
--- a/utils/common/v4l2-info.cpp
+++ b/utils/common/v4l2-info.cpp
@@ -16,12 +16,7 @@ static std::string num2s(unsigned num, bool is_hex = true)
return buf;
}
-struct flag_def {
- unsigned flag;
- const char *str;
-};
-
-static std::string flags2s(unsigned val, const flag_def *def)
+std::string flags2s(unsigned val, const flag_def *def)
{
std::string s;
diff --git a/utils/common/v4l2-info.h b/utils/common/v4l2-info.h
index 35237853..4a9aa3e8 100644
--- a/utils/common/v4l2-info.h
+++ b/utils/common/v4l2-info.h
@@ -11,6 +11,14 @@
#include <linux/videodev2.h>
#include <linux/v4l2-subdev.h>
+struct flag_def {
+ unsigned flag;
+ const char *str;
+};
+
+/* Return a comma-separated string of flags or hex value if unknown */
+std::string flags2s(unsigned val, const flag_def *def);
+
/* Print capability information */
void v4l2_info_capability(const v4l2_capability &cap);
void v4l2_info_subdev_capability(const v4l2_subdev_capability &subdevcap);
--
2.37.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-28 18:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 18:07 [PATCH] v4l2-info: move flags2s to v4l2-info.h Deborah Brouwer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.