From ad73f471bd66efa67cbc9e3ad3aa5a16dc85413e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 1 Dec 2006 13:42:08 -0200 Subject: Start adding mmap streaming into driver-test From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l2-apps/test/driver-test.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'v4l2-apps/test') diff --git a/v4l2-apps/test/driver-test.c b/v4l2-apps/test/driver-test.c index 809ee170c..32b676836 100644 --- a/v4l2-apps/test/driver-test.c +++ b/v4l2-apps/test/driver-test.c @@ -16,6 +16,8 @@ #include "../lib/v4l2_driver.h" #include +#include +#include int main(void) { @@ -58,6 +60,8 @@ int main(void) /* Tries all formats */ for (cur=drv.fmt_caps;cur!=NULL;cur=cur->next) { struct v4l2_format fmt; + memset (&fmt,0,sizeof(fmt)); + uint32_t pixelformat=((struct v4l2_fmtdesc *)cur->curr)->pixelformat; if (cur->curr) { if (v4l2_gettryset_fmt_cap (&drv,V4L2_SET,&fmt, 640, 480, @@ -72,6 +76,13 @@ int main(void) v4l2_mmap_bufs(&drv, 2); +// v4l2_start_streaming(&drv); + +//sleep (1); + +// v4l2_stop_streaming(&drv); + + if (v4l2_close (&drv)<0) { perror("close"); return -1; -- cgit v1.2.3