rpms/xawtv/devel xawtv-3.95-bpl.patch, NONE, 1.1 xawtv-3.95-fixes.patch, NONE, 1.1 xawtv-3.95-libv4l2.patch, NONE, 1.1 xawtv-3.95-man.patch, NONE, 1.1 xawtv-3.95-no-dga.patch, NONE, 1.1 xawtv-3.95-oss.patch, NONE, 1.1 xawtv-3.95-scantv.patch, NONE, 1.1 xawtv-3.95-v4l2-old-drop.patch, NONE, 1.1 xawtv.spec, 1.14, 1.15
Dmitry Butskoy
buc at fedoraproject.org
Tue Aug 26 16:41:14 UTC 2008
Author: buc
Update of /cvs/extras/rpms/xawtv/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9554
Modified Files:
xawtv.spec
Added Files:
xawtv-3.95-bpl.patch xawtv-3.95-fixes.patch
xawtv-3.95-libv4l2.patch xawtv-3.95-man.patch
xawtv-3.95-no-dga.patch xawtv-3.95-oss.patch
xawtv-3.95-scantv.patch xawtv-3.95-v4l2-old-drop.patch
Log Message:
- fix some typos in manuals (patch7, derived from Debian)
- fix recording from oss (patch8, derived from Debian)
- allow scantv to use another card's input (patch9, derived from Debian)
- some v4l2 code fixes (patch10, Hans de Goede <j.w.r.degoede at hhs.nl>)
- skip dga automatically when not available (patch11, Hans de Goede)
- specifying of bpl pitch for v4l-conf (patch12, Hans de Goede)
- drop drv0-v4l2-old.so driver (assume not needed anyway now)
- optional (default yes) build with libv4l wrapper library
(patch100, Hans de Goede <j.w.r.degoede at hhs.nl>)
xawtv-3.95-bpl.patch:
--- NEW FILE xawtv-3.95-bpl.patch ---
diff -Nrbu xawtv-3.95/console/v4l-conf.c xawtv-3.95-OK/console/v4l-conf.c
--- xawtv-3.95/console/v4l-conf.c 2008-08-26 19:37:34.000000000 +0400
+++ xawtv-3.95-OK/console/v4l-conf.c 2008-08-26 19:39:28.000000000 +0400
@@ -53,6 +53,7 @@
int v4l2 = 1;
int user_bpp = 0;
int user_shift = 0;
+int user_bpl = 0;
void *user_base = NULL;
char *display = NULL;
char *fbdev = NULL;
@@ -385,7 +386,15 @@
}
if (yuv)
fb.fmt.pixelformat = V4L2_PIX_FMT_YUYV;
+ /* Prefer an already configured bpl (if it makes sense) over our found bpl
+ if we did not find a base as our bpl is not very reliable when we did
+ not find a base */
+ if (user_bpl || d->base ||
+ fb.fmt.bytesperline < (fb.fmt.width * ((d->bpp + 7) / 8)))
fb.fmt.bytesperline = d->bpl;
+ else
+ fprintf(stderr,"WARNING: keeping fbuf pitch at: %d, as no base addr was detected\n",
+ (int)fb.fmt.bytesperline);
fb.fmt.sizeimage = fb.fmt.height * fb.fmt.bytesperline;
if (NULL != d->base)
fb.base = d->base;
@@ -498,7 +507,7 @@
/* parse options */
for (;;) {
- if (-1 == (c = getopt(argc, argv, "hyq12d:c:b:s:fa:")))
+ if (-1 == (c = getopt(argc, argv, "hyq12d:c:b:s:fa:p:")))
break;
switch (c) {
case 'q':
@@ -543,6 +552,14 @@
exit(1);
}
break;
+ case 'p':
+ if (0 == getuid()) {
+ sscanf(optarg,"%d",&user_bpl);
+ } else {
+ fprintf(stderr,"only root is allowed to use the -p option\n");
+ exit(1);
+ }
+ break;
case 'h':
default:
fprintf(stderr,
@@ -560,6 +577,8 @@
" -a <addr> set framebuffer address to <addr>\n"
" (in hex, root only, successful autodetect\n"
" will overwrite this address)\n"
+ " -p <pitch> set framebuffer pitch to <pitch> bytes\n"
+ " (decimal, root only)\n"
" -1 force v4l API\n"
" -2 force v4l2 API\n",
argv[0],
@@ -626,6 +645,9 @@
(d.depth == 15 || d.depth == 16))
d.depth = user_bpp;
+ if (user_bpl)
+ d.bpl = user_bpl;
+
if (verbose) {
fprintf(stderr,"mode: %dx%d, depth=%d, bpp=%d, bpl=%d, ",
d.width,d.height,d.depth,d.bpp,d.bpl);
diff -Nrbu xawtv-3.95/man/v4l-conf.8 xawtv-3.95-OK/man/v4l-conf.8
--- xawtv-3.95/man/v4l-conf.8 2008-08-26 19:37:34.000000000 +0400
+++ xawtv-3.95-OK/man/v4l-conf.8 2008-08-26 19:45:02.000000000 +0400
@@ -62,6 +62,11 @@
autodetected value, this switch is only useful if autodetect doesn't
work because the X-Server lacks DGA support. You can put this into
/etc/conf.modules, as "post-install bttv ..." for example.
+.TP 4
+\fB-p\fP pitch
+Set framebuffer pitch to \fBpitch\fP bytes. The value should be specified
+in decimal. Allowed for root only. (Currently it is a distro-specific option
+added by Fedora).
.SH BUGS
Hope I haven't any security flaws in there. If you find one, drop me a
note. Mails with patches are preferred :-)
xawtv-3.95-fixes.patch:
--- NEW FILE xawtv-3.95-fixes.patch ---
diff -Nrbu xawtv-3.95/libng/plugins/drv0-v4l2.c xawtv-3.95-OK/libng/plugins/drv0-v4l2.c
--- xawtv-3.95/libng/plugins/drv0-v4l2.c 2005-02-11 20:56:24.000000000 +0300
+++ xawtv-3.95-OK/libng/plugins/drv0-v4l2.c 2008-08-26 19:27:18.000000000 +0400
@@ -91,6 +91,7 @@
struct ng_video_fmt fmt_me;
struct v4l2_requestbuffers reqbufs;
struct v4l2_buffer buf_v4l2[WANTED_BUFFERS];
+ int buf_v4l2_size[WANTED_BUFFERS];
struct ng_video_buf buf_me[WANTED_BUFFERS];
unsigned int queue,waiton;
@@ -166,7 +167,7 @@
int rc;
rc = ioctl(fd,cmd,arg);
- if (0 == rc && ng_debug < 2)
+ if (rc >= 0 && ng_debug < 2)
return rc;
if (mayfail && errno == mayfail && ng_debug < 2)
return rc;
@@ -768,6 +769,7 @@
/* get it */
memset(&buf,0,sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
if (-1 == xioctl(h->fd,VIDIOC_DQBUF,&buf, 0))
return -1;
h->waiton++;
@@ -812,6 +814,7 @@
h->buf_v4l2[i].memory = V4L2_MEMORY_MMAP;
if (-1 == xioctl(h->fd, VIDIOC_QUERYBUF, &h->buf_v4l2[i], 0))
return -1;
+ h->buf_v4l2_size[i] = h->buf_v4l2[i].length;
h->buf_me[i].fmt = h->fmt_me;
h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
h->buf_me[i].fmt.height;
@@ -865,12 +868,16 @@
ng_waiton_video_buf(&h->buf_me[i]);
if (ng_debug)
print_bufinfo(&h->buf_v4l2[i]);
- if (-1 == munmap(h->buf_me[i].data,h->buf_me[i].size))
+ if (-1 == munmap(h->buf_me[i].data, h->buf_v4l2_size[i]))
perror("munmap");
}
h->queue = 0;
h->waiton = 0;
+ /* unrequest buffers (only needed for some drivers) */
+ h->reqbufs.count = 0;
+ xioctl(h->fd, VIDIOC_REQBUFS, &h->reqbufs, EINVAL);
+
/* turn on preview (if needed) */
if (h->ov_on != h->ov_enabled) {
h->ov_on = h->ov_enabled;
@@ -907,6 +914,17 @@
fmt->width = h->fmt_v4l2.fmt.pix.width;
fmt->height = h->fmt_v4l2.fmt.pix.height;
fmt->bytesperline = h->fmt_v4l2.fmt.pix.bytesperline;
+ /* struct v4l2_format.fmt.pix.bytesperline is bytesperline for the
+ main plane for planar formats, where as we want it to be the total
+ bytesperline for all planes */
+ switch (fmt->fmtid) {
+ case VIDEO_YUV422P:
+ fmt->bytesperline *= 2;
+ break;
+ case VIDEO_YUV420P:
+ fmt->bytesperline = fmt->bytesperline * 3 / 2;
+ break;
+ }
if (0 == fmt->bytesperline)
fmt->bytesperline = fmt->width * ng_vfmt_to_depth[fmt->fmtid] / 8;
h->fmt_me = *fmt;
xawtv-3.95-libv4l2.patch:
--- NEW FILE xawtv-3.95-libv4l2.patch ---
diff -Nrbu xawtv-3.95/libng/plugins/Subdir.mk xawtv-3.95-OK/libng/plugins/Subdir.mk
--- xawtv-3.95/libng/plugins/Subdir.mk 2008-08-26 19:46:59.000000000 +0400
+++ xawtv-3.95-OK/libng/plugins/Subdir.mk 2008-08-26 19:48:40.000000000 +0400
@@ -41,6 +41,7 @@
libng/plugins/write-qt.so : LDLIBS := $(QT_LIBS)
libng/plugins/read-dv.so : LDLIBS := $(DV_LIBS)
libng/plugins/write-dv.so : LDLIBS := $(DV_LIBS)
+libng/plugins/drv0-v4l2.so: LDLIBS := -lv4l2
# global targets
all:: $(TARGETS-plugins)
diff -Nrbu xawtv-3.95/libng/plugins/drv0-v4l2.c xawtv-3.95-OK/libng/plugins/drv0-v4l2.c
--- xawtv-3.95/libng/plugins/drv0-v4l2.c 2008-08-26 19:46:59.000000000 +0400
+++ xawtv-3.95-OK/libng/plugins/drv0-v4l2.c 2008-08-26 19:48:40.000000000 +0400
@@ -29,11 +29,26 @@
#include "struct-dump.h"
#include "struct-v4l2.h"
+/* FIXME replace with autoconf detection */
+#define HAVE_LIBV4L
+
+#ifdef HAVE_LIBV4L
+#include <libv4l2.h>
+#else
+#define v4l2_fd_open(fd, flags) (fd)
+#define v4l2_close close
+#define v4l2_dup dup
+#define v4l2_ioctl ioctl
+#define v4l2_read read
+#define v4l2_mmap mmap
+#define v4l2_munmap munmap
+#endif
+
/* ---------------------------------------------------------------------- */
/* open+close */
-static void* v4l2_open(char *device);
-static int v4l2_close(void *handle);
+static void* v4l2_open_handle(char *device);
+static int v4l2_close_handle(void *handle);
/* attributes */
static char* v4l2_devname(void *handle);
@@ -111,8 +126,8 @@
struct ng_vid_driver v4l2_driver = {
name: "v4l2",
- open: v4l2_open,
- close: v4l2_close,
+ open: v4l2_open_handle,
+ close: v4l2_close_handle,
get_devname: v4l2_devname,
capabilities: v4l2_flags,
@@ -166,7 +181,7 @@
{
int rc;
- rc = ioctl(fd,cmd,arg);
+ rc = v4l2_ioctl(fd,cmd,arg);
if (rc >= 0 && ng_debug < 2)
return rc;
if (mayfail && errno == mayfail && ng_debug < 2)
@@ -220,7 +235,7 @@
}
h->streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- ioctl(h->fd,VIDIOC_G_PARM,&h->streamparm);
+ v4l2_ioctl(h->fd,VIDIOC_G_PARM,&h->streamparm);
/* controls */
for (i = 0; i < MAX_CTRL; i++) {
@@ -444,10 +459,10 @@
/* ---------------------------------------------------------------------- */
static void*
-v4l2_open(char *device)
+v4l2_open_handle(char *device)
{
struct v4l2_handle *h;
- int i;
+ int i, libv4l2_fd;
h = malloc(sizeof(*h));
if (NULL == h)
@@ -459,6 +474,16 @@
goto err;
}
+ /* Note the v4l2_xxx functions are designed so that if they get passed an
+ unknown fd, the will behave exactly as their regular xxx counterparts, so
+ if v4l2_fd_open fails, we continue as normal (missing the libv4l2 custom
+ cam format to normal formats conversion). Chances are big we will still
+ fail then though, as normally v4l2_fd_open only fails if the device is not
+ a v4l2 device. */
+ libv4l2_fd = v4l2_fd_open(h->fd, 0);
+ if (libv4l2_fd != -1)
+ h->fd = libv4l2_fd;
+
if (-1 == xioctl(h->fd,VIDIOC_QUERYCAP,&h->cap,EINVAL))
goto err;
if (ng_debug)
@@ -495,21 +520,21 @@
err:
if (h->fd != -1)
- close(h->fd);
+ v4l2_close(h->fd);
if (h)
free(h);
return NULL;
}
static int
-v4l2_close(void *handle)
+v4l2_close_handle(void *handle)
{
struct v4l2_handle *h = handle;
if (ng_debug)
fprintf(stderr, "v4l2: close\n");
- close(h->fd);
+ v4l2_close(h->fd);
free(h);
return 0;
}
@@ -818,7 +843,7 @@
h->buf_me[i].fmt = h->fmt_me;
h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
h->buf_me[i].fmt.height;
- h->buf_me[i].data = mmap(NULL, h->buf_v4l2[i].length,
+ h->buf_me[i].data = v4l2_mmap(NULL, h->buf_v4l2[i].length,
PROT_READ | PROT_WRITE, MAP_SHARED,
h->fd, h->buf_v4l2[i].m.offset);
if (MAP_FAILED == h->buf_me[i].data) {
@@ -859,7 +884,7 @@
unsigned int i;
/* stop capture */
- if (-1 == ioctl(h->fd,VIDIOC_STREAMOFF,&h->fmt_v4l2.type))
+ if (-1 == v4l2_ioctl(h->fd,VIDIOC_STREAMOFF,&h->fmt_v4l2.type))
perror("ioctl VIDIOC_STREAMOFF");
/* free buffers */
@@ -868,7 +893,7 @@
ng_waiton_video_buf(&h->buf_me[i]);
if (ng_debug)
print_bufinfo(&h->buf_v4l2[i]);
- if (-1 == munmap(h->buf_me[i].data, h->buf_v4l2_size[i]))
+ if (-1 == v4l2_munmap(h->buf_me[i].data, h->buf_v4l2_size[i]))
perror("munmap");
}
h->queue = 0;
@@ -989,7 +1014,7 @@
} else {
size = h->fmt_me.bytesperline * h->fmt_me.height;
buf = ng_malloc_video_buf(&h->fmt_me,size);
- rc = read(h->fd,buf->data,size);
+ rc = v4l2_read(h->fd,buf->data,size);
if (rc != size) {
if (-1 == rc) {
perror("v4l2: read");
@@ -1023,11 +1048,11 @@
size = h->fmt_me.bytesperline * h->fmt_me.height;
buf = ng_malloc_video_buf(&h->fmt_me,size);
if (h->cap.capabilities & V4L2_CAP_READWRITE) {
- rc = read(h->fd,buf->data,size);
+ rc = v4l2_read(h->fd,buf->data,size);
if (-1 == rc && EBUSY == errno && h->ov_on) {
h->ov_on = 0;
xioctl(h->fd, VIDIOC_OVERLAY, &h->ov_on, 0);
- rc = read(h->fd,buf->data,size);
+ rc = v4l2_read(h->fd,buf->data,size);
h->ov_on = 1;
xioctl(h->fd, VIDIOC_OVERLAY, &h->ov_on, 0);
}
xawtv-3.95-man.patch:
--- NEW FILE xawtv-3.95-man.patch ---
# A patch for various manual typos.
#
# Derived from the Debian's patches:
# 04_man_typo.dpatch
# 17_scantv_man_typo.dpatch
# (both were written by A. Costa <agcosta at gis.net>
#
diff -Nrbu xawtv-3.95/man/fbtv.1 xawtv-3.95-OK/man/fbtv.1
--- xawtv-3.95/man/fbtv.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/fbtv.1 2008-08-26 18:51:25.000000000 +0400
@@ -98,7 +98,7 @@
The BT8xx cards can produce images up to 768x576 pixels. In order to
have fbtv make use of your entire monitor-size and get maximum image
quality, you need to create a 768x576 pixels framebufferconsole. This
-can be accomplished with the fbset(1) utility, which is availabile at
+can be accomplished with the fbset(1) utility, which is available at
various locations. See: http://www.cs.kuleuven.ac.be/~geert/bin/
.P
Or, you can let fbtv handle the videomode changes with the -m switch.
diff -Nrbu xawtv-3.95/man/pia.1 xawtv-3.95-OK/man/pia.1
--- xawtv-3.95/man/pia.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/pia.1 2008-08-26 18:51:25.000000000 +0400
@@ -5,7 +5,7 @@
.B pia [ options ] movie
.SH DESCRIPTION
.B pia
-is a small X11 tool which playes movie files.
+is a small X11 tool which plays movie files.
.SH OPTIONS
.B pia
understands the usual toolkit options (-geometry + friends).
@@ -24,7 +24,7 @@
Use OSS device <dev> for sound.
.TP
.B -noxv
-Disable Xvideo extention.
+Disable Xvideo extension.
.TP
.B -nogl
Disable OpenGL.
@@ -41,7 +41,7 @@
.SH SUPPORTED MOVIE FORMATS
Main purpose of this utility is to playback movie files recorded by
xawtv, motv and streamer. It should be able to playback every AVI or
-QuickTime movie written by one of the mentioned utilites. Feel free
+QuickTime movie written by one of the mentioned utilities. Feel free
to submit a bug report if this doesn't work for some file.
.SS QuickTime
.B pia
diff -Nrbu xawtv-3.95/man/record.1 xawtv-3.95-OK/man/record.1
--- xawtv-3.95/man/record.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/record.1 2008-08-26 18:51:25.000000000 +0400
@@ -16,7 +16,7 @@
.TP
.B -o file
basename for the output file(s), a number and the .wav
-extention are added by record. Default is "record".
+extension are added by record. Default is "record".
.TP
.B -i dev
mixer control. This should be the one where you can adjust the record
diff -Nrbu xawtv-3.95/man/rootv.1 xawtv-3.95-OK/man/rootv.1
--- xawtv-3.95/man/rootv.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/rootv.1 2008-08-26 18:51:25.000000000 +0400
@@ -1,6 +1,6 @@
.TH rootv 1 "(c) 2000-2002 Gerd Knorr"
.SH NAME
-rootv - display TV using the Xvideo extention
+rootv - display TV using the Xvideo extension
.SH SYNOPSIS
.B rootv [ options ]
.SH DESCRIPTION
@@ -9,7 +9,7 @@
but you can also ask it to use the root window (thus the name) or any
other window.
.B rootv
-needs the Xvideo extention.
+needs the Xvideo extension.
.P
.B rootv
itself provides no way to control video/audio/tuner. You can use
diff -Nrbu xawtv-3.95/man/scantv.1 xawtv-3.95-OK/man/scantv.1
--- xawtv-3.95/man/scantv.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/scantv.1 2008-08-26 18:51:44.000000000 +0400
@@ -18,7 +18,7 @@
none is given.
.TP
.B -o outfile
-specify \fBo\fPutput file. If none is specified, scantv write
+specify \fBo\fPutput file. If none is specified, scantv writes
to stdout.
.TP
.B -c device
diff -Nrbu xawtv-3.95/man/subtitles.1 xawtv-3.95-OK/man/subtitles.1
--- xawtv-3.95/man/subtitles.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/subtitles.1 2008-08-26 18:51:25.000000000 +0400
@@ -8,7 +8,7 @@
fetches the given teletext page with the alevt-cap utility and
displays it using xawtv-remote in an endless loop. It's most
useful for pages which carry subtitles for the current TV program.
-It's page 150 in germany.
+It's page 150 in Germany.
.SH OPTIONS
.TP
.B -help
diff -Nrbu xawtv-3.95/man/v4l-conf.8 xawtv-3.95-OK/man/v4l-conf.8
--- xawtv-3.95/man/v4l-conf.8 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/v4l-conf.8 2008-08-26 18:51:25.000000000 +0400
@@ -20,7 +20,7 @@
knows three ways to get the informations:
.TP 3
*
-Query the X-Server using the XF86 DGA extention. This is the default
+Query the X-Server using the XF86 DGA extension. This is the default
if the DISPLAY environment variable is set.
.TP 3
*
@@ -63,7 +63,7 @@
work because the X-Server lacks DGA support. You can put this into
/etc/conf.modules, as "post-install bttv ..." for example.
.SH BUGS
-Hope I havn't any security flaws in there. If you find one, drop me a
+Hope I haven't any security flaws in there. If you find one, drop me a
note. Mails with patches are preferred :-)
.SH SEE ALSO
xawtv(1), fbtv(1)
diff -Nrbu xawtv-3.95/man/webcam.1 xawtv-3.95-OK/man/webcam.1
--- xawtv-3.95/man/webcam.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/webcam.1 2008-08-26 18:51:25.000000000 +0400
@@ -150,7 +150,7 @@
paper "Correcting Distortion of Image by Image Registration" of Toru
Tamaki, Tsuyoshi Yamamura and Noboru Ahnishi. More your lens has an
important distortion, more 'distor_k' must be neared of 0. 700 is the
-défault value. Coefficient k of program is x100 than article.
+default value. Coefficient k of program is x100 than article.
.TP
.B distor_cx = 192
.TP
diff -Nrbu xawtv-3.95/man/xawtv-remote.1 xawtv-3.95-OK/man/xawtv-remote.1
--- xawtv-3.95/man/xawtv-remote.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/xawtv-remote.1 2008-08-26 18:51:25.000000000 +0400
@@ -136,14 +136,14 @@
.TP
.B vtx line1 line2 [ ... ]
Display subtitles. It pops up a small window at the bottom of the screen.
-It is supported to be used as interface for displaying subtitles (often on
-videotext page 150 in europe, thats why the name) by external programs.
+It is intended to be used as an interface for displaying subtitles (often on
+videotext page 150 in Europe, that's why the name) by external programs.
.br
Every command line argument is one line, zero lines removes the window.
You can colorize the text with the control sequence "ESC foreground
background". foreground/background has the range 0-7 (ansi term colors).
Example: "\\03347 hello world " is blue on white. "\\033" must be a real
-escape character, the string does'nt work. With the bash you'll get it
+escape character, the string doesn't work. With the bash you'll get it
with ^V ESC. vtx does also understand the ANSI tty escape sequences for
color.
.TP
diff -Nrbu xawtv-3.95/man/xawtv.1 xawtv-3.95-OK/man/xawtv.1
--- xawtv-3.95/man/xawtv.1 2003-02-14 17:14:07.000000000 +0300
+++ xawtv-3.95-OK/man/xawtv.1 2008-08-26 18:51:25.000000000 +0400
@@ -70,7 +70,7 @@
.TP
\fB-remote\fP
X11 display is remote. This basically disables overlay mode, you
-might need this if xawtv failes to autodetect a remote X11 display.
+might need this if xawtv fails to autodetect a remote X11 display.
.br
Resource: xawtv.remote (bool).
.TP
@@ -155,7 +155,7 @@
more details and hints on how to setup Xvideo.
.SH GETTING STARTED
Just start xawtv. Then verify the settings in the options menu (right
-mouse button) and adjust the settings (TV norm, Video source, freqency
+mouse button) and adjust the settings (TV norm, Video source, frequency
table). With the cursor keys you can control the tuner and look for
TV Stations. Other useful hotkeys are listed below.
.P
@@ -190,7 +190,7 @@
Z Channel Hopper (\fIz\fPapping, tune in every
station a few seconds)
Ctrl+Z Fast Channel Hopping (grab the images for the
- Channel Bottons)
+ Channel Buttons)
up/down tune up/down one channel
left/right fine tuning
xawtv-3.95-no-dga.patch:
--- NEW FILE xawtv-3.95-no-dga.patch ---
diff -Nrbu xawtv-3.95/console/v4l-conf.c xawtv-3.95-OK/console/v4l-conf.c
--- xawtv-3.95/console/v4l-conf.c 2005-02-09 15:27:36.000000000 +0300
+++ xawtv-3.95-OK/console/v4l-conf.c 2008-08-26 19:35:18.000000000 +0400
@@ -221,6 +221,21 @@
}
}
+#ifdef HAVE_LIBXXF86DGA
+static int dga_error = 0;
+static int dga_error_base;
+static int (*orig_xfree_error_handler)(Display *, XErrorEvent *);
+
+static int dga_error_handler(Display *d, XErrorEvent *e)
+{
+ if (e->error_code == (dga_error_base + XF86DGANoDirectVideoMode)) {
+ dga_error = 1;
+ return 0;
+ }
+ return orig_xfree_error_handler(d, e);
+}
+#endif
+
static void
displayinfo_dga(Display *dpy, struct DISPLAYINFO *d)
{
@@ -228,7 +243,7 @@
int width,bar,foo,major,minor,flags=0;
void *base = NULL;
- if (!XF86DGAQueryExtension(dpy,&foo,&bar)) {
+ if (!XF86DGAQueryExtension(dpy,&foo,&dga_error_base)) {
fprintf(stderr,"WARNING: Your X-Server has no DGA support.\n");
return;
}
@@ -240,7 +255,14 @@
fprintf(stderr,"WARNING: No DGA support available for this display.\n");
return;
}
+ orig_xfree_error_handler = XSetErrorHandler(dga_error_handler);
XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,&width,&foo,&bar);
+ XSync(dpy, 0);
+ XSetErrorHandler(orig_xfree_error_handler);
+ if (dga_error) {
+ fprintf(stderr,"WARNING: No DGA direct video mode for this display.\n");
+ return;
+ }
d->bpl = width * d->bpp/8;
d->base = base;
#else
diff -Nrbu xawtv-3.95/libng/plugins/drv0-v4l2.c xawtv-3.95-OK/libng/plugins/drv0-v4l2.c
--- xawtv-3.95/libng/plugins/drv0-v4l2.c 2008-08-26 19:31:52.000000000 +0400
+++ xawtv-3.95-OK/libng/plugins/drv0-v4l2.c 2008-08-26 19:35:18.000000000 +0400
@@ -593,7 +593,7 @@
return -1;
/* double-check settings */
- if (NULL != base && h->ov_fb.base != base) {
+ if ((NULL != base && h->ov_fb.base != base) || h->ov_fb.base == NULL) {
fprintf(stderr,"v4l2: WARNING: framebuffer base address mismatch\n");
fprintf(stderr,"v4l2: me=%p v4l=%p\n",base,h->ov_fb.base);
h->ov_error = 1;
diff -Nrbu xawtv-3.95/x11/xt.c xawtv-3.95-OK/x11/xt.c
--- xawtv-3.95/x11/xt.c 2005-01-11 12:26:43.000000000 +0300
+++ xawtv-3.95-OK/x11/xt.c 2008-08-26 19:35:18.000000000 +0400
@@ -1247,18 +1247,21 @@
}
/*----------------------------------------------------------------------*/
+#ifdef HAVE_LIBXXF86DGA
+static int xfree_dga_error_base;
+#endif
void
xfree_dga_init(Display *dpy)
{
#ifdef HAVE_LIBXXF86DGA
- int flags,foo,bar,ma,mi;
+ int flags,foo,ma,mi;
if (!do_overlay)
return;
if (args.dga) {
- if (XF86DGAQueryExtension(dpy,&foo,&bar)) {
+ if (XF86DGAQueryExtension(dpy,&foo,&xfree_dga_error_base)) {
XF86DGAQueryDirectVideo(dpy,XDefaultScreen(dpy),&flags);
if (flags & XF86DGADirectPresent) {
XF86DGAQueryVersion(dpy,&ma,&mi);
@@ -1348,6 +1351,19 @@
#endif
}
+#ifdef HAVE_LIBXXF86DGA
+static int (*orig_xfree_error_handler)(Display *, XErrorEvent *);
+
+static int xfree_dga_error_handler(Display *d, XErrorEvent *e)
+{
+ if (e->error_code == (xfree_dga_error_base + XF86DGANoDirectVideoMode)) {
+ have_dga = 0;
+ return 0;
+ }
+ return orig_xfree_error_handler(d, e);
+}
+#endif
+
void
grabber_init()
{
@@ -1358,8 +1374,11 @@
#ifdef HAVE_LIBXXF86DGA
if (have_dga) {
int bar,fred;
+ orig_xfree_error_handler = XSetErrorHandler(xfree_dga_error_handler);
XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,
&screen.bytesperline,&bar,&fred);
+ XSync(dpy, 0);
+ XSetErrorHandler(orig_xfree_error_handler);
}
#endif
if (!do_overlay) {
xawtv-3.95-oss.patch:
--- NEW FILE xawtv-3.95-oss.patch ---
# A patch to avoid streamer exit when a read from oss sound returns EAGAIN
#
# Derived from the Debian's patch:
# 08_oss_audio.dpatch
# (which was written by Kristof Koehler <kristof.koehler at filmakademie.de>
#
diff -Nrbu xawtv-3.95/libng/plugins/snd-oss.c xawtv-3.95-OK/libng/plugins/snd-oss.c
--- xawtv-3.95/libng/plugins/snd-oss.c 2003-02-14 17:14:05.000000000 +0300
+++ xawtv-3.95-OK/libng/plugins/snd-oss.c 2008-08-26 18:57:44.000000000 +0400
@@ -441,7 +441,7 @@
for (;;) {
rc = read(fd,buffer+count,blocksize-count);
if (rc < 0) {
- if (EINTR == errno)
+ if ((EINTR == errno) || (EAGAIN == errno))
continue;
perror("oss: read");
exit(1);
xawtv-3.95-scantv.patch:
--- NEW FILE xawtv-3.95-scantv.patch ---
# Allow scantv(1) to use different (not Television only) card input.
#
# Derived from the Debian patch:
# 14_scantv_input_override.dpatch
# (which was written by Adrian Phillips <adrianp at broadpark.no>
# plus add required changes in the manual
#
diff -Nrbu xawtv-3.95/console/scantv.c xawtv-3.95-OK/console/scantv.c
--- xawtv-3.95/console/scantv.c 2005-09-30 14:07:02.000000000 +0400
+++ xawtv-3.95-OK/console/scantv.c 2008-08-26 19:03:30.000000000 +0400
@@ -116,6 +116,7 @@
"options:\n"
" -h print this text\n"
" -o outfile set output file. [%s]\n"
+ " -i input set input.\n"
" -n norm set tv norm.\n"
" -f table set frequency table.\n"
" -c device set video device file. [%s]\n"
@@ -137,6 +138,7 @@
unsigned int f,f1,f2,fc;
char *name,dummy[32];
char *tvnorm = NULL;
+ char *tvinput = NULL;
char *freqtab = NULL;
char *outfile = NULL;
FILE *conf = stdout;
@@ -144,7 +146,7 @@
/* parse options */
ng_init();
for (;;) {
- if (-1 == (c = getopt(argc, argv, "hsadn:f:o:c:C:")))
+ if (-1 == (c = getopt(argc, argv, "hsadi:n:f:o:c:C:")))
break;
switch (c) {
case 'd':
@@ -156,6 +158,9 @@
case 'a':
fullscan=1;
break;
+ case 'i':
+ tvinput = optarg;
+ break;
case 'n':
tvnorm = optarg;
break;
@@ -203,12 +208,15 @@
attr = ng_attr_byid(attrs,ATTR_ID_NORM);
i = menu("please select your TV norm",attr->choices,tvnorm);
j = menu("please select a frequency table",chanlist_names,freqtab);
+ if (tvinput == NULL) {
+ tvinput = "Television";
+ }
fprintf(conf,"[global]\n");
fprintf(conf,"freqtab = %s\n",chanlist_names[j].str);
fprintf(conf,"\n");
fprintf(conf,"[defaults]\n");
- fprintf(conf,"input = Television\n");
+ fprintf(conf,"input = %s\n", tvinput);
fprintf(conf,"norm = %s\n",ng_attr_getstr(attr,i));
fprintf(conf,"\n");
fflush(conf);
@@ -220,7 +228,7 @@
exit(0);
}
set_defaults();
- do_va_cmd(2,"setinput","television");
+ do_va_cmd(2,"setinput",tvinput);
do_va_cmd(2,"setnorm",ng_attr_getstr(attr,i));
do_va_cmd(2,"setfreqtab",chanlist_names[j].str);
diff -Nrbu xawtv-3.95/man/scantv.1 xawtv-3.95-OK/man/scantv.1
--- xawtv-3.95/man/scantv.1 2008-08-26 19:01:50.000000000 +0400
+++ xawtv-3.95-OK/man/scantv.1 2008-08-26 19:12:58.000000000 +0400
@@ -9,6 +9,11 @@
xawtv/fbtv config file.
.SH OPTIONS
.TP
+.B -i input
+set tv \fBi\fPnput (Television/Composite1/S-video and so on).
+Default is Television. (Currently it is a distro-specific option
+added by Fedora and Debian).
+.TP
.B -n norm
set tv \fBn\fPorm. scantv will ask interactively if
none is given.
xawtv-3.95-v4l2-old-drop.patch:
--- NEW FILE xawtv-3.95-v4l2-old-drop.patch ---
diff -Nrbu xawtv-3.95/libng/plugins/Subdir.mk xawtv-3.95-OK/libng/plugins/Subdir.mk
--- xawtv-3.95/libng/plugins/Subdir.mk 2008-08-26 19:55:00.000000000 +0400
+++ xawtv-3.95-OK/libng/plugins/Subdir.mk 2008-08-26 19:58:40.000000000 +0400
@@ -21,7 +21,6 @@
ifeq ($(FOUND_OS),linux)
TARGETS-plugins += \
libng/plugins/drv0-v4l2.so \
- libng/plugins/drv0-v4l2-old.so \
libng/plugins/drv1-v4l.so \
libng/plugins/snd-oss.so
endif
@@ -55,7 +54,6 @@
libng/plugins/conv-mjpeg.so: libng/plugins/conv-mjpeg.o
libng/plugins/drv0-bsd.so: libng/plugins/drv0-bsd.o
-libng/plugins/drv0-v4l2-old.so: libng/plugins/drv0-v4l2-old.o
libng/plugins/flt-debug.so: libng/plugins/flt-debug.o
libng/plugins/flt-disor.so: libng/plugins/flt-disor.o
libng/plugins/flt-gamma.so: libng/plugins/flt-gamma.o
Index: xawtv.spec
===================================================================
RCS file: /cvs/extras/rpms/xawtv/devel/xawtv.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- xawtv.spec 21 Jul 2008 16:05:16 -0000 1.14
+++ xawtv.spec 26 Aug 2008 16:41:14 -0000 1.15
@@ -1,7 +1,9 @@
+%define libv4l 0%{!?_without_libv4l:1}
+
Summary: TV applications for video4linux compliant devices
Name: xawtv
Version: 3.95
-Release: 9%{?dist}
+Release: 10%{?dist}
Group: Applications/Multimedia
License: GPLv2+
URL: http://bytesex.org/xawtv/
@@ -16,6 +18,17 @@
Patch4: xawtv-3.95-region.patch
Patch5: xawtv-3.95-pagesize.patch
Patch6: xawtv-3.95-open.patch
+Patch7: xawtv-3.95-man.patch
+Patch8: xawtv-3.95-oss.patch
+Patch9: xawtv-3.95-scantv.patch
+Patch10: xawtv-3.95-fixes.patch
+Patch11: xawtv-3.95-no-dga.patch
+Patch12: xawtv-3.95-bpl.patch
+Patch13: xawtv-3.95-v4l2-old-drop.patch
+
+# add libv4l2 layer...
+Patch100: xawtv-3.95-libv4l2.patch
+
BuildRequires: mesa-libGL-devel, libXaw-devel, libXext-devel
BuildRequires: libFS-devel, libXft-devel, libXinerama-devel
@@ -27,6 +40,7 @@
BuildRequires: zvbi-devel, aalib-devel
BuildRequires: gpm-devel, slang-devel
BuildRequires: autoconf, desktop-file-utils
+%{!?_without_libv4l:BuildRequires: libv4l-devel}
Requires: usermode
@@ -49,6 +63,14 @@
%patch4 -p1 -b .region
%patch5 -p1 -b .pagesize
%patch6 -p1 -b .open
+%patch7 -p1 -b .man
+%patch8 -p1 -b .oss
+%patch9 -p1 -b .scantv
+%patch10 -p1 -b .fixes
+%patch11 -p1 -b .no-dga
+%patch12 -p1 -b .bpl
+%patch13 -p1 -b .v4l2-old-drop
+%{!?_without_libv4l:%patch100 -p1 -b .libv4l}
sed -i -e 's,/usr/X11R6/lib/X11,%{_datadir}/X11,g' configure.ac
sed -i -e 's,/usr/X11R6/include/X11,%{_includedir}/X11,g' Makefile.in
@@ -64,7 +86,6 @@
%configure --x-libraries=%{_libdir} --disable-motif --disable-quicktime
make
-sed -i -e 's/^d.fault /default /' man/webcam.1
for man in `find man -name "*.[1-9]" -print`
do
iconv -f ISO8859-1 -t UTF-8 <$man >$man.new && mv -f $man.new $man
@@ -136,10 +157,21 @@
%{_mandir}/man?/*
%lang(es) %{_mandir}/es/*/*
%lang(fr) %{_mandir}/fr/*/*
-%doc COPYING README TODO Changes contrib/frequencies*
+%doc COPYING README TODO contrib/frequencies*
%changelog
+* Tue Aug 26 2008 Dmitry Butskoy <Dmitry at Butskoy.name> - 3.95-10
+- fix some typos in manuals (patch7, derived from Debian)
+- fix recording from oss (patch8, derived from Debian)
+- allow scantv to use another card's input (patch9, derived from Debian)
+- some v4l2 code fixes (patch10, Hans de Goede <j.w.r.degoede at hhs.nl>)
+- skip dga automatically when not available (patch11, Hans de Goede)
+- specifying of bpl pitch for v4l-conf (patch12, Hans de Goede)
+- drop drv0-v4l2-old.so driver (assume not needed anyway now)
+- optional (default yes) build with libv4l wrapper library
+ (patch100, Hans de Goede <j.w.r.degoede at hhs.nl>)
+
* Mon Jul 21 2008 Dmitry Butskoy <Dmitry at Butskoy.name> - 3.95-9
- rebuild for new gpm
- update strip patch
@@ -149,7 +181,7 @@
- rebuild for GCC 4.3
* Thu Aug 30 2007 Dmitry Butskoy <Dmitry at Butskoy.name> - 3.95-7
-- add patch for "open(2) call now is a macro" issue (#265081). FTW :|
+- add patch for "open(2) call now is a macro" issue (#265081).
* Tue Aug 28 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 3.95-6
- Rebuild for selinux ppc32 issue.
More information about the fedora-extras-commits
mailing list