summaryrefslogtreecommitdiff
path: root/v4l2-apps/test/driver-test.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-05-08 23:19:22 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-05-08 23:19:22 -0300
commit4f1a121a633c3de1bd905b3becd57955b5e2b608 (patch)
tree859303f993775836463f03b441a938f9e6541be8 /v4l2-apps/test/driver-test.c
parent02e085b956ce32aa54ff3a2e938a0919ac75c643 (diff)
parentaca3b2a0241d96ebe7198577dd48ba46b3e8079f (diff)
downloadmediapointer-dvb-s2-4f1a121a633c3de1bd905b3becd57955b5e2b608.tar.gz
mediapointer-dvb-s2-4f1a121a633c3de1bd905b3becd57955b5e2b608.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/dvb-pll-conv
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.c16
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);