@@ -41,6 +41,7 @@ const std::list<unsigned long> ioctls = {
VIDIOC_S_EXT_CTRLS,
VIDIOC_TRY_EXT_CTRLS,
VIDIOC_ENUM_FRAMESIZES,
+ VIDIOC_ENUM_FRAMEINTERVALS,
VIDIOC_ENCODER_CMD,
VIDIOC_TRY_ENCODER_CMD,
VIDIOC_CREATE_BUFS,
@@ -978,6 +978,19 @@ void retrace_vidioc_enum_framesizes(int fd_retrace, json_object *ioctl_args)
free(ptr);
}
+void retrace_vidioc_enum_frameintervals(int fd_retrace, json_object *ioctl_args)
+{
+ struct v4l2_frmivalenum *ptr = retrace_v4l2_frmivalenum_gen(ioctl_args);
+
+ ioctl(fd_retrace, VIDIOC_ENUM_FRAMEINTERVALS, ptr);
+
+ if (is_verbose() || (errno != 0))
+ perror("VIDIOC_ENUM_FRAMEINTERVALS");
+
+ free(ptr);
+}
+
+
void retrace_vidioc_try_encoder_cmd(int fd_retrace, json_object *ioctl_args)
{
struct v4l2_encoder_cmd *ptr = retrace_v4l2_encoder_cmd_gen(ioctl_args);
@@ -1287,6 +1300,9 @@ void retrace_ioctl(json_object *syscall_obj)
case VIDIOC_ENUM_FRAMESIZES:
retrace_vidioc_enum_framesizes(fd_retrace, ioctl_args_user);
break;
+ case VIDIOC_ENUM_FRAMEINTERVALS:
+ retrace_vidioc_enum_frameintervals(fd_retrace, ioctl_args_user);
+ break;
case VIDIOC_TRY_ENCODER_CMD:
retrace_vidioc_try_encoder_cmd(fd_retrace, ioctl_args_user);
break;
@@ -592,6 +592,9 @@ json_object *trace_ioctl_args(unsigned long cmd, void *arg)
case VIDIOC_ENUM_FRAMESIZES:
trace_v4l2_frmsizeenum_gen(arg, ioctl_args);
break;
+ case VIDIOC_ENUM_FRAMEINTERVALS:
+ trace_v4l2_frmivalenum_gen(arg, ioctl_args);
+ break;
case VIDIOC_TRY_ENCODER_CMD:
case VIDIOC_ENCODER_CMD:
trace_v4l2_encoder_cmd_gen(arg, ioctl_args);
@@ -372,6 +372,15 @@ sub handle_union {
printf $fh_trace_cpp "\tdefault:\n\t\tbreak;\n\t}\n";
}
+ if ($struct_name eq "v4l2_frmivalenum") {
+ printf $fh_trace_cpp "\tswitch (p->type) {\n";
+ printf $fh_trace_cpp "\tcase V4L2_FRMIVAL_TYPE_DISCRETE:\n";
+ printf $fh_trace_cpp "\t\ttrace_v4l2_fract_gen(&p->discrete, %s_obj);\n\t\tbreak;\n", $struct_name;
+ printf $fh_trace_cpp "\tcase V4L2_FRMIVAL_TYPE_STEPWISE:\n\tcase V4L2_FRMIVAL_TYPE_CONTINUOUS:\n";
+ printf $fh_trace_cpp "\t\ttrace_v4l2_frmival_stepwise_gen(&p->stepwise, %s_obj);\n\t\tbreak;\n", $struct_name;
+ printf $fh_trace_cpp "\tdefault:\n\t\tbreak;\n\t}\n";
+ }
+
return $suppress_union;
}
Add tracing and retracing for VIDIOC_ENUM_FRAMEINTERVALS ioctl. Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> --- utils/v4l2-tracer/libv4l2tracer.cpp | 1 + utils/v4l2-tracer/retrace.cpp | 16 ++++++++++++++++ utils/v4l2-tracer/trace.cpp | 3 +++ utils/v4l2-tracer/v4l2-tracer-gen.pl | 9 +++++++++ 4 files changed, 29 insertions(+)