aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-10-07 06:37:11 (GMT)
committerHans Verkuil <hans.verkuil@cisco.com>2011-10-07 06:37:11 (GMT)
commit95512bfb5c1d05016a8d527e76e0091ab635053b (patch)
treec07ed17195d814848b490d37524d989c1fd8cc91
parent1b9dfaf5ffc624320d52fe4caa5f96d053530fef (diff)
v4l2-ctl: add support for the frame_sync event.master
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index f624fb2..e9250b7 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -531,7 +531,7 @@ static void usage(void)
" --wait-for-event=<event>\n"
" wait for an event [VIDIOC_DQEVENT]\n"
" <event> is the event number or one of:\n"
- " eos, vsync, ctrl=<id>\n"
+ " eos, vsync, ctrl=<id>, frame_sync\n"
" where <id> is the name of the control\n"
" --poll-for-event=<event>\n"
" poll for an event [VIDIOC_DQEVENT]\n"
@@ -1920,6 +1920,9 @@ static void print_event(const struct v4l2_event *ev)
if (ctrl->changes & V4L2_EVENT_CTRL_CH_FLAGS)
printf("\tflags: %s\n", ctrlflags2s(ctrl->flags).c_str());
break;
+ case V4L2_EVENT_FRAME_SYNC:
+ printf("frame_sync %d\n", ev->u.frame_sync.frame_sequence);
+ break;
default:
if (ev->type >= V4L2_EVENT_PRIVATE_START)
printf("unknown private event (%08x)\n", ev->type);
@@ -1944,6 +1947,8 @@ static __u32 parse_event(const char *e, const char **name)
event = V4L2_EVENT_CTRL;
*name = e + 5;
}
+ else if (!strcmp(e, "frame_sync"))
+ event = V4L2_EVENT_FRAME_SYNC;
if (event == 0) {
fprintf(stderr, "Unknown event\n");

Privacy Policy