aboutsummaryrefslogtreecommitdiffstats
path: root/console
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:41 (GMT)
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:41 (GMT)
commit291d7b864be127f1fe78138b5fe476387d18f1ba (patch)
tree5842836baef5297b73a48c2713b56785c6d8b891 /console
parent1ddc68f41b45a67503550821e4492c6a08970c88 (diff)
v3.91
Diffstat (limited to 'console')
-rw-r--r--console/scantv.c5
-rw-r--r--console/v4l-conf.c28
2 files changed, 30 insertions, 3 deletions
diff --git a/console/scantv.c b/console/scantv.c
index 3bebf78..0a470f6 100644
--- a/console/scantv.c
+++ b/console/scantv.c
@@ -308,7 +308,10 @@ main(int argc, char **argv)
name = get_vbi_name(vbi);
fprintf(stderr,"%s\n",name ? name : "???");
if (NULL == name) {
- sprintf(dummy,"unknown (%s)",chanlist[fi].name);
+ if (-1 == fi)
+ sprintf(dummy,"unknown (%s)",chanlist[fi].name);
+ else
+ sprintf(dummy,"unknown (%.2f)",fc/16.0);
name = dummy;
}
if (-1 != fi) {
diff --git a/console/v4l-conf.c b/console/v4l-conf.c
index e492644..fd9919f 100644
--- a/console/v4l-conf.c
+++ b/console/v4l-conf.c
@@ -49,6 +49,8 @@ struct DISPLAYINFO {
int verbose = 1;
int yuv = 0;
+int v4l1 = 1;
+int v4l2 = 1;
int user_bpp = 0;
int user_shift = 0;
void *user_base = NULL;
@@ -318,6 +320,12 @@ displayinfo_v4l2(int fd, struct DISPLAYINFO *d)
struct v4l2_capability cap;
struct v4l2_framebuffer fb;
+ if (0 == v4l2) {
+ if (verbose)
+ fprintf(stderr,"skipping v4l2 (disabled on the cmd line)\n");
+ return -1;
+ }
+
if (-1 == ioctl(fd,VIDIOC_QUERYCAP,&cap)) {
if (verbose)
fprintf(stderr,"%s [v4l2]: ioctl VIDIOC_QUERYCAP: %s\n",
@@ -384,6 +392,12 @@ displayinfo_v4l(int fd, struct DISPLAYINFO *d)
struct video_capability capability;
struct video_buffer fbuf;
+ if (0 == v4l1) {
+ if (verbose)
+ fprintf(stderr,"skipping v4l (disabled on the cmd line)\n");
+ return -1;
+ }
+
if (-1 == ioctl(fd,VIDIOCGCAP,&capability)) {
fprintf(stderr,"%s [v4l]: ioctl VIDIOCGCAP: %s\n",
videodev,strerror(errno));
@@ -462,7 +476,7 @@ main(int argc, char *argv[])
/* parse options */
for (;;) {
- if (-1 == (c = getopt(argc, argv, "hyqd:c:b:s:fa:")))
+ if (-1 == (c = getopt(argc, argv, "hyq12d:c:b:s:fa:")))
break;
switch (c) {
case 'q':
@@ -471,6 +485,14 @@ main(int argc, char *argv[])
case 'y':
yuv = 1;
break;
+ case '1':
+ v4l1 = 1;
+ v4l2 = 0;
+ break;
+ case '2':
+ v4l1 = 0;
+ v4l2 = 1;
+ break;
case 'd':
display = optarg;
break;
@@ -515,7 +537,9 @@ main(int argc, char *argv[])
" -f query frame buffer device for info\n"
" -a <addr> set framebuffer address to <addr>\n"
" (in hex, root only, successful autodetect\n"
- " will overwrite this address)\n",
+ " will overwrite this address)\n"
+ " -1 force v4l API\n"
+ " -2 force v4l2 API\n",
argv[0],
#ifndef X_DISPLAY_MISSING
display ? display : "none",

Privacy Policy