diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-04-01 11:24:37 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-04-01 11:24:37 +0200 |
commit | 851f9d3af14836eb811eca636a25addcd924da20 (patch) | |
tree | fb26c8544ba92c7eeccf8e80f208b00ed4bd547f | |
parent | f16fd6be2b159f7dbff392a08babd0e22ebd63db (diff) |
v3.39
-rw-r--r-- | Changes | 9 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/rules | 9 | ||||
-rw-r--r-- | debian/xawtv.files | 1 | ||||
-rw-r--r-- | http/alevtd.man | 3 | ||||
-rw-r--r-- | http/main.c | 12 | ||||
-rw-r--r-- | libng/color_lut.c | 4 | ||||
-rw-r--r-- | libng/grab-bsd.c | 55 | ||||
-rw-r--r-- | libng/grab-ng.c | 5 | ||||
-rw-r--r-- | libng/grab-v4l.c | 1 | ||||
-rw-r--r-- | libng/grab-v4l2.c | 2 | ||||
-rw-r--r-- | man/scantv.man | 36 | ||||
-rw-r--r-- | xawtv.spec | 2 |
15 files changed, 125 insertions, 25 deletions
@@ -1,4 +1,13 @@ +3.38 => 3.39 +============ + + * fixed a bug in color space conversion. + * fixed minor initialization bugs in grab-v4l.c + grab-v4l2.c + * added attribute reading for BSD. + * added a switch to alevtd to set the vbi device. + + 3.37 => 3.38 ============ diff --git a/Makefile.in b/Makefile.in index aec5b36..5b53987 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,7 @@ SUBDIRS=libvbi libng src man radio font tools webcam http #i2c vtx all build dep depend install clean distclean realclean:: set -ex; for dir in $(SUBDIRS); do \ - cd $$dir; $(MAKE) $@; cd ..; \ + (cd $$dir; $(MAKE) $@); \ done distclean realclean:: diff --git a/debian/changelog b/debian/changelog index 6cf1e77..7ae8237 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xawtv (3.39) unstable; urgency=low + + * new release. + * added xbase-clients to build-depends (closes: #89522). + + -- Gerd Knorr <kraxel@debian.org> Tue, 13 Mar 2001 21:30:12 +0100 + xawtv (3.38) unstable; urgency=low * new release (closes: #88396). diff --git a/debian/control b/debian/control index 5811104..09c6c5b 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: xawtv Section: graphics Priority: extra -Build-Depends: libjpeg62-dev, libncurses5-dev, xlibs-dev (>= 4.0.1), xaw3dg-dev, liblircclient-dev, debhelper, xutils, libquicktime4linux-dev +Build-Depends: libjpeg62-dev, libncurses5-dev, xlibs-dev (>= 4.0.1), xaw3dg-dev, liblircclient-dev, debhelper, xutils, libquicktime4linux-dev, xbase-clients Maintainer: Gerd Knorr <kraxel@debian.org> Standards-Version: 3.5.2 diff --git a/debian/rules b/debian/rules index 813ff20..d241287 100644 --- a/debian/rules +++ b/debian/rules @@ -18,11 +18,16 @@ install: build $(MAKE) ROOT=$(ROOT) $@ dh_movefiles + # fix v4l-conf suid-root lintian warning + mkdir -p debian/v4l-conf/usr/share/lintian/overrides + echo "v4l-conf: setuid-binary" \ + > debian/v4l-conf/usr/share/lintian/overrides/v4l-conf + + binary-indep: install # nop binary-arch: install - dh_installdebconf dh_installdocs README* Changes UPDATE_TO_v3.0 \ Programming-FAQ Trouble-Shooting Sound-FAQ \ contrib/dot.lircrc contrib/frequencies* @@ -36,7 +41,7 @@ binary-arch: install # dh_installcron # dh_installmanpages # dh_installinfo - dh_undocumented -p xawtv scantv.1 + dh_installdebconf -p xawtv dh_undocumented -p xawtv-tools record.1 dump-mixers.1 dh_undocumented -p streamer streamer.1 dh_installchangelogs diff --git a/debian/xawtv.files b/debian/xawtv.files index 693831b..2c5ef1d 100644 --- a/debian/xawtv.files +++ b/debian/xawtv.files @@ -6,6 +6,7 @@ /usr/share/man/man1/v4lctl.1 /usr/share/man/man1/xawtv.1 /usr/share/man/man1/rootv.1 +/usr/share/man/man1/scantv.1 /usr/share/man/man1/xawtv-remote.1 /usr/X11R6/lib/X11/fonts/misc/led-latin1.pcf /usr/X11R6/lib/X11/fonts/misc/led-latin2.pcf diff --git a/http/alevtd.man b/http/alevtd.man index f84564f..b98b380 100644 --- a/http/alevtd.man +++ b/http/alevtd.man @@ -13,6 +13,9 @@ start it and point your browser to http://localhost:5654/ .B -h print a short \fBh\fPelp text and the default values for all options. .TP +.B -v dev +set \fBv\fPbi device (default: /dev/vbi). +.TP .B -d enable \fBd\fPebug output. .TP diff --git a/http/main.c b/http/main.c index c300178..4427d3a 100644 --- a/http/main.c +++ b/http/main.c @@ -46,6 +46,7 @@ char *listen_port = "5654"; char server_host[256]; char user[17]; char group[17]; +char *vbidev = "/dev/vbi"; char *logfile = NULL; FILE *log = NULL; int flushlog = 0; @@ -105,6 +106,7 @@ usage(char *name) "\n" "Options:\n" " -h print this text\n" + " -v dev vbi device [%s]\n" " -6 16 vbi lines (depending on the bttv version\n" " -9 19 vbi lines one of these two should work)\n" " -d enable debug output [%s]\n" @@ -118,6 +120,7 @@ usage(char *name) " -l log write access log to file >log< [%s]\n" " -L log same as above + flush every line\n", h ? h+1 : name, + vbidev, debug ? "on" : "off", dontdetach ? "on" : "off", usesyslog ? "on" : "off", @@ -526,7 +529,7 @@ main(int argc, char *argv[]) /* parse options */ for (;;) { - if (-1 == (c = getopt(argc,argv,"69hsdFp:n:i:t:c:u:g:l:L:"))) + if (-1 == (c = getopt(argc,argv,"69hsdFp:n:i:t:c:u:g:l:L:v:"))) break; switch (c) { case 'h': @@ -574,6 +577,9 @@ main(int argc, char *argv[]) case 'l': logfile = optarg; break; + case 'v': + vbidev = optarg; + break; default: exit(1); } @@ -583,9 +589,9 @@ main(int argc, char *argv[]) /* open vbi device */ fdset_init(fds); - vbi = vbi_open("/dev/vbi", cache_open(), 0, bttv); + vbi = vbi_open(vbidev, cache_open(), 0, bttv); if (vbi == 0) { - xperror(LOG_ERR,"cannot open /dev/vbi",NULL); + xperror(LOG_ERR,"cannot open vbi device",NULL); exit(1); } fmt = export_open("ascii"); diff --git a/libng/color_lut.c b/libng/color_lut.c index dc0318c..e9bc3d9 100644 --- a/libng/color_lut.c +++ b/libng/color_lut.c @@ -264,7 +264,7 @@ ng_lut_init(unsigned long red_mask, unsigned long green_mask, lut_blue[i] = (i >> (8 - rgb_blue_bits)) << rgb_blue_shift; switch (ng_vfmt_to_depth[fmtid]) { - case 2: + case 16: if (swap) { for (i = 0; i < 256; i++) { lut_red[i] = SWAP2(lut_red[i]); @@ -276,7 +276,7 @@ ng_lut_init(unsigned long red_mask, unsigned long green_mask, lut2_list[i].fmtid_out = fmtid; ng_conv_register(lut2_list,nconv2); break; - case 4: + case 32: if (swap) { for (i = 0; i < 256; i++) { lut_red[i] = SWAP4(lut_red[i]); diff --git a/libng/grab-bsd.c b/libng/grab-bsd.c index 4e44dee..3dc6507 100644 --- a/libng/grab-bsd.c +++ b/libng/grab-bsd.c @@ -419,22 +419,25 @@ static struct ng_attribute* bsd_attrs(void *handle) /* ---------------------------------------------------------------------- */ static int -bsd_get_range(int id, int *min, int *max, int *set) +bsd_get_range(int id, int *min, int *max, int *get, int *set) { switch (id) { case ATTR_ID_HUE: *min = BT848_HUEREGMIN; *max = BT848_HUEREGMAX; + *get = BT848_GHUE; *set = BT848_SHUE; break; case ATTR_ID_BRIGHT: *min = BT848_BRIGHTREGMIN; *max = BT848_BRIGHTREGMAX; + *get = BT848_GBRIG; *set = BT848_SBRIG; break; case ATTR_ID_CONTRAST: *min = BT848_CONTRASTREGMIN; *max = BT848_CONTRASTREGMAX; + *get = BT848_GCONT; *set = BT848_SCONT; break; default: @@ -445,40 +448,64 @@ bsd_get_range(int id, int *min, int *max, int *set) static int bsd_read_attr(void *handle, struct ng_attribute *attr) { -#if 0 struct bsd_handle *h = handle; -#endif - int value = 0; + int arg, min, max, get, set, i; + int value = -1; - /* FIXME */ - + switch (attr->id) { + case ATTR_ID_NORM: + if (-1 != xioctl(h->fd,BT848GFMT,&arg)) + for (i = 0; i < sizeof(norms_map)/sizeof(int); i++) + if (arg == norms_map[i]) + value = i; + break; + case ATTR_ID_INPUT: + if (-1 != xioctl(h->fd,METEORGINPUT,&arg)) + for (i = 0; i < sizeof(inputs_map)/sizeof(int); i++) + if (arg == inputs_map[i]) + value = i; + break; + case ATTR_ID_MUTE: + if (-1 != xioctl(h->tfd, BT848_GAUDIO, &arg)) + value = (arg == AUDIO_MUTE) ? 1 : 0; + break; + case ATTR_ID_HUE: + case ATTR_ID_BRIGHT: + case ATTR_ID_CONTRAST: + bsd_get_range(attr->id,&min,&max,&get,&set); + if (-1 != xioctl(h->tfd,get,&arg)) { + value = (arg + min) * 65536 / (max - min); + if (value < 0) value = 0; + if (value > 65535) value = 65535; + } + break; + default: + break; + } return value; } static void bsd_write_attr(void *handle, struct ng_attribute *attr, int value) { struct bsd_handle *h = handle; - int arg, min, max, set; + int arg, min, max, get, set; switch (attr->id) { case ATTR_ID_NORM: - if (-1 == ioctl(h->fd,BT848SFMT,&norms_map[value])) - perror("ioctl BT848SFMT"); + xioctl(h->fd,BT848SFMT,&norms_map[value]); break; case ATTR_ID_INPUT: - if (-1 == ioctl(h->fd,METEORSINPUT,&inputs_map[value])) - perror("ioctl METEORSINPUT"); + xioctl(h->fd,METEORSINPUT,&inputs_map[value]); break; case ATTR_ID_MUTE: h->muted = value; arg = h->muted ? AUDIO_MUTE : AUDIO_UNMUTE; - if (-1 == ioctl(h->tfd, BT848_SAUDIO, &arg)) - perror("ioctl BT848_SAUDIO"); + xioctl(h->tfd, BT848_SAUDIO, &arg); break; case ATTR_ID_HUE: case ATTR_ID_BRIGHT: case ATTR_ID_CONTRAST: - bsd_get_range(attr->id,&min,&max,&set); + bsd_get_range(attr->id,&min,&max,&get,&set); arg = value * (max - min) / 65536 + min; if (arg < min) value = min; if (arg > max) value = max; diff --git a/libng/grab-ng.c b/libng/grab-ng.c index 2beb017..622fadb 100644 --- a/libng/grab-ng.c +++ b/libng/grab-ng.c @@ -396,6 +396,11 @@ ng_conv_find(int out, int *i) if (*i) (*i)++; for (; *i < ng_nconv; (*i)++) { +#if 0 + fprintf(stderr,"\tconv: %-28s => %s\n", + ng_vfmt_to_desc[ng_conv[*i].fmtid_in], + ng_vfmt_to_desc[ng_conv[*i].fmtid_out]); +#endif if (ng_conv[*i].fmtid_out == out) return &ng_conv[*i]; } diff --git a/libng/grab-v4l.c b/libng/grab-v4l.c index de71c8f..14fd11b 100644 --- a/libng/grab-v4l.c +++ b/libng/grab-v4l.c @@ -428,6 +428,7 @@ v4l_open(char *device) inputs[i].nr = -1; inputs[i].str = NULL; v4l_add_attr(h,ATTR_ID_INPUT,ATTR_TYPE_CHOICE,0,inputs); + h->input = -1; /* audios */ if (ng_debug) diff --git a/libng/grab-v4l2.c b/libng/grab-v4l2.c index 25887ab..1f6951f 100644 --- a/libng/grab-v4l2.c +++ b/libng/grab-v4l2.c @@ -668,7 +668,7 @@ static int v4l2_read_attr(void *handle, struct ng_attribute *attr) } } else if (attr->id == ATTR_ID_NORM) { - /* FIXME */ + value = -1; /* FIXME */ } else if (attr->id == ATTR_ID_INPUT) { xioctl(h->fd,VIDIOC_G_INPUT,&value,0); diff --git a/man/scantv.man b/man/scantv.man new file mode 100644 index 0000000..7312bb6 --- /dev/null +++ b/man/scantv.man @@ -0,0 +1,36 @@ +.TH scantv 1 "(c) 2000 Gerd Knorr" +.SH NAME +scantv - scan a v4l device for TV stations. +.SH SYNOPSIS +.B scantv [ options ] +.SH DESCRIPTION +.B scantv +scans a v4l device for available TV stations and writes a +xawtv/fbtv config file to stdout. +.SH OPTIONS +.TP +.B -n norm +set tv \fBn\fPorm +.TP +.B -f table +set \fBf\fPrequency table. +.SH SEE ALSO +xawtv(1), fbtv(1) +.SH AUTHOR +Gerd Knorr <kraxel@goldbach.in-berlin.de> +.SH COPYRIGHT +Copyright (C) 2000 Gerd Knorr <kraxel@goldbach.in-berlin.de> +.P +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +.P +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +.P +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -8,7 +8,7 @@ Summary: Video4Linux Stream Capture Viewer Name: xawtv -Version: 3.38 +Version: 3.39 Release: 1 Source0: xawtv_%{version}.tar.gz Group: X11/Applications |