aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:39 (GMT)
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:39 (GMT)
commit4717c404e22922a13f54e431fbf683309870513f (patch)
tree2701ab85d1bdb0ab7c6315a38657189b80f7ded2
parent923e3c2dfcfef0d6a31239aceb7654ed3a49a7c4 (diff)
v3.78
-rw-r--r--Changes8
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac2
-rw-r--r--console/v4l-conf.c10
-rw-r--r--debian/changelog8
-rw-r--r--debian/control13
-rw-r--r--debian/copyright2
-rw-r--r--debian/pia.files2
-rw-r--r--libng/plugins/drv0-v4l2-old.c2
-rw-r--r--libng/plugins/drv0-v4l2.c44
-rw-r--r--libng/plugins/drv1-v4l.c10
-rw-r--r--libng/plugins/read-dv.c5
-rw-r--r--libng/plugins/write-dv.c2
-rw-r--r--libng/videodev.h347
-rw-r--r--libng/videodev2.h60
-rw-r--r--x11/blit.c14
-rw-r--r--xawtv.spec142
-rw-r--r--xawtv.spec.in140
18 files changed, 472 insertions, 343 deletions
diff --git a/Changes b/Changes
index cf2e0f7..5ff8520 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,11 @@
+3.77 => 3.78
+============
+
+ * build fixes.
+ * new v4l2 module fixes.
+
+
3.76 => 3.77
============
@@ -15,6 +22,7 @@
being able to encode dv streams in real time. Even playback drops
more than 50% of the frames.
* added alsa mixer plugin (Malte Starostik <malte.starostik@t-online.de>).
+ * added plugin for new v4l2 api
3.75 => 3.76
diff --git a/configure b/configure
index 2b64142..df179a6 100755
--- a/configure
+++ b/configure
@@ -5076,7 +5076,7 @@ if test "${ac_cv_lib_dv_dv_decoder_new+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldv $LIBS"
+LIBS="-ldv -lm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
@@ -5130,7 +5130,7 @@ if test $ac_cv_lib_dv_dv_decoder_new = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_DV 1
_ACEOF
- FOUND_DV="yes"; LIBDV="-ldv"
+ FOUND_DV="yes"; LIBDV="-ldv -lm"
fi
else
diff --git a/configure.ac b/configure.ac
index d3f8f05..5c5d73f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,7 +195,7 @@ AC_SUBST(LIBDV)
LIBDV=""
if test "$enable_dv" != "no"; then
AC_CHECK_LIB(dv, dv_decoder_new,
- AC_DEFINE(HAVE_DV,1,"have dv") FOUND_DV="yes"; LIBDV="-ldv",,)
+ AC_DEFINE(HAVE_DV,1,"have dv") FOUND_DV="yes"; LIBDV="-ldv -lm",,-lm)
else
echo "*** DV disabled"
fi
diff --git a/console/v4l-conf.c b/console/v4l-conf.c
index 2801da2..c99abf8 100644
--- a/console/v4l-conf.c
+++ b/console/v4l-conf.c
@@ -16,12 +16,12 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <time.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <linux/vt.h>
#include <linux/fb.h>
-#include <linux/videodev.h>
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
@@ -34,10 +34,8 @@
# endif
#endif
-#ifndef VIDIOC_QUERYCAP
-/* v4l2 not in kernel's videodev.h */
-# include "videodev2.h"
-#endif
+#include "videodev.h"
+#include "videodev2.h"
struct DISPLAYINFO {
int width; /* visible display width (pixels) */
@@ -340,7 +338,7 @@ displayinfo_v4l2(int fd, struct DISPLAYINFO *d)
/* set values */
fb.fmt.width = d->width;
fb.fmt.height = d->height;
- switch (d->bpp) {
+ switch (d->depth) {
case 8: fb.fmt.pixelformat = V4L2_PIX_FMT_HI240; break;
#if BYTE_ORDER == BIG_ENDIAN
case 15: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB555X; break;
diff --git a/debian/changelog b/debian/changelog
index 3495d8c..c5d7455 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-xawtv (3.75) unstable; urgency=low
+xawtv (3.78) unstable; urgency=low
- * new release (closes: #135393).
+ * new release (closes: #132366,#135393,#138792,#144699,#159689).
+ * fixed copyright file (closes: #143371).
+ * fixed control file (closes: #153046).
- -- Gerd Knorr <kraxel@debian.org> Mon, 25 Feb 2002 13:37:49 +0100
+ -- Gerd Knorr <kraxel@debian.org> Wed, 30 Oct 2002 13:04:45 +0100
xawtv (3.72) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 74ace4e..18b6086 100644
--- a/debian/control
+++ b/debian/control
@@ -8,13 +8,18 @@ Standards-Version: 3.5.2
Package: xawtv
Section: x11
Architecture: any
-Depends: ${shlibs:Depends}, v4l-conf, xutils, debconf, scantv, xawtv-plugins (=${Source-Version}), tv-fonts
+Depends: ${shlibs:Depends}, v4l-conf, xutils, debconf, scantv, xawtv-plugins (=${Source-Version}), tv-fonts, pia
Description: X11 TV application
TV application for X11. Supports video4linux
devices and the Xvideo extension.
- .
- For Xvideo support xawtv must be compiled with
- the XFree86 4.0+ client libraries installed.
+
+Package: pia
+Section: x11
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: movie player
+ This is a simple movie player. It is used by xawtv and motv to
+ playback movie files which are recorded from TV.
Package: fbtv
Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 9124f1c..a30caea 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,7 +1,7 @@
This is xawtv, written and maintained by Gerd Knorr <kraxel@debian.org>
The original source can always be found at:
- ftp://ftp.debian.org/dists/unstable/main/source/
+ http://bytesex.org/xawtv/
Copyright (C) 1997-2000 Gerd Knorr
diff --git a/debian/pia.files b/debian/pia.files
new file mode 100644
index 0000000..3bb42ac
--- /dev/null
+++ b/debian/pia.files
@@ -0,0 +1,2 @@
+usr/bin/pia
+usr/share/man/man1/pia.1
diff --git a/libng/plugins/drv0-v4l2-old.c b/libng/plugins/drv0-v4l2-old.c
index 3129a42..f7ccdcb 100644
--- a/libng/plugins/drv0-v4l2-old.c
+++ b/libng/plugins/drv0-v4l2-old.c
@@ -103,7 +103,7 @@ struct v4l2_handle {
/* ---------------------------------------------------------------------- */
struct ng_vid_driver v4l2_driver = {
- name: "v4l2",
+ name: "v4l2-old",
open: v4l2_open,
close: v4l2_close,
diff --git a/libng/plugins/drv0-v4l2.c b/libng/plugins/drv0-v4l2.c
index cd2bab3..a51866e 100644
--- a/libng/plugins/drv0-v4l2.c
+++ b/libng/plugins/drv0-v4l2.c
@@ -103,7 +103,7 @@ struct v4l2_handle {
/* ---------------------------------------------------------------------- */
struct ng_vid_driver v4l2_driver = {
- name: "v4l2-new",
+ name: "v4l2",
open: v4l2_open,
close: v4l2_close,
@@ -190,7 +190,6 @@ static const char *io_names[] = {
[VIDIOC_G_OUTPUT & 0xff] = "G_OUTPUT",
[VIDIOC_S_OUTPUT & 0xff] = "S_OUTPUT",
[VIDIOC_ENUMOUTPUT & 0xff] = "ENUMOUTPUT",
- [VIDIOC_ENUMOUTPUT & 0xff] = "ENUMOUTPUT",
[VIDIOC_G_AUDOUT & 0xff] = "G_AUDOUT",
[VIDIOC_S_AUDOUT & 0xff] = "S_AUDOUT",
[VIDIOC_G_MODULATOR & 0xff] = "G_MODULATOR",
@@ -217,12 +216,13 @@ xioctl(int fd, int cmd, void *arg, int mayfail)
case VIDIOC_QUERYCAP:
{
struct v4l2_capability *a = arg;
- fprintf(stderr,PREFIX "VIDIOC_QUERYCAP(%s,ver=%d.%d.%d,"
- "cap=0x%x,flags=0x%x)", a->name,
+ fprintf(stderr,PREFIX "VIDIOC_QUERYCAP(%s,%s,%s,ver=%d.%d.%d,"
+ "cap=0x%x)",
+ a->driver,a->card,a->bus_info,
(a->version >> 16) & 0xff,
(a->version >> 8) & 0xff,
a->version & 0xff,
- a->capabilities, a->flags);
+ a->capabilities);
break;
}
@@ -722,7 +722,13 @@ v4l2_open(char *device)
fprintf(stderr, "v4l2: open\n");
fcntl(h->fd,F_SETFD,FD_CLOEXEC);
if (ng_debug)
- fprintf(stderr,"v4l2: device is %s\n",h->cap.name);
+ fprintf(stderr,"v4l2: device info:\n"
+ " %s %d.%d.%d / %s @ %s\n",
+ h->cap.driver,
+ (h->cap.version >> 16) & 0xff,
+ (h->cap.version >> 8) & 0xff,
+ h->cap.version & 0xff,
+ h->cap.card,h->cap.bus_info);
get_device_capabilities(h);
if (ng_debug)
@@ -772,7 +778,7 @@ static char*
v4l2_devname(void *handle)
{
struct v4l2_handle *h = handle;
- return h->cap.name;
+ return h->cap.card;
}
static int v4l2_flags(void *handle)
@@ -916,18 +922,19 @@ v4l2_overlay(void *handle, struct ng_video_fmt *fmt, int x, int y,
if (ng_debug)
fprintf(stderr,"v4l2: overlay win=%dx%d+%d+%d, %d clips\n",
fmt->width,fmt->height,x,y,count);
+ memset(&win,0,sizeof(win));
win.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
- win.fmt.win.w.left = x;
- win.fmt.win.w.top = y;
- win.fmt.win.w.width = fmt->width;
- win.fmt.win.w.height = fmt->height;
+ win.fmt.win.w.left = x;
+ win.fmt.win.w.top = y;
+ win.fmt.win.w.width = fmt->width;
+ win.fmt.win.w.height = fmt->height;
/* check against max. size */
xioctl(h->fd,VIDIOC_TRY_FMT,&win,0);
if (win.fmt.win.w.width != fmt->width)
- win.fmt.win.w.left = x + (fmt->width - win.fmt.win.w.width);
+ win.fmt.win.w.left = x + (fmt->width - win.fmt.win.w.width)/2;
if (win.fmt.win.w.height != fmt->height)
- win.fmt.win.w.top = y + (fmt->height - win.fmt.win.w.height);
+ win.fmt.win.w.top = y + (fmt->height - win.fmt.win.w.height)/2;
if (aspect)
ng_ratio_fixup(&win.fmt.win.w.width,&win.fmt.win.w.height,
&win.fmt.win.w.left,&win.fmt.win.w.top);
@@ -1038,13 +1045,15 @@ v4l2_start_streaming(struct v4l2_handle *h, int buffers)
int i;
/* setup buffers */
- h->reqbufs.count = buffers;
- h->reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ h->reqbufs.count = buffers;
+ h->reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ h->reqbufs.memory = V4L2_MEMORY_MMAP;
if (-1 == xioctl(h->fd, VIDIOC_REQBUFS, &h->reqbufs, 0))
return -1;
for (i = 0; i < h->reqbufs.count; i++) {
- h->buf_v4l2[i].index = i;
- h->buf_v4l2[i].type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ h->buf_v4l2[i].index = i;
+ h->buf_v4l2[i].type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ h->buf_v4l2[i].memory = V4L2_MEMORY_MMAP;
if (-1 == xioctl(h->fd, VIDIOC_QUERYBUF, &h->buf_v4l2[i], 0))
return -1;
h->buf_me[i].fmt = h->fmt_me;
@@ -1127,6 +1136,7 @@ v4l2_setformat(void *handle, struct ng_video_fmt *fmt)
h->fmt_v4l2.fmt.pix.width = fmt->width;
h->fmt_v4l2.fmt.pix.height = fmt->height;
h->fmt_v4l2.fmt.pix.bytesperline = fmt->bytesperline;
+ h->fmt_v4l2.fmt.pix.field = V4L2_FIELD_ANY;
if (-1 == xioctl(h->fd, VIDIOC_S_FMT, &h->fmt_v4l2, EINVAL))
return -1;
diff --git a/libng/plugins/drv1-v4l.c b/libng/plugins/drv1-v4l.c
index d025466..70b042e 100644
--- a/libng/plugins/drv1-v4l.c
+++ b/libng/plugins/drv1-v4l.c
@@ -20,7 +20,8 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/mman.h>
-#include <linux/videodev.h>
+
+#include "videodev.h"
#include "grab-ng.h"
@@ -409,7 +410,7 @@ v4l_open(char *device)
memset(inputs,0,sizeof(struct STRTAB)*(h->capability.channels+1));
for (i = 0; i < h->capability.channels; i++) {
h->channels[i].channel = i;
- xioctl(h->fd,VIDIOCGCHAN,&h->channels[i]);
+ xioctl(h->fd,VIDIOCGCHAN,&(h->channels[i]));
inputs[i].nr = i;
inputs[i].str = h->channels[i].name;
if (ng_debug)
@@ -469,7 +470,7 @@ v4l_open(char *device)
if (ng_debug)
fprintf(stderr,"\n");
} else {
- /* no tuner tuner */
+ /* no tuner */
struct video_channel vchan;
memcpy(&vchan, &h->channels[0], sizeof(struct video_channel));
for (i = 0; norms[i].str != NULL; i++) {
@@ -479,6 +480,9 @@ v4l_open(char *device)
else if (ng_debug)
fprintf(stderr," %s",norms[i].str);
}
+ /* restore settings after probe */
+ memcpy(&vchan, &h->channels[0], sizeof(struct video_channel));
+ xioctl(h->fd,VIDIOCSCHAN,&vchan);
if (ng_debug)
fprintf(stderr,"\n");
}
diff --git a/libng/plugins/read-dv.c b/libng/plugins/read-dv.c
index ff5fd87..9d6e1a1 100644
--- a/libng/plugins/read-dv.c
+++ b/libng/plugins/read-dv.c
@@ -1,3 +1,6 @@
+/* gcc 2.95.x doesn't compile some c99 constructs ... */
+#if __GNUC__ >= 3
+
#include "config.h"
#include <stdlib.h>
@@ -323,3 +326,5 @@ void ng_plugin_init(void)
{
ng_reader_register(NG_PLUGIN_MAGIC,__FILE__,&dv_reader);
}
+
+#endif /* gcc3 */
diff --git a/libng/plugins/write-dv.c b/libng/plugins/write-dv.c
index b7936f0..fe17e1e 100644
--- a/libng/plugins/write-dv.c
+++ b/libng/plugins/write-dv.c
@@ -19,7 +19,7 @@ struct dv_frame {
struct list_head list;
int seq;
int video,audio;
- unsigned char obuf[];
+ unsigned char obuf[0];
};
struct dv_handle {
diff --git a/libng/videodev.h b/libng/videodev.h
new file mode 100644
index 0000000..0176509
--- /dev/null
+++ b/libng/videodev.h
@@ -0,0 +1,347 @@
+#ifndef __LINUX_VIDEODEV_H
+#define __LINUX_VIDEODEV_H
+
+#include <linux/types.h>
+
+#define VID_TYPE_CAPTURE 1 /* Can capture */
+#define VID_TYPE_TUNER 2 /* Can tune */
+#define VID_TYPE_TELETEXT 4 /* Does teletext */
+#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
+#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
+#define VID_TYPE_CLIPPING 32 /* Can clip */
+#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
+#define VID_TYPE_SCALES 128 /* Scalable */
+#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
+#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
+#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
+#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
+#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
+#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
+
+struct video_capability
+{
+ char name[32];
+ int type;
+ int channels; /* Num channels */
+ int audios; /* Num audio devices */
+ int maxwidth; /* Supported width */
+ int maxheight; /* And height */
+ int minwidth; /* Supported width */
+ int minheight; /* And height */
+};
+
+
+struct video_channel
+{
+ int channel;
+ char name[32];
+ int tuners;
+ __u32 flags;
+#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
+#define VIDEO_VC_AUDIO 2 /* Channel has audio */
+ __u16 type;
+#define VIDEO_TYPE_TV 1
+#define VIDEO_TYPE_CAMERA 2
+ __u16 norm; /* Norm set by channel */
+};
+
+struct video_tuner
+{
+ int tuner;
+ char name[32];
+ unsigned long rangelow, rangehigh; /* Tuner range */
+ __u32 flags;
+#define VIDEO_TUNER_PAL 1
+#define VIDEO_TUNER_NTSC 2
+#define VIDEO_TUNER_SECAM 4
+#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
+#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
+#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
+#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
+#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
+ __u16 mode; /* PAL/NTSC/SECAM/OTHER */
+#define VIDEO_MODE_PAL 0
+#define VIDEO_MODE_NTSC 1
+#define VIDEO_MODE_SECAM 2
+#define VIDEO_MODE_AUTO 3
+ __u16 signal; /* Signal strength 16bit scale */
+};
+
+struct video_picture
+{
+ __u16 brightness;
+ __u16 hue;
+ __u16 colour;
+ __u16 contrast;
+ __u16 whiteness; /* Black and white only */
+ __u16 depth; /* Capture depth */
+ __u16 palette; /* Palette in use */
+#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
+#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
+#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
+#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
+#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
+#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
+#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
+#define VIDEO_PALETTE_YUYV 8
+#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
+#define VIDEO_PALETTE_YUV420 10
+#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
+#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
+#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
+#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
+#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
+#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
+#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
+#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
+};
+
+struct video_audio
+{
+ int audio; /* Audio channel */
+ __u16 volume; /* If settable */
+ __u16 bass, treble;
+ __u32 flags;
+#define VIDEO_AUDIO_MUTE 1
+#define VIDEO_AUDIO_MUTABLE 2
+#define VIDEO_AUDIO_VOLUME 4
+#define VIDEO_AUDIO_BASS 8
+#define VIDEO_AUDIO_TREBLE 16
+#define VIDEO_AUDIO_BALANCE 32
+ char name[16];
+#define VIDEO_SOUND_MONO 1
+#define VIDEO_SOUND_STEREO 2
+#define VIDEO_SOUND_LANG1 4
+#define VIDEO_SOUND_LANG2 8
+ __u16 mode;
+ __u16 balance; /* Stereo balance */
+ __u16 step; /* Step actual volume uses */
+};
+
+struct video_clip
+{
+ __s32 x,y;
+ __s32 width, height;
+ struct video_clip *next; /* For user use/driver use only */
+};
+
+struct video_window
+{
+ __u32 x,y; /* Position of window */
+ __u32 width,height; /* Its size */
+ __u32 chromakey;
+ __u32 flags;
+ struct video_clip *clips; /* Set only */
+ int clipcount;
+#define VIDEO_WINDOW_INTERLACE 1
+#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
+#define VIDEO_CLIP_BITMAP -1
+/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
+#define VIDEO_CLIPMAP_SIZE (128 * 625)
+};
+
+struct video_capture
+{
+ __u32 x,y; /* Offsets into image */
+ __u32 width, height; /* Area to capture */
+ __u16 decimation; /* Decimation divider */
+ __u16 flags; /* Flags for capture */
+#define VIDEO_CAPTURE_ODD 0 /* Temporal */
+#define VIDEO_CAPTURE_EVEN 1
+};
+
+struct video_buffer
+{
+ void *base;
+ int height,width;
+ int depth;
+ int bytesperline;
+};
+
+struct video_mmap
+{
+ unsigned int frame; /* Frame (0 - n) for double buffer */
+ int height,width;
+ unsigned int format; /* should be VIDEO_PALETTE_* */
+};
+
+struct video_key
+{
+ __u8 key[8];
+ __u32 flags;
+};
+
+
+#define VIDEO_MAX_FRAME 32
+
+struct video_mbuf
+{
+ int size; /* Total memory to map */
+ int frames; /* Frames */
+ int offsets[VIDEO_MAX_FRAME];
+};
+
+
+#define VIDEO_NO_UNIT (-1)
+
+
+struct video_unit
+{
+ int video; /* Video minor */
+ int vbi; /* VBI minor */
+ int radio; /* Radio minor */
+ int audio; /* Audio minor */
+ int teletext; /* Teletext minor */
+};
+
+struct vbi_format {
+ __u32 sampling_rate; /* in Hz */
+ __u32 samples_per_line;
+ __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */
+ __s32 start[2]; /* starting line for each frame */
+ __u32 count[2]; /* count of lines for each frame */
+ __u32 flags;
+#define VBI_UNSYNC 1 /* can distingues between top/bottom field */
+#define VBI_INTERLACED 2 /* lines are interlaced */
+};
+
+/* video_info is biased towards hardware mpeg encode/decode */
+/* but it could apply generically to any hardware compressor/decompressor */
+struct video_info
+{
+ __u32 frame_count; /* frames output since decode/encode began */
+ __u32 h_size; /* current unscaled horizontal size */
+ __u32 v_size; /* current unscaled veritcal size */
+ __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
+ __u32 picture_type; /* current picture type */
+ __u32 temporal_reference; /* current temporal reference */
+ __u8 user_data[256]; /* user data last found in compressed stream */
+ /* user_data[0] contains user data flags, user_data[1] has count */
+};
+
+/* generic structure for setting playback modes */
+struct video_play_mode
+{
+ int mode;
+ int p1;
+ int p2;
+};
+
+/* for loading microcode / fpga programming */
+struct video_code
+{
+ char loadwhat[16]; /* name or tag of file being passed */
+ int datasize;
+ __u8 *data;
+};
+
+#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
+#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
+#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
+#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
+#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
+#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
+#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
+#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
+#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */
+#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
+#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
+#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
+#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
+#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
+#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
+#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
+#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
+#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
+#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
+#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
+#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */
+#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */
+#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */
+#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */
+#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */
+#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */
+#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */
+#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */
+#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */
+
+
+#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
+
+/* VIDIOCSWRITEMODE */
+#define VID_WRITE_MPEG_AUD 0
+#define VID_WRITE_MPEG_VID 1
+#define VID_WRITE_OSD 2
+#define VID_WRITE_TTX 3
+#define VID_WRITE_CC 4
+#define VID_WRITE_MJPEG 5
+
+/* VIDIOCSPLAYMODE */
+#define VID_PLAY_VID_OUT_MODE 0
+ /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
+#define VID_PLAY_GENLOCK 1
+ /* p1: 0 = OFF, 1 = ON */
+ /* p2: GENLOCK FINE DELAY value */
+#define VID_PLAY_NORMAL 2
+#define VID_PLAY_PAUSE 3
+#define VID_PLAY_SINGLE_FRAME 4
+#define VID_PLAY_FAST_FORWARD 5
+#define VID_PLAY_SLOW_MOTION 6
+#define VID_PLAY_IMMEDIATE_NORMAL 7
+#define VID_PLAY_SWITCH_CHANNELS 8
+#define VID_PLAY_FREEZE_FRAME 9
+#define VID_PLAY_STILL_MODE 10
+#define VID_PLAY_MASTER_MODE 11
+ /* p1: see below */
+#define VID_PLAY_MASTER_NONE 1
+#define VID_PLAY_MASTER_VIDEO 2
+#define VID_PLAY_MASTER_AUDIO 3
+#define VID_PLAY_ACTIVE_SCANLINES 12
+ /* p1 = first active; p2 = last active */
+#define VID_PLAY_RESET 13
+#define VID_PLAY_END_MARK 14
+
+
+
+#define VID_HARDWARE_BT848 1
+#define VID_HARDWARE_QCAM_BW 2
+#define VID_HARDWARE_PMS 3
+#define VID_HARDWARE_QCAM_C 4
+#define VID_HARDWARE_PSEUDO 5
+#define VID_HARDWARE_SAA5249 6
+#define VID_HARDWARE_AZTECH 7
+#define VID_HARDWARE_SF16MI 8
+#define VID_HARDWARE_RTRACK 9
+#define VID_HARDWARE_ZOLTRIX 10
+#define VID_HARDWARE_SAA7146 11
+#define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */
+#define VID_HARDWARE_RTRACK2 13
+#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */
+#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */
+#define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */
+#define VID_HARDWARE_BROADWAY 17 /* Broadway project */
+#define VID_HARDWARE_GEMTEK 18
+#define VID_HARDWARE_TYPHOON 19
+#define VID_HARDWARE_VINO 20 /* SGI Indy Vino */
+#define VID_HARDWARE_CADET 21 /* Cadet radio */
+#define VID_HARDWARE_TRUST 22 /* Trust FM Radio */
+#define VID_HARDWARE_TERRATEC 23 /* TerraTec ActiveRadio */
+#define VID_HARDWARE_CPIA 24
+#define VID_HARDWARE_ZR36120 25 /* Zoran ZR36120/ZR36125 */
+#define VID_HARDWARE_ZR36067 26 /* Zoran ZR36067/36060 */
+#define VID_HARDWARE_OV511 27
+#define VID_HARDWARE_ZR356700 28 /* Zoran 36700 series */
+#define VID_HARDWARE_W9966 29
+#define VID_HARDWARE_SE401 30 /* SE401 USB webcams */
+#define VID_HARDWARE_PWC 31 /* Philips webcams */
+#define VID_HARDWARE_MEYE 32 /* Sony Vaio MotionEye cameras */
+#define VID_HARDWARE_CPIA2 33
+#define VID_HARDWARE_VICAM 34
+
+#endif /* __LINUX_VIDEODEV_H */
+
+/*
+ * Local variables:
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/libng/videodev2.h b/libng/videodev2.h
index f85b5e7..134367e 100644
--- a/libng/videodev2.h
+++ b/libng/videodev2.h
@@ -113,8 +113,8 @@ enum v4l2_colorspace {
struct v4l2_rect {
__s32 left;
__s32 top;
- __u32 width;
- __u32 height;
+ __s32 width;
+ __s32 height;
};
struct v4l2_fract {
@@ -127,10 +127,11 @@ struct v4l2_fract {
*/
struct v4l2_capability
{
- __u8 name[32]; /* Descriptive, and unique */
- __u32 version; /* use KERNEL_VERSION() macro here */
+ __u8 driver[16]; /* i.e. "bttv" */
+ __u8 card[32]; /* i.e. "Hauppauge WinTV" */
+ __u8 bus_info[32]; /* "PCI:" + pci_dev->slot_name */
+ __u32 version; /* should use KERNEL_VERSION() */
__u32 capabilities; /* Device capabilities */
- __u32 flags; /* Feature flags, see below */
__u32 reserved[4];
};
@@ -197,7 +198,8 @@ struct v4l2_pix_format
/* compressed formats */
#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */
#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */
-#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* digital video */
+#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */
+#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */
/* Vendor-specific formats */
#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compres */
@@ -320,8 +322,8 @@ struct v4l2_buffer
/* memory location */
enum v4l2_memory memory;
union {
- off_t offset;
- void* userptr;
+ __u32 offset;
+ unsigned long userptr;
} m;
__u32 length;
@@ -633,8 +635,8 @@ struct v4l2_tuner
__u32 rangehigh;
__u32 rxsubchans;
__u32 audmode;
- __u32 signal;
- __u32 afc;
+ __s32 signal;
+ __s32 afc;
__u32 reserved[4];
};
@@ -691,18 +693,11 @@ struct v4l2_audio
__u32 reserved[2];
};
/* Flags for the 'capability' field */
-#define V4L2_AUDCAP_EFFECTS 0x0020
-#define V4L2_AUDCAP_LOUDNESS 0x0040
-#define V4L2_AUDCAP_AVL 0x0080
+#define V4L2_AUDCAP_STEREO 0x00001
+#define V4L2_AUDCAP_AVL 0x00002
/* Flags for the 'mode' field */
-#define V4L2_AUDMODE_LOUDNESS 0x00002
-#define V4L2_AUDMODE_AVL 0x00004
-#define V4L2_AUDMODE_STEREO_field 0x0FF00
-#define V4L2_AUDMODE_STEREO_LINEAR 0x00100
-#define V4L2_AUDMODE_STEREO_PSEUDO 0x00200
-#define V4L2_AUDMODE_STEREO_SPATIAL30 0x00300
-#define V4L2_AUDMODE_STEREO_SPATIAL50 0x00400
+#define V4L2_AUDMODE_AVL 0x00001
struct v4l2_audioout
{
@@ -827,31 +822,6 @@ struct v4l2_streamparm
#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */
-
-#ifdef __KERNEL__
-/*
- *
- * V 4 L 2 D R I V E R H E L P E R A P I
- *
- * Some commonly needed functions for drivers (v4l2-common.o module)
- */
-#include <linux/fs.h>
-
-/* Video standard functions */
-extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs);
-extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id);
-
-/* Compatibility layer interface */
-typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg);
-int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
- int cmd, void *arg, v4l2_kioctl driver_ioctl);
-
-/* names for fancy debug output */
-extern char *v4l2_field_names[];
-extern char *v4l2_type_names[];
-
-#endif /* __KERNEL__ */
#endif /* __LINUX_VIDEODEV2_H */
/*
diff --git a/x11/blit.c b/x11/blit.c
index f3f7855..601669e 100644
--- a/x11/blit.c
+++ b/x11/blit.c
@@ -275,6 +275,7 @@ x11_create_ximage(Display *dpy, XVisualInfo *vinfo,
no_mitshm = 1;
no_mitshm:
+ *shm = NULL;
if (NULL == (ximage_data = malloc(width * height * pixmap_bytes))) {
fprintf(stderr,"out of memory\n");
exit(1);
@@ -290,7 +291,7 @@ x11_create_ximage(Display *dpy, XVisualInfo *vinfo,
void
x11_destroy_ximage(Display *dpy, XImage *ximage, XShmSegmentInfo *shm)
{
- if (shm) {
+ if (shm && !no_mitshm) {
XShmDetach(dpy, shm);
XDestroyImage(ximage);
shmdt(shm->shmaddr);
@@ -303,9 +304,9 @@ void x11_blit(Display *dpy, Drawable dr, GC gc, XImage *xi,
int a, int b, int c, int d, int w, int h)
{
if (no_mitshm)
- XShmPutImage(dpy,dr,gc,xi,a,b,c,d,w,h,True);
- else
XPutImage(dpy,dr,gc,xi,a,b,c,d,w,h);
+ else
+ XShmPutImage(dpy,dr,gc,xi,a,b,c,d,w,h,True);
}
Pixmap
@@ -445,6 +446,7 @@ shm_error:
no_mitshm = 1;
no_mitshm:
+ *shm = NULL;
if (NULL == (ximage_data = malloc(width * height * 2))) {
fprintf(stderr,"out of memory\n");
exit(1);
@@ -457,7 +459,7 @@ shm_error:
void
xv_destroy_ximage(Display *dpy, XvImage * xvimage, XShmSegmentInfo *shm)
{
- if (shm) {
+ if (shm && !no_mitshm) {
XShmDetach(dpy, shm);
XFree(xvimage);
shmdt(shm->shmaddr);
@@ -470,9 +472,9 @@ void xv_blit(Display *dpy, Drawable dr, GC gc, XvImage *xi,
int a, int b, int c, int d, int x, int y, int w, int h)
{
if (no_mitshm)
- XvShmPutImage(dpy,im_port,dr,gc,xi,a,b,c,d,x,y,w,h,True);
- else
XvPutImage(dpy,im_port,dr,gc,xi,a,b,c,d,x,y,w,h);
+ else
+ XvShmPutImage(dpy,im_port,dr,gc,xi,a,b,c,d,x,y,w,h,True);
}
#endif
diff --git a/xawtv.spec b/xawtv.spec
index add467d..815aa6e 100644
--- a/xawtv.spec
+++ b/xawtv.spec
@@ -1,68 +1,15 @@
Name: xawtv
Group: Applications/Multimedia
-Requires: v4l-conf, tv-common
Autoreqprov: on
-Version: 3.77
+Version: 3.78
Release: 0
License: GPL
-Summary: Video4Linux TV application (Athena)
+Summary: v4l applications
Source: http://bytesex.org/xawtv/%{name}_%{version}.tar.gz
Buildroot: /var/tmp/root.%{name}-%{version}
%description
-xawtv is a X11 application for watching TV with your linux box. It
-supports video4linux devices (for example bttv cards, various USB
-webcams, ...). It uses the Athena widgets.
-
-%package -n motv
-Summary: Video4Linux TV application (Motif)
-Group: Applications/Multimedia
-Requires: v4l-conf, tv-common
-Provides: xawtv:/usr/X11R6/bin/motv
-
-%description -n motv
-motv is a X11 application for watching TV with your Linux box. It
-supports video4linux devices (for example bttv cards, various USB
-webcams, ...). It's based on xawtv's code, but uses Motif to provide a
-better GUI.
-
-%package -n tv-common
-Summary: tools and some README's for motv and xawtv
-Group: Applications/Multimedia
-
-%description -n tv-common
-This package includes some X11 fonts used by motv and xawtv, some
-utilities for them (xawtv-remote for example), and some README files.
-
-%package -n v4l-conf
-Summary: video4linux configuration tool
-Group: Applications/Multimedia
-Provides: xawtv:/usr/X11R6/bin/v4l-conf
-
-%description -n v4l-conf
-This is a small utility used to configure video4linux device drivers
-(bttv for example). xawtv, motv and fbtv need it.
-
-%package -n v4l-tools
-Summary: video4linux terminal / command line utilities.
-Group: Applications/Multimedia
-Requires: v4l-conf, tv-common
-Provides: xawtv:/usr/X11R6/bin/v4lctl
-
-%description -n v4l-tools
-This package includes a bunch of command line utilities: v4lctl to
-control video4linux devices; streamer to record movies; fbtv to
-watch TV on the framebuffer console; ttv to watch tv on any ttv (powered
-by aalib), webcam for capturing and uploading images, a curses radio
-application, ...
-
-%package -n alevtd
-Summary: http server for teletext pages
-Group: Networking/Daemons
-
-%description -n alevtd
-alevtd reads the teletext pages from /dev/vbi and allows to fetch them
-via http, i.e. you can read the teletext pages with a web browser.
+fixme
%prep
%setup -q
@@ -74,79 +21,20 @@ CFLAGS="$RPM_OPT_FLAGS" ../configure --prefix=/usr/X11R6
make
%install
+test "%{buildroot}" != "" && rm -rf "%{buildroot}"
(cd build; make DESTDIR="%{buildroot}" SUID_ROOT="" install)
-gzip -v %{buildroot}/usr/X11R6/man/man*/*
-find %{buildroot} -name Xawtv -print |\
- sed -e 's|%{buildroot}||' > appdefaults.xawtv
-find %{buildroot} -name MoTV -print |\
- sed -e 's|%{buildroot}||' > appdefaults.motv
-
-%files -f appdefaults.xawtv
-%defattr(-,root,root)
-%doc COPYING
-%doc Changes TODO README README.*
-%doc contrib/frequencies*
-/usr/X11R6/bin/xawtv
-/usr/X11R6/man/man1/xawtv.1.gz
-/usr/X11R6/bin/rootv
-/usr/X11R6/man/man1/rootv.1.gz
-
-%files -n motv -f appdefaults.motv
-%defattr(-,root,root)
-%doc COPYING
-%doc Changes TODO README README.*
-/usr/X11R6/bin/motv
-/usr/X11R6/man/man1/motv.1.gz
-
-%files -n tv-common
+gzip -v %{buildroot}/usr/X11R6/man/man*/*.[158]
+gzip -v %{buildroot}/usr/X11R6/man/*/man*/*.[158]
+find %{buildroot} -type f -print \
+ | sed -e 's|%{buildroot}||' \
+ | grep -v -e %{docdir} \
+ | grep -v -e bin/v4l-conf \
+ > filelist
+
+%files -f filelist
%defattr(-,root,root)
-%doc COPYING
-/usr/X11R6/bin/subtitles
-/usr/X11R6/man/man1/subtitles.1.gz
-/usr/X11R6/bin/xawtv-remote
-/usr/X11R6/man/man1/xawtv-remote.1.gz
-/usr/X11R6/bin/propwatch
-/usr/X11R6/man/man1/propwatch.1.gz
-/usr/X11R6/man/man5/xawtvrc.5.gz
-/usr/X11R6/lib/xawtv/*.so
-
-%files -n v4l-conf
-%defattr(-,root,root)
-%doc COPYING
+%doc COPYING Changes TODO README README.* contrib/frequencies*
%attr(4711,root,root) /usr/X11R6/bin/v4l-conf
-/usr/X11R6/man/man8/v4l-conf.8.gz
-
-%files -n v4l-tools
-%defattr(-,root,root)
-%doc COPYING
-/usr/X11R6/bin/radio
-/usr/X11R6/man/man1/radio.1.gz
-/usr/X11R6/bin/fbtv
-/usr/X11R6/man/man1/fbtv.1.gz
-/usr/X11R6/bin/ttv
-/usr/X11R6/man/man1/ttv.1.gz
-/usr/X11R6/bin/streamer
-/usr/X11R6/man/man1/streamer.1.gz
-/usr/X11R6/bin/v4lctl
-/usr/X11R6/man/man1/v4lctl.1.gz
-/usr/X11R6/bin/record
-/usr/X11R6/man/man1/record.1.gz
-/usr/X11R6/bin/dump-mixers
-/usr/X11R6/man/man1/dump-mixers.1.gz
-/usr/X11R6/bin/showriff
-/usr/X11R6/man/man1/showriff.1.gz
-/usr/X11R6/bin/scantv
-/usr/X11R6/man/man1/scantv.1.gz
-/usr/X11R6/bin/webcam
-/usr/X11R6/man/man1/webcam.1.gz
-
-%files -n alevtd
-%defattr(-,root,root)
-%doc COPYING
-/usr/X11R6/bin/alevtd
-/usr/X11R6/man/man1/alevtd.1.gz
%clean
-if test "%{buildroot}" != ""; then
- rm -rf "%{buildroot}"
-fi
+test "%{buildroot}" != "" && rm -rf "%{buildroot}"
diff --git a/xawtv.spec.in b/xawtv.spec.in
index 0155694..a4ffe85 100644
--- a/xawtv.spec.in
+++ b/xawtv.spec.in
@@ -1,68 +1,15 @@
Name: xawtv
Group: Applications/Multimedia
-Requires: v4l-conf, tv-common
Autoreqprov: on
Version: @VERSION@
Release: 0
License: GPL
-Summary: Video4Linux TV application (Athena)
+Summary: v4l applications
Source: http://bytesex.org/xawtv/%{name}_%{version}.tar.gz
Buildroot: /var/tmp/root.%{name}-%{version}
%description
-xawtv is a X11 application for watching TV with your linux box. It
-supports video4linux devices (for example bttv cards, various USB
-webcams, ...). It uses the Athena widgets.
-
-%package -n motv
-Summary: Video4Linux TV application (Motif)
-Group: Applications/Multimedia
-Requires: v4l-conf, tv-common
-Provides: xawtv:/usr/X11R6/bin/motv
-
-%description -n motv
-motv is a X11 application for watching TV with your Linux box. It
-supports video4linux devices (for example bttv cards, various USB
-webcams, ...). It's based on xawtv's code, but uses Motif to provide a
-better GUI.
-
-%package -n tv-common
-Summary: tools and some README's for motv and xawtv
-Group: Applications/Multimedia
-
-%description -n tv-common
-This package includes some X11 fonts used by motv and xawtv, some
-utilities for them (xawtv-remote for example), and some README files.
-
-%package -n v4l-conf
-Summary: video4linux configuration tool
-Group: Applications/Multimedia
-Provides: xawtv:/usr/X11R6/bin/v4l-conf
-
-%description -n v4l-conf
-This is a small utility used to configure video4linux device drivers
-(bttv for example). xawtv, motv and fbtv need it.
-
-%package -n v4l-tools
-Summary: video4linux terminal / command line utilities.
-Group: Applications/Multimedia
-Requires: v4l-conf, tv-common
-Provides: xawtv:/usr/X11R6/bin/v4lctl
-
-%description -n v4l-tools
-This package includes a bunch of command line utilities: v4lctl to
-control video4linux devices; streamer to record movies; fbtv to
-watch TV on the framebuffer console; ttv to watch tv on any ttv (powered
-by aalib), webcam for capturing and uploading images, a curses radio
-application, ...
-
-%package -n alevtd
-Summary: http server for teletext pages
-Group: Networking/Daemons
-
-%description -n alevtd
-alevtd reads the teletext pages from /dev/vbi and allows to fetch them
-via http, i.e. you can read the teletext pages with a web browser.
+fixme
%prep
%setup -q
@@ -74,79 +21,20 @@ CFLAGS="$RPM_OPT_FLAGS" ../configure --prefix=/usr/X11R6
make
%install
+test "%{buildroot}" != "" && rm -rf "%{buildroot}"
(cd build; make DESTDIR="%{buildroot}" SUID_ROOT="" install)
-gzip -v %{buildroot}/usr/X11R6/man/man*/*
-find %{buildroot} -name Xawtv -print |\
- sed -e 's|%{buildroot}||' > appdefaults.xawtv
-find %{buildroot} -name MoTV -print |\
- sed -e 's|%{buildroot}||' > appdefaults.motv
-
-%files -f appdefaults.xawtv
-%defattr(-,root,root)
-%doc COPYING
-%doc Changes TODO README README.*
-%doc contrib/frequencies*
-/usr/X11R6/bin/xawtv
-/usr/X11R6/man/man1/xawtv.1.gz
-/usr/X11R6/bin/rootv
-/usr/X11R6/man/man1/rootv.1.gz
-
-%files -n motv -f appdefaults.motv
-%defattr(-,root,root)
-%doc COPYING
-%doc Changes TODO README README.*
-/usr/X11R6/bin/motv
-/usr/X11R6/man/man1/motv.1.gz
-
-%files -n tv-common
+gzip -v %{buildroot}/usr/X11R6/man/man*/*.[158]
+gzip -v %{buildroot}/usr/X11R6/man/*/man*/*.[158]
+find %{buildroot} -type f -print \
+ | sed -e 's|%{buildroot}||' \
+ | grep -v -e %{docdir} \
+ | grep -v -e bin/v4l-conf \
+ > filelist
+
+%files -f filelist
%defattr(-,root,root)
-%doc COPYING
-/usr/X11R6/bin/subtitles
-/usr/X11R6/man/man1/subtitles.1.gz
-/usr/X11R6/bin/xawtv-remote
-/usr/X11R6/man/man1/xawtv-remote.1.gz
-/usr/X11R6/bin/propwatch
-/usr/X11R6/man/man1/propwatch.1.gz
-/usr/X11R6/man/man5/xawtvrc.5.gz
-/usr/X11R6/lib/xawtv/*.so
-
-%files -n v4l-conf
-%defattr(-,root,root)
-%doc COPYING
+%doc COPYING Changes TODO README README.* contrib/frequencies*
%attr(4711,root,root) /usr/X11R6/bin/v4l-conf
-/usr/X11R6/man/man8/v4l-conf.8.gz
-
-%files -n v4l-tools
-%defattr(-,root,root)
-%doc COPYING
-/usr/X11R6/bin/radio
-/usr/X11R6/man/man1/radio.1.gz
-/usr/X11R6/bin/fbtv
-/usr/X11R6/man/man1/fbtv.1.gz
-/usr/X11R6/bin/ttv
-/usr/X11R6/man/man1/ttv.1.gz
-/usr/X11R6/bin/streamer
-/usr/X11R6/man/man1/streamer.1.gz
-/usr/X11R6/bin/v4lctl
-/usr/X11R6/man/man1/v4lctl.1.gz
-/usr/X11R6/bin/record
-/usr/X11R6/man/man1/record.1.gz
-/usr/X11R6/bin/dump-mixers
-/usr/X11R6/man/man1/dump-mixers.1.gz
-/usr/X11R6/bin/showriff
-/usr/X11R6/man/man1/showriff.1.gz
-/usr/X11R6/bin/scantv
-/usr/X11R6/man/man1/scantv.1.gz
-/usr/X11R6/bin/webcam
-/usr/X11R6/man/man1/webcam.1.gz
-
-%files -n alevtd
-%defattr(-,root,root)
-%doc COPYING
-/usr/X11R6/bin/alevtd
-/usr/X11R6/man/man1/alevtd.1.gz
%clean
-if test "%{buildroot}" != ""; then
- rm -rf "%{buildroot}"
-fi
+test "%{buildroot}" != "" && rm -rf "%{buildroot}"

Privacy Policy