[PATCH 3/4] v4l2-tracer: stringify target in v4l2_selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The struct v4l2_selection has a member "target" that is currently being
traced as an integer.  Since the "target" values are defines, convert them
to strings to make the trace easier to read.

Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>
---
 utils/v4l2-tracer/v4l2-tracer-gen.pl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/utils/v4l2-tracer/v4l2-tracer-gen.pl b/utils/v4l2-tracer/v4l2-tracer-gen.pl
index f3eb87bb..4db204e3 100755
--- a/utils/v4l2-tracer/v4l2-tracer-gen.pl
+++ b/utils/v4l2-tracer/v4l2-tracer-gen.pl
@@ -246,7 +246,9 @@ sub get_val_def_name {
 	if ($member eq "audmode") {
 		return "tuner_audmode_val_def";
 	}
-	return "";
+	if ($member eq "target" && $struct_name eq "v4l2_selection") {
+		return "selection_target_val_def";
+	}
 }
 
 sub get_flag_def_name {
@@ -974,6 +976,11 @@ while (<>) {
 	if (grep {/^#define\s+(MEDIA_REQUEST_IOC\w*)\s*.*/} $_) {
 		push (@ioctls, $_);
 	}
+	if (grep {/^#define V4L2_SEL_TGT_CROP\s+/} $_) {
+		printf $fh_common_info_h "constexpr val_def selection_target_val_def[] = {\n";
+		val_def_gen("V4L2_SEL_TGT_COMPOSE_PADDED");
+		next;
+	}
 }
 
 printf $fh_common_info_h "constexpr val_def control_val_def[] = {\n";
-- 
2.40.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux