diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-22 10:30:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-22 10:30:04 -0300 |
commit | 4a78e983d25641804f5c0c83b6c10e51063b7872 (patch) | |
tree | ce0631476907751234d1d60ee9d1f72e18b30de2 /v4l2-apps/test/driver-test.c | |
parent | 2a03de082a1ec685712a48cedb06a73d5d607088 (diff) | |
parent | 126b42f75f3d60cf024d206f8d7fb8680903cf8a (diff) | |
download | mediapointer-dvb-s2-4a78e983d25641804f5c0c83b6c10e51063b7872.tar.gz mediapointer-dvb-s2-4a78e983d25641804f5c0c83b6c10e51063b7872.tar.bz2 |
merge: http://linuxtv.org/hg/~aapot/m920x
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/test/driver-test.c')
-rw-r--r-- | v4l2-apps/test/driver-test.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/v4l2-apps/test/driver-test.c b/v4l2-apps/test/driver-test.c index a2ac365a3..e4c16ed54 100644 --- a/v4l2-apps/test/driver-test.c +++ b/v4l2-apps/test/driver-test.c @@ -31,12 +31,13 @@ int main(void) struct v4l2_driver drv; struct drv_list *cur; unsigned int count = 10, i; + double freq; if (v4l2_open ("/dev/video0", 1,&drv)<0) { perror("open /dev/video0"); return -1; } - if (v4l2_enum_stds (&drv)) { + if (v4l2_enum_stds (&drv)<0) { perror("enum_stds"); printf("Error! Driver is not reporting supported STD, frames/sec and number of lines!\n Trying to continue anyway...\n"); } else { @@ -83,6 +84,19 @@ int main(void) perror("get_parm"); } + + v4l2_getset_freq (&drv,V4L2_GET, &freq); + + freq=0; + v4l2_getset_freq (&drv,V4L2_SET, &freq); + + freq=121250000; /* 121.250 MHz */ + v4l2_getset_freq (&drv,V4L2_SET, &freq); + + printf("Preparing for frames...\n"); + fflush (stdout); + sleep(1); + v4l2_mmap_bufs(&drv, 2); v4l2_start_streaming(&drv); |