aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:38 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:38 +0200
commit54705a2f70386897bf3d186cdc4b7c47b3082444 (patch)
tree7815adeec6eb6647217cc802f92e458875b7a419
parentfdd6d37352122375fe9521724cbdd397225812c9 (diff)
v3.68
-rw-r--r--Changes15
-rw-r--r--Make.config.in2
-rw-r--r--Makefile2
-rw-r--r--Makefile.clean2
-rw-r--r--Makefile.in5
-rw-r--r--README.recording16
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure2
-rw-r--r--configure.in2
-rw-r--r--debian/changelog6
-rw-r--r--http/devices.c2
-rw-r--r--libng/devices.c2
-rw-r--r--libng/grab-ng.c9
-rw-r--r--libng/plugins/drv0-v4l2.c25
-rw-r--r--libng/plugins/drv1-v4l.c15
-rw-r--r--src/MoTV-de6
-rw-r--r--src/MoTV.de.ad6
-rw-r--r--src/commands.c8
-rw-r--r--src/main.c5
-rw-r--r--src/motif.c11
-rw-r--r--src/xt.c38
-rw-r--r--tools/Makefile.in4
-rw-r--r--tools/record.c262
-rw-r--r--tools/record.man21
-rw-r--r--xawtv.spec233
-rw-r--r--xawtv.spec.in233
26 files changed, 598 insertions, 337 deletions
diff --git a/Changes b/Changes
index 4cab447..cafb1c2 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,17 @@
+3.67 => 3.68
+============
+
+ * more build/install fixes.
+ * various new switches for the record tool.
+ * fixed channel switching bug, the long delay is gone now ...
+ * xawtv/motv keep track of TV norm and input source per TV
+ station now.
+ * fixed audio mode (mono vs. stereo) handling for v4l2.
+ * increased audio mode check delay to get better results.
+ * replaced rpm specfile
+
+
3.66 => 3.67
============
@@ -10,7 +23,7 @@
* more plugin support in libng.
* some libng stuff is now implemented as plugin.
* build plugins with -fPIC.
- * fixed FreeBSD build problems (due * to new plugins).
+ * fixed FreeBSD build problems (due to new plugins).
* fixed bugs in fbdev code.
* moved OSS code to libng.
* avevtd patches (Gerald Schnabel <etk20835@stud.uni-stuttgart.de>).
diff --git a/Make.config.in b/Make.config.in
index 64d66a2..9780bb9 100644
--- a/Make.config.in
+++ b/Make.config.in
@@ -16,7 +16,7 @@ DEPEND=@DEPEND@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
-INSTALL_DIR=mkdir -p
+INSTALL_DIR=@INSTALL@ -d -m 755
SUID_ROOT=-m4755 -o root
# misc
diff --git a/Makefile b/Makefile
index 7a5f147..9fcda38 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,3 @@
-all checkit diff release port tarball snapshot auto:
+all checkit diff release port tarball rpm snapshot auto:
./configure
$(MAKE) $@
diff --git a/Makefile.clean b/Makefile.clean
index 7a5f147..9fcda38 100644
--- a/Makefile.clean
+++ b/Makefile.clean
@@ -1,3 +1,3 @@
-all checkit diff release port tarball snapshot auto:
+all checkit diff release port tarball rpm snapshot auto:
./configure
$(MAKE) $@
diff --git a/Makefile.in b/Makefile.in
index e5fb47e..a2394a8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,7 +41,7 @@ distclean realclean::
#########################################################
# just for me, some maintaining jobs. Don't use them
-VERSION=@XAWTV_VERSION@
+VERSION=@VERSION@
checkit: distclean
dpkg-buildpackage -tc -us -uc -rfakeroot
@@ -58,6 +58,9 @@ tarball: distclean
(cd ..; tar cvzf xawtv_$(VERSION).tar.gz \
xawtv-$(VERSION))
+rpm: tarball
+ rpm -ta ../xawtv_$(VERSION).tar.gz
+
snapshot: distclean
(cd ..; tar cvzf xawtv-snap-`date +%Y-%m-%d`.tar.gz \
xawtv-$(VERSION))
diff --git a/README.recording b/README.recording
index 017ff29..71c7cc3 100644
--- a/README.recording
+++ b/README.recording
@@ -9,8 +9,10 @@ Audio
If you don't get sound when recording avi movies, double-check the
mixer settings first. The record source defaults to micro on many
linux sound drivers, you probably have to change this to line-in with
-one of the available mixer tools. Also keep in mind that ALSA has
-all mixer controls at 0 (i.e. muted) by default.
+one of the available mixer tools. Some sound cards have a separate
+input gain control which needs to be set to some approximate value.
+Also keep in mind that ALSA has all mixer controls at 0 (i.e. muted)
+by default.
/me uses kmix (because it doesn't need much space on the screen).
The inputs where the sound cards record from have a red background
@@ -18,6 +20,11 @@ color. With the right mouse botton you'll get a menu where you can
change the settings. FreeBSD has a aumix version with X11 GUI in
the ports collection which is very nice too (aumix-gtk in debian).
+If you want to see something while playing with the mixer settings you
+can use the record utility (ncurses terminal application, in the tools
+subdirectory), it has a nice input level meter. motv has one build-in
+too (Menu -> Tools -> Record level monitor).
+
Note on stereo: xanim seems not be able to playback stereo sound
correctly.
@@ -55,7 +62,10 @@ to reduce the number of dropped frames.
If you want to record quicktime movies install the quicktime4linux
libraries (http://heroines.sourceforge.net/quicktime.php3), then
(re-)build xawtv. The configure script should find the library
-automatically.
+automatically. Note: /me still uses version 1.3. Tried 1.5 recently,
+it didn't work for me. The library itself needs a (trivial) fix to
+build (gcc 2.95.4, maybe gcc 3.x is less picky). "make util" failes
+with unresolved symbols :-( Waiting for 1.6 ...
Known problems (and workarounds)
diff --git a/config.h.in b/config.h.in
index 8033dbf..b3ee17e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -36,6 +36,9 @@
/* Define if you have the getpt function. */
#undef HAVE_GETPT
+/* Define if you have the strcasestr function. */
+#undef HAVE_STRCASESTR
+
/* Define if you have the <alsa/asoundlib.h> header file. */
#undef HAVE_ALSA_ASOUNDLIB_H
diff --git a/configure b/configure
index 9b078f5..560337d 100755
--- a/configure
+++ b/configure
@@ -1097,7 +1097,7 @@ else
fi
done
-for ac_func in ftello fseeko getpt getnameinfo getopt_long dlopen
+for ac_func in ftello fseeko getpt getnameinfo getopt_long strcasestr dlopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1104: checking for $ac_func" >&5
diff --git a/configure.in b/configure.in
index 2a976a7..622c449 100644
--- a/configure.in
+++ b/configure.in
@@ -72,7 +72,7 @@ dnl Checks for functions
AC_EGREP_HEADER(sockaddr_storage,sys/socket.h,AC_DEFINE(HAVE_SOCKADDR_STORAGE))
AC_CHECK_HEADERS(endian.h getopt.h soundcard.h sys/soundcard.h alsa/asoundlib.h linux/joystick.h dev/ic/bt8xx.h machine/ioctl_bt848.h)
-AC_CHECK_FUNCS(ftello fseeko getpt getnameinfo getopt_long dlopen)
+AC_CHECK_FUNCS(ftello fseeko getpt getnameinfo getopt_long strcasestr dlopen)
AC_SUBST(DLFLAGS)
DLFLAGS=""
diff --git a/debian/changelog b/debian/changelog
index f5579bb..f5dc953 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xawtv (3.68) unstable; urgency=low
+
+ * new release.
+
+ -- Gerd Knorr <kraxel@debian.org> Thu, 17 Jan 2002 19:08:55 +0100
+
xawtv (3.67) unstable; urgency=low
* new release (closes: #124275).
diff --git a/http/devices.c b/http/devices.c
index 031f00c..8a86867 100644
--- a/http/devices.c
+++ b/http/devices.c
@@ -9,7 +9,7 @@
/*
* default devices names
*/
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
struct ng_device_config ng_dev = {
video: "/dev/bktr0",
radio: NULL,
diff --git a/libng/devices.c b/libng/devices.c
index 031f00c..8a86867 100644
--- a/libng/devices.c
+++ b/libng/devices.c
@@ -9,7 +9,7 @@
/*
* default devices names
*/
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
struct ng_device_config ng_dev = {
video: "/dev/bktr0",
radio: NULL,
diff --git a/libng/grab-ng.c b/libng/grab-ng.c
index fb8803c..e404566 100644
--- a/libng/grab-ng.c
+++ b/libng/grab-ng.c
@@ -637,6 +637,7 @@ void
ng_init(void)
{
static int once=0;
+ int count;
if (once++) {
fprintf(stderr,"panic: ng_init called twice\n");
@@ -647,8 +648,12 @@ ng_init(void)
ng_color_yuv2rgb_init();
ng_writefile_init();
- if (0 == ng_plugins(LIBDIR))
- ng_plugins("../libng/plugins"); /* nice for development */
+ count = ng_plugins(LIBDIR);
+ if (0 == count)
+ /* nice for development */
+ count = ng_plugins("../libng/plugins");
+ if (0 == count)
+ fprintf(stderr,"WARNING: no plugins found [%s]\n",LIBDIR);
}
/*
diff --git a/libng/plugins/drv0-v4l2.c b/libng/plugins/drv0-v4l2.c
index eda822e..0a2bbf4 100644
--- a/libng/plugins/drv0-v4l2.c
+++ b/libng/plugins/drv0-v4l2.c
@@ -1,7 +1,7 @@
/*
* interface to the v4l2 driver
*
- * (c) 1998-2001 Gerd Knorr <kraxel@bytesex.org>
+ * (c) 1998-2002 Gerd Knorr <kraxel@bytesex.org>
*
*/
#include "config.h"
@@ -674,6 +674,9 @@ static int v4l2_read_attr(struct ng_attribute *attr)
xioctl(h->fd,VIDIOC_G_CTRL,&c,0);
if (ctl->type == V4L2_CTRL_TYPE_INTEGER) {
value = v4l2_to_me(ctl,c.value);
+ if (ng_debug)
+ fprintf(stderr,"v4l2: attr read int %d => %d\n",
+ c.value,value);
} else {
value = c.value;
}
@@ -688,7 +691,22 @@ static int v4l2_read_attr(struct ng_attribute *attr)
memset(&tuner,0,sizeof(tuner));
xioctl(h->fd,VIDIOC_G_TUNER,&tuner,0);
value = tuner.audmode;
-
+ if (ng_debug) {
+ fprintf(stderr,"v4l2: tuner cap:%s%s%s\n",
+ (tuner.capability&V4L2_TUNER_CAP_STEREO) ? " STEREO" : "",
+ (tuner.capability&V4L2_TUNER_CAP_LANG1) ? " LANG1" : "",
+ (tuner.capability&V4L2_TUNER_CAP_LANG2) ? " LANG2" : "");
+ fprintf(stderr,"v4l2: tuner rxs:%s%s%s%s\n",
+ (tuner.rxsubchans&V4L2_TUNER_SUB_MONO) ? " MONO" : "",
+ (tuner.rxsubchans&V4L2_TUNER_SUB_STEREO) ? " STEREO" : "",
+ (tuner.rxsubchans&V4L2_TUNER_SUB_LANG1) ? " LANG1" : "",
+ (tuner.rxsubchans&V4L2_TUNER_SUB_LANG2) ? " LANG2" : "");
+ fprintf(stderr,"v4l2: tuner cur:%s%s%s%s\n",
+ (tuner.audmode==V4L2_TUNER_MODE_MONO) ? " MONO" : "",
+ (tuner.audmode==V4L2_TUNER_MODE_STEREO) ? " STEREO" : "",
+ (tuner.audmode==V4L2_TUNER_MODE_LANG1) ? " LANG1" : "",
+ (tuner.audmode==V4L2_TUNER_MODE_LANG2) ? " LANG2" : "");
+ }
}
return value;
}
@@ -704,6 +722,9 @@ static void v4l2_write_attr(struct ng_attribute *attr, int value)
c.id = ctl->id;
if (ctl->type == V4L2_CTRL_TYPE_INTEGER) {
c.value = me_to_v4l2(ctl,value);
+ if (ng_debug)
+ fprintf(stderr,"v4l2: attr write int %d => %d\n",
+ value,c.value);
} else {
c.value = value;
}
diff --git a/libng/plugins/drv1-v4l.c b/libng/plugins/drv1-v4l.c
index b9de9d0..7a8d6ba 100644
--- a/libng/plugins/drv1-v4l.c
+++ b/libng/plugins/drv1-v4l.c
@@ -613,6 +613,19 @@ static struct ng_attribute* v4l_attrs(void *handle)
return h->attr;
}
+static int audio_mode_mask2bit(int mode)
+{
+ if (mode & VIDEO_SOUND_STEREO)
+ return VIDEO_SOUND_STEREO;
+ if (mode & VIDEO_SOUND_LANG1)
+ return VIDEO_SOUND_LANG1;
+ if (mode & VIDEO_SOUND_LANG2)
+ return VIDEO_SOUND_LANG2;
+ if (mode & VIDEO_SOUND_MONO)
+ return VIDEO_SOUND_MONO;
+ return 0;
+}
+
static int v4l_read_attr(struct ng_attribute *attr)
{
struct v4l_handle *h = attr->handle;
@@ -631,7 +644,7 @@ static int v4l_read_attr(struct ng_attribute *attr)
return h->audio.volume;
case ATTR_ID_AUDIO_MODE:
xioctl(h->fd, VIDIOCGAUDIO, &h->audio);
- return h->audio.mode;
+ return audio_mode_mask2bit(h->audio.mode);
case ATTR_ID_COLOR:
xioctl(h->fd, VIDIOCGPICT, &h->pict);
return h->pict.colour;
diff --git a/src/MoTV-de b/src/MoTV-de
index 4379c4a..8626825 100644
--- a/src/MoTV-de
+++ b/src/MoTV-de
@@ -153,8 +153,8 @@ control*menubar*s_888.mnemonic: 8
control*menubar*add.labelString: Sender hinzufügen ...
control*menubar*add.mnemonic: h
control*menubar*scan.labelString: Sendersuche ...
-control*menubar*pref.labelString: Einstellungen ...
-control*menubar*save.labelString: Konfiguration speichern
+control*menubar*pref.labelString: Konfiguration ...
+control*menubar*save.labelString: Einstellungen speichern
control*menubar*save.mnemonic: s
control*menubar*capture.labelString: Capture
@@ -168,7 +168,7 @@ control*menubar*scale.accelerator: <Key>S
control*menubar*input.labelString: Eingang
control*menubar*input.mnemonic: E
control*menubar*norm.labelString: Fernsehnorm
-control*menubar*norm.mnemonic: N
+control*menubar*norm.mnemonic: n
! filter menu
control*menubar*none.labelString: Kein filter
diff --git a/src/MoTV.de.ad b/src/MoTV.de.ad
index 37f07c8..9955c9a 100644
--- a/src/MoTV.de.ad
+++ b/src/MoTV.de.ad
@@ -153,8 +153,8 @@ control*menubar*s_888.mnemonic: 8
control*menubar*add.labelString: Sender hinzufügen ...
control*menubar*add.mnemonic: h
control*menubar*scan.labelString: Sendersuche ...
-control*menubar*pref.labelString: Einstellungen ...
-control*menubar*save.labelString: Konfiguration speichern
+control*menubar*pref.labelString: Konfiguration ...
+control*menubar*save.labelString: Einstellungen speichern
control*menubar*save.mnemonic: s
control*menubar*capture.labelString: Capture
@@ -168,7 +168,7 @@ control*menubar*scale.accelerator: <Key>S
control*menubar*input.labelString: Eingang
control*menubar*input.mnemonic: E
control*menubar*norm.labelString: Fernsehnorm
-control*menubar*norm.mnemonic: N
+control*menubar*norm.mnemonic: n
! filter menu
control*menubar*none.labelString: Kein filter
diff --git a/src/commands.c b/src/commands.c
index da92247..195c9d0 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1,3 +1,5 @@
+#define _GNU_SOURCE
+
#include "config.h"
#include <stdio.h>
@@ -507,6 +509,7 @@ set_defaults()
/* ----------------------------------------------------------------------- */
+#ifndef HAVE_STRCASESTR
static char* strcasestr(char *haystack, char *needle)
{
int hlen = strlen(haystack);
@@ -518,6 +521,7 @@ static char* strcasestr(char *haystack, char *needle)
return haystack+offset;
return NULL;
}
+#endif
static int setstation_handler(char *name, int argc, char **argv)
{
@@ -569,9 +573,9 @@ static int setstation_handler(char *name, int argc, char **argv)
return -1;
/* switch ... */
- set_capture(CAPTURE_OFF,1);
if (channel_switch_hook)
channel_switch_hook();
+ set_capture(CAPTURE_OFF,1);
last_sender = cur_sender;
cur_sender = i;
@@ -662,9 +666,9 @@ static int setchannel_handler(char *name, int argc, char **argv)
}
}
- set_capture(CAPTURE_OFF,1);
if (channel_switch_hook)
channel_switch_hook();
+ set_capture(CAPTURE_OFF,1);
cur_sender = -1;
cur_freq = get_freq(cur_channel)+cur_fine;
diff --git a/src/main.c b/src/main.c
index 5b38499..c7906bb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -571,7 +571,7 @@ new_channel(void)
XtRemoveTimeOut(audio_timer);
audio_timer = 0;
}
- audio_timer = XtAppAddTimeOut(app_context, 2000, watch_audio, NULL);
+ audio_timer = XtAppAddTimeOut(app_context, 5000, watch_audio, NULL);
}
void
@@ -648,6 +648,8 @@ pixit(void)
channels[cur_sender]->bright = cur_attrs[ATTR_ID_BRIGHT];
channels[cur_sender]->hue = cur_attrs[ATTR_ID_HUE];
channels[cur_sender]->contrast = cur_attrs[ATTR_ID_CONTRAST];
+ channels[cur_sender]->input = cur_attrs[ATTR_ID_INPUT];
+ channels[cur_sender]->norm = cur_attrs[ATTR_ID_NORM];
if (0 == pix_width || 0 == pix_height)
return;
@@ -731,6 +733,7 @@ static void create_chanwin(void)
NULL);
}
+void channel_menu(void); /* FIXME */
void channel_menu(void)
{
int i,max,len;
diff --git a/src/motif.c b/src/motif.c
index 1408e88..a37cb91 100644
--- a/src/motif.c
+++ b/src/motif.c
@@ -273,7 +273,7 @@ new_channel(void)
XtRemoveTimeOut(audio_timer);
audio_timer = 0;
}
- audio_timer = XtAppAddTimeOut(app_context, 2000, watch_audio, NULL);
+ audio_timer = XtAppAddTimeOut(app_context, 5000, watch_audio, NULL);
}
static void
@@ -1271,6 +1271,13 @@ static void create_attr_widgets(void)
attr = ng_attr_byid(attrs,ATTR_ID_AUDIO_MODE);
if (NULL != attr)
add_attr_option(opt_menu,attr);
+ for (attr = attrs; attr->name != NULL; attr++) {
+ if (attr->id < ATTR_ID_COUNT)
+ continue;
+ if (attr->type != ATTR_TYPE_CHOICE)
+ continue;
+ add_attr_option(opt_menu,attr);
+ }
/* bools */
attr = ng_attr_byid(attrs,ATTR_ID_MUTE);
@@ -1413,6 +1420,8 @@ pixit(void)
channels[cur_sender]->bright = cur_attrs[ATTR_ID_BRIGHT];
channels[cur_sender]->hue = cur_attrs[ATTR_ID_HUE];
channels[cur_sender]->contrast = cur_attrs[ATTR_ID_CONTRAST];
+ channels[cur_sender]->input = cur_attrs[ATTR_ID_INPUT];
+ channels[cur_sender]->norm = cur_attrs[ATTR_ID_NORM];
if (0 == pix_width || 0 == pix_height)
return;
diff --git a/src/xt.c b/src/xt.c
index 4f84d97..9d67d30 100644
--- a/src/xt.c
+++ b/src/xt.c
@@ -911,51 +911,27 @@ void
change_audio(int mode)
{
struct ng_attribute *attr;
+ const char *mname;
char label[64];
- char mname[10];
- int val;
attr = ng_attr_byid(attrs,ATTR_ID_AUDIO_MODE);
if (NULL == attr)
return;
-#ifdef __linux__
- if (-1 != mode) {
- /* set */
+ if (-1 != mode)
attr->write(attr,mode);
- }
- if (-1 == mode || 0 == mode) {
- /* read back */
+ if (-1 == mode || 0 == mode)
mode = attr->read(attr);
- }
-
- if (mode & VIDEO_SOUND_STEREO) {
- val = VIDEO_SOUND_STEREO;
- strcpy(mname,"stereo");
-
- } else if (mode & VIDEO_SOUND_LANG1) {
- val = VIDEO_SOUND_LANG1;
- strcpy(mname,"lang1");
-
- } else if (mode & VIDEO_SOUND_LANG2) {
- val = VIDEO_SOUND_LANG2;
- strcpy(mname,"lang2");
- } else if (mode & VIDEO_SOUND_MONO) {
- val = VIDEO_SOUND_MONO;
- strcpy(mname,"mono");
-
- } else {
- val = 0;
- strcpy(mname,"???");
- }
+ mname = ng_attr_getstr(attr,mode);
+ if (NULL == mname)
+ mname = "???";
if (attr_notify)
- attr_notify(attr,val);
+ attr_notify(attr,mode);
sprintf(label,"%s (%s)",default_title,mname);
XtVaSetValues(app_shell,XtNtitle,label,NULL);
-#endif
}
/*----------------------------------------------------------------------*/
diff --git a/tools/Makefile.in b/tools/Makefile.in
index a20d33e..00d8f98 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -13,13 +13,13 @@ PROGS=dump-mixers record showriff @TOOLS@
all build: $(PROGS)
dump-mixers: dump-mixers.o
- $(CC) $(CFLAGS) -o $@ dump-mixers.o $(SOUND_LIBS)
+ $(CC) $(CFLAGS) -o $@ dump-mixers.o $(OSS_LIBS)
showriff: showriff.o
$(CC) $(CFLAGS) -o $@ showriff.o
record: record.o
- $(CC) $(CFLAGS) -o $@ record.o $(CURSES_LIBS) $(SOUND_LIBS)
+ $(CC) $(CFLAGS) -o $@ record.o $(CURSES_LIBS) $(OSS_LIBS)
propwatch: propwatch.o
$(CC) $(CFLAGS) -o $@ propwatch.o $(ATHENA_LIBS)
diff --git a/tools/record.c b/tools/record.c
index a410496..47136d9 100644
--- a/tools/record.c
+++ b/tools/record.c
@@ -7,6 +7,7 @@
#include <fcntl.h>
#include <errno.h>
#include <curses.h>
+#include <signal.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <sys/ioctl.h>
@@ -118,15 +119,26 @@ static int
sound_read(void)
{
struct timeval now;
- int i,rc;
+ int i,rc,have;
short *v;
/* read */
- rc = read(sound_fd,sound_buffer,sound_blksize);
- if (sound_blksize != rc) {
- fprintf(stderr,"read %s: %s (rc=%d,bs=%d)\n",
- audio_dev,strerror(errno),rc,sound_blksize);
- return -1;
+ for (have = 0;have < sound_blksize;) {
+ rc = read(sound_fd,sound_buffer+have,sound_blksize-have);
+ switch (rc) {
+ case -1:
+ if (EINTR != errno) {
+ perror("read sound");
+ exit(1);
+ }
+ break;
+ case 0:
+ fprintf(stderr,"Huh? got 0 bytes from sound device?\n");
+ exit(1);
+ default:
+ have += rc;
+
+ }
}
/* look for peaks */
@@ -291,7 +303,8 @@ typedef struct WAVEHDR {
/* -------------------------------------------------------------------- */
static WAVEHDR fileheader;
-static int wav_size;
+static off_t wav_size;
+static off_t done_size;
static void
wav_init_header(int rate)
@@ -351,6 +364,7 @@ wav_stop_write(int fd)
fileheader.chkData.dwSize = cpu_to_le32(wav_size);
lseek(fd,0,SEEK_SET);
write(fd,&fileheader,sizeof(WAVEHDR));
+ done_size += wav_size;
}
/* -------------------------------------------------------------------- */
@@ -367,6 +381,12 @@ static char empty[] =
"--------------------------------------------------"
"--------------------------------------------------";
+static char blank[] =
+" "
+" "
+" "
+" ";
+
static void
print_bar(int line, char *name, int val1, int val2, int max)
{
@@ -384,49 +404,119 @@ print_bar(int line, char *name, int val1, int val2, int max)
/* -------------------------------------------------------------------- */
-#define NCURSES 0
-#define CONSOLE 1
+enum MODE {
+ NCURSES = 1,
+ CONSOLE = 2,
+};
char *progname;
-int sig,verbose;
+int stop,verbose;
char *input = "line";
char *filename = "new";
-int mode = NCURSES;
+enum MODE mode = NCURSES;
int rate = 44100;
static void
ctrlc(int signal)
{
- fprintf(stderr,"^C catched -- exiting\n");
- sig=1;
+ if (verbose)
+ fprintf(stderr,"%s - exiting \n",
+ sys_siglist[signal]);
+ stop = 1;
}
static void
-usage(void)
+usage(FILE *fp)
{
- fprintf(stderr,
+ fprintf(fp,
"%s records sound in CD-Quality (44100/16bit/stereo).\n"
"It has a nice ascii-art input-level meter. It is a\n"
"interactive curses application. You'll need a fast\n"
"terminal, don't try this on a 9600 bps vt100...\n"
"\n"
"%s has seven options:\n"
- " -h this text\n"
- " -c console only mode\n"
- " -i dev mixer device [%s]. This should be the one\n"
- " where you can adjust the record level for\n"
- " your audio source.\n"
- " -o file output file name [%s], a number and the .wav\n"
- " extention are added by %s.\n"
- " -d dev set audio device [%s]\n"
- " -m dev set mixer device [%s]\n"
- " -r rate set sample rate [%d]\n"
+ " -h this text\n"
+ " -o file output file name [%s], a number and the .wav\n"
+ " extention are added by %s.\n"
+ " -i ctrl mixer control [%s]. This should be the one\n"
+ " where you can adjust the record level for\n"
+ " your audio source, line and igain are good\n"
+ " candidates.\n"
+ " -d dev set audio device [%s]\n"
+ " -m dev set mixer device [%s]\n"
+ " -r rate set sample rate [%d]\n"
+ "\n"
+ "for non-interactive usage only:\n"
+ " -c enable console (non-interactive) mode\n"
+ " -v be verbose (show progress)\n"
+ " -t mm:ss limit the time to record. By default it records\n"
+ " until stopped by a signal (^C)\n"
+ " -s size set max file size [2GB]. You have to give number\n"
+ " and unit without space inbetween, i.e. \"100mb\".\n"
"\n",
- progname,progname,input,filename,progname,
+ progname,progname,filename,progname,input,
audio_dev,mixer_dev,
rate);
}
+static int
+record_start(char *outfile, int *nr)
+{
+ int wav;
+
+ do {
+ sprintf(outfile,"%s%02d.wav",filename,(*nr)++);
+ wav = open(outfile, O_WRONLY | O_EXCL | O_CREAT, 0666);
+ } while ((-1 == wav) && (EEXIST == errno));
+ if (-1 == wav) {
+ perror("open");
+ exit(1);
+ }
+ wav_start_write(wav,rate);
+ return wav;
+}
+
+static off_t
+parse_size(const char *arg)
+{
+ int value;
+ char mul[4];
+ off_t retval = -1;
+
+ if (2 != sscanf(arg,"%d%3s",&value,mul))
+ return -1;
+ if (0 == strcasecmp(mul,"g") ||
+ 0 == strcasecmp(mul,"gb"))
+ retval = (off_t)value * 1024 * 1024 * 1024;
+ if (0 == strcasecmp(mul,"m") ||
+ 0 == strcasecmp(mul,"mb"))
+ retval = (off_t)value * 1024 * 1024;
+ if (0 == strcasecmp(mul,"k") ||
+ 0 == strcasecmp(mul,"kb"))
+ retval = (off_t)value * 1024;
+ return retval;
+}
+
+static char*
+str_mb(off_t value)
+{
+ static char buf[32];
+
+ if (value > 1000000000) {
+ value = (value * 10) >> 30;
+ sprintf(buf,"%d.%d GB",(int)(value/10),(int)(value%10));
+ return buf;
+ }
+ if (value > 1000000) {
+ value = (value * 10) >> 20;
+ sprintf(buf,"%d.%d MB",(int)(value/10),(int)(value%10));
+ return buf;
+ }
+ value >>= 10;
+ sprintf(buf,"%3d kB",(int)value);
+ return buf;
+}
+
int
main(int argc, char *argv[])
{
@@ -434,14 +524,17 @@ main(int argc, char *argv[])
int record,nr,wav=0;
char *outfile;
fd_set s;
- int sec;
+ int sec,maxhour,maxmin,maxsec;
+ off_t maxsize;
progname = strrchr(argv[0],'/');
progname = progname ? progname+1 : argv[0];
/* parse options */
+ maxsec = 0;
+ maxsize = parse_size("2G");
for (;;) {
- if (-1 == (c = getopt(argc, argv, "vhci:o:d:m:r:")))
+ if (-1 == (c = getopt(argc, argv, "vhci:o:d:m:r:t:s:")))
break;
switch (c) {
case 'v':
@@ -465,9 +558,29 @@ main(int argc, char *argv[])
case 'r':
rate = atoi(optarg);
break;
+ case 't':
+ if (3 != sscanf(optarg,"%d:%d:%d",&maxhour,&maxmin,&maxsec)) {
+ maxhour = 0;
+ if (2 != sscanf(optarg,"%d:%d",&maxmin,&maxsec)) {
+ fprintf(stderr,"time parse error\n");
+ exit(1);
+ }
+ }
+ maxsec += maxmin * 60;
+ maxsec += maxhour * 60 * 60;
+ break;
+ case 's':
+ maxsize = parse_size(optarg);
+ if (-1 == maxsize) {
+ fprintf(stderr,"size parse error\n");
+ exit(1);
+ }
+ break;
case 'h':
+ usage(stdout);
+ exit(0);
default:
- usage();
+ usage(stderr);
exit(1);
}
}
@@ -496,11 +609,13 @@ main(int argc, char *argv[])
mvprintw( 8,0,"space starts/stops recording");
/* line 9 is printed later */
mvprintw(10,0," auto-adjust reduces the record level on overruns");
- mvprintw(11,0,"'Q' quit");
+ mvprintw(11,0,"'N' next file (same as space twice, but without break)");
+ mvprintw(12,0,"'Q' quit");
mvprintw(LINES-3,0,"--");
- mvprintw(LINES-2,0,"(c) 1999-2001 Gerd Knorr <kraxel@bytesex.org>");
+ mvprintw(LINES-2,0,"(c) 1999-2002 Gerd Knorr <kraxel@bytesex.org>");
- for (;!sig;) {
+ for (;!stop;) {
+ refresh();
FD_ZERO(&s);
FD_SET(0,&s);
FD_SET(sound_fd,&s);
@@ -533,14 +648,13 @@ main(int argc, char *argv[])
mvprintw(9,0,"'A' toggle auto-adjust [%s] ",
auto_adjust ? "on" : "off");
if (record) {
- sec = wav_size / (rate*4);
- mvprintw(3,0,"%s: %3d:%02d (%d MB) ",outfile,
- sec/60,sec%60,wav_size/(1024*1024));
wav_write_audio(wav,sound_buffer,sound_blksize);
+ sec = wav_size / (rate*4);
+ mvprintw(3,0,"%s: %3d:%02d (%s) ",outfile,
+ sec/60,sec%60,str_mb(wav_size));
} else {
mvprintw(3,0,"");
}
- refresh();
}
if (FD_ISSET(0,&s)) {
@@ -548,27 +662,26 @@ main(int argc, char *argv[])
switch (key = getch()) {
case 'Q':
case 'q':
- sig=1;
+ stop = 1;
break;
case 'A':
case 'a':
auto_adjust = !auto_adjust;
break;
+ case 'N':
+ case 'n':
+ if (record) {
+ wav_stop_write(wav);
+ close(wav);
+ wav = record_start(outfile,&nr);
+ }
+ break;
case ' ':
if (!filename)
break;
if (!record) {
/* start */
- do {
- sprintf(outfile,"%s%02d.wav",filename,nr++);
- wav = open(outfile, O_WRONLY | O_EXCL | O_CREAT,
- 0666);
- } while ((-1 == wav) && (EEXIST == errno));
- if (-1 == wav) {
- perror("open");
- exit(1);
- }
- wav_start_write(wav,rate);
+ wav = record_start(outfile,&nr);
record=1;
auto_adjust=0;
} else {
@@ -576,7 +689,7 @@ main(int argc, char *argv[])
wav_stop_write(wav);
close(wav);
record=0;
- mvprintw(3,0," ");
+ mvprintw(3,0,"%*.*s",COLS-1,COLS-1,blank);
}
break;
case KEY_RIGHT:
@@ -599,41 +712,38 @@ main(int argc, char *argv[])
}
if (mode == CONSOLE) {
- do {
- sprintf(outfile,"%s%02d.wav",filename,nr++);
- wav = open(outfile, O_WRONLY | O_EXCL | O_CREAT, 0666);
- } while ((-1 == wav) && (EEXIST == errno));
- if (-1 == wav) {
- perror("open");
- exit(1);
- }
- wav_start_write(wav,rate);
+ wav = record_start(outfile,&nr);
record=1;
- auto_adjust=1;
- for (;!sig;) {
+ for (;!stop;) {
if (-1 == sound_read())
break;
-#if 0
- if (delay)
- delay--;
- if (auto_adjust && (0 == delay) &&
- (maxl >= 32767 || maxr >= 32767)) {
- /* auto-adjust */
- vol = mixer_get_volume();
- vol--;
- if (vol < 0)
- vol = 0;
- mixer_set_volume(vol);
- delay = 3;
+ sec = (done_size + wav_size) / (rate*4);
+ if (maxsec && sec >= maxsec)
+ break;
+ if (wav_size + sound_blksize + sizeof(WAVEHDR) > maxsize) {
+ wav_stop_write(wav);
+ close(wav);
+ wav = record_start(outfile,&nr);
}
-#endif
- sec = wav_size / (rate*4);
- printf("%s: %3d:%02d (%d MB)\r",outfile,sec/60,sec%60,
- wav_size/(1024*1024));
- fflush(stdout);
wav_write_audio(wav,sound_buffer,sound_blksize);
+ if (verbose) {
+ int total = 10;
+ int len = (maxl+maxr)*total/32768/2;
+ printf("|%*.*s%*.*s| %s %d:%02d",
+ len,len,full, total-len,total-len,empty,
+ outfile,sec/60,sec%60);
+ if (maxsec)
+ printf("/%d:%02d",maxsec/60,maxsec%60);
+ printf(" (%s",str_mb(wav_size));
+ if (done_size)
+ printf(", %s total",str_mb(done_size + wav_size));
+ printf(") \r");
+ fflush(stdout);
+ }
}
+ if (verbose)
+ printf("\n");
}
if (record) {
diff --git a/tools/record.man b/tools/record.man
index 71b637f..96a7291 100644
--- a/tools/record.man
+++ b/tools/record.man
@@ -14,9 +14,6 @@ TV card etc.)
.B -h
display help text
.TP
-.B -c
-console only mode
-.TP
.B -i dev
mixer input. This should be the one where you can
adjust the record level for your audio source.
@@ -27,12 +24,26 @@ basename for the output file(s), a number and the .wav
extention are added by record. Default is "new".
.TP
.B -d dev
-set audio device. Default is "/dev/audio".
+set audio device. Default is "/dev/dsp".
.TP
.B -m dev
set mixer device. Default is "/dev/mixer".
.TP
.B -r rate
-set sample rate. Default is 44100.
+set sample rate. Default is 44100.
+.TP
+.B -c
+enable console (non-interactive) mode.
+.TP
+.B -v
+be verbose (console mode only).
+.TP
+.B -t mm:ss
+Limit the record time (console mode only). By default record records
+until stopped by a signal (by typing ^C for example).
+.TP
+.B -s size
+Limit the file size (console mode only). record will continue with
+a new file once the limit is reached.
.SH AUTHOR
Gerd Knorr <kraxel@bytesex.org>
diff --git a/xawtv.spec b/xawtv.spec
index 4ed154a..3fcb585 100644
--- a/xawtv.spec
+++ b/xawtv.spec
@@ -1,118 +1,155 @@
-%define prefix /usr/X11R6
-
-# workaround a bug in rpm 3.0.4:
-# by default it modifies the files installed by my %install
-# scriptlet (compresses the man-pages), but failes to update
-# the %files section too.
-%define __os_install_post true
-
-Summary: Video4Linux Stream Capture Viewer
-Name: xawtv
-Version: 3.67
-Release: 1
-Source0: xawtv_%{version}.tar.gz
-Group: X11/Applications
-Copyright: GNU GENERAL PUBLIC LICENSE
-URL: http://www.strusel007.de/linux/xawtv/xawtv_%{version}.tar.gz
-BuildRoot: /var/tmp/xawtv-%{version}.root
-
-%package radio
-Summary: radio
-Group: Applications/Sound
-
-%package misc
-Summary: misc
-Group: X11/Applications
-
-%package webcam
-Summary: webcam
-Group: Graphics
-
-%package -n alevtd
-Summary: alevtd
-Group: Applications/Internet
+Name: xawtv
+Group: Applications/Multimedia
+Requires: v4l-conf, tv-common
+Autoreqprov: on
+Version: 3.68
+Release: 0
+License: GPL
+Summary: Video4Linux TV application (Athena)
+Source: http://bytesex.org/xawtv/%{name}_%{version}.tar.gz
+Buildroot: /var/tmp/root.%{name}-%{version}
%description
-A collection tools for video4linux:
- * xawtv - X11 TV application
- * fbtv - console TV application
- * streamer - capture tool (images / movies)
- * v4lctl - command line tool to control v4l devices
-
-%description radio
-This is a ncurses-based radio application
-
-%description misc
-This package has a few tools you might find useful. They
-have not to do very much to do with xawtv. I've used/wrote
-them for debugging:
- * propwatch - monitors properties of X11 windows. If you
- want to know how to keep track of xawtv's
- _XAWTV_STATION property, look at this.
- * dump-mixers - dump mixer settings to stdout
- * record - console sound recorder. Has a simple input
- level meter which might be useful to trouble
- shoot sound problems.
- * showriff - display the structure of RIFF files (avi, wav).
-
-%description webcam
-webcam captures images from a video4linux device like bttv,
-annotates them and and uploads them to a webserver using ftp
-in a endless loop.
-
-%description -n alevtd
-http daemon which serves videotext pages as HTML.
+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: fonts, tools and some README's for motv and xawtv
+Group: Applications/Multimedia
+Provides: xawtv:/usr/X11R6/lib/X11/fonts/misc/led-iso8859-1.bdf
+
+%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.
%prep
-%setup
+%setup -q
%build
-mkdir build
-cd build
-CFLAGS="$RPM_OPT_FLAGS" ../configure --prefix=%{prefix}
+export CFLAGS="$RPM_OPT_FLAGS"
+./configure --prefix=/usr/X11R6
make depend
-make
+make all
%install
-cd build
-make DESTDIR="$RPM_BUILD_ROOT" SUID_ROOT="" install
-find "$RPM_BUILD_ROOT" -type f -print \
- | sed -e "s|$RPM_BUILD_ROOT||" \
- | grep -v "^/usr/doc" \
- > rpm.all
-
-egrep -e "/radio" rpm.all > rpm.radio
-egrep -e "/(dump-mixers|record|showriff|propwatch)" rpm.all > rpm.misc
-egrep -e "/webcam" rpm.all > rpm.webcam
-egrep -e "/alevtd" rpm.all > rpm.alevtd
-egrep -ve "/(radio|dump-mixers|record|showriff|propwatch|webcam|alevtd|v4l-conf)" \
- rpm.all > rpm.xawtv
-
-%files -f build/rpm.xawtv
+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)
-%attr(4711,root,root) %{prefix}/bin/v4l-conf
-%doc README Changes COPYING Programming-FAQ
-%doc README.* UPDATE_TO_v3.0
+%doc COPYING
+%doc Changes TODO README README.*
+%doc Programming-FAQ UPDATE_TO_v3.0
%doc contrib/dot.lircrc 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 radio -f build/rpm.radio
+%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 misc -f build/rpm.misc
+%files -n tv-common
%defattr(-,root,root)
-%doc tools/README
-
-%files webcam -f build/rpm.webcam
+%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/X11/fonts/misc/led*
+/usr/X11R6/lib/xawtv/*.so
+
+%files -n v4l-conf
%defattr(-,root,root)
-%doc webcam/webcam.cgi
+%doc COPYING
+%attr(4711,root,root) /usr/X11R6/bin/v4l-conf
+/usr/X11R6/man/man8/v4l-conf.8.gz
-%files -n alevtd -f build/rpm.alevtd
+%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
-rm -rf $RPM_BUILD_ROOT
-
-%post
-cd /usr/X11R6/lib/X11/fonts/misc
-mkfontdir
-xset fp rehash || true
+if test "%{buildroot}" != ""; then
+ rm -rf "%{buildroot}"
+fi
diff --git a/xawtv.spec.in b/xawtv.spec.in
index 3303a14..65914fa 100644
--- a/xawtv.spec.in
+++ b/xawtv.spec.in
@@ -1,118 +1,155 @@
-%define prefix /usr/X11R6
-
-# workaround a bug in rpm 3.0.4:
-# by default it modifies the files installed by my %install
-# scriptlet (compresses the man-pages), but failes to update
-# the %files section too.
-%define __os_install_post true
-
-Summary: Video4Linux Stream Capture Viewer
-Name: xawtv
-Version: @VERSION@
-Release: 1
-Source0: xawtv_%{version}.tar.gz
-Group: X11/Applications
-Copyright: GNU GENERAL PUBLIC LICENSE
-URL: http://www.strusel007.de/linux/xawtv/xawtv_%{version}.tar.gz
-BuildRoot: /var/tmp/xawtv-%{version}.root
-
-%package radio
-Summary: radio
-Group: Applications/Sound
-
-%package misc
-Summary: misc
-Group: X11/Applications
-
-%package webcam
-Summary: webcam
-Group: Graphics
-
-%package -n alevtd
-Summary: alevtd
-Group: Applications/Internet
+Name: xawtv
+Group: Applications/Multimedia
+Requires: v4l-conf, tv-common
+Autoreqprov: on
+Version: @VERSION@
+Release: 0
+License: GPL
+Summary: Video4Linux TV application (Athena)
+Source: http://bytesex.org/xawtv/%{name}_%{version}.tar.gz
+Buildroot: /var/tmp/root.%{name}-%{version}
%description
-A collection tools for video4linux:
- * xawtv - X11 TV application
- * fbtv - console TV application
- * streamer - capture tool (images / movies)
- * v4lctl - command line tool to control v4l devices
-
-%description radio
-This is a ncurses-based radio application
-
-%description misc
-This package has a few tools you might find useful. They
-have not to do very much to do with xawtv. I've used/wrote
-them for debugging:
- * propwatch - monitors properties of X11 windows. If you
- want to know how to keep track of xawtv's
- _XAWTV_STATION property, look at this.
- * dump-mixers - dump mixer settings to stdout
- * record - console sound recorder. Has a simple input
- level meter which might be useful to trouble
- shoot sound problems.
- * showriff - display the structure of RIFF files (avi, wav).
-
-%description webcam
-webcam captures images from a video4linux device like bttv,
-annotates them and and uploads them to a webserver using ftp
-in a endless loop.
-
-%description -n alevtd
-http daemon which serves videotext pages as HTML.
+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: fonts, tools and some README's for motv and xawtv
+Group: Applications/Multimedia
+Provides: xawtv:/usr/X11R6/lib/X11/fonts/misc/led-iso8859-1.bdf
+
+%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.
%prep
-%setup
+%setup -q
%build
-mkdir build
-cd build
-CFLAGS="$RPM_OPT_FLAGS" ../configure --prefix=%{prefix}
+export CFLAGS="$RPM_OPT_FLAGS"
+./configure --prefix=/usr/X11R6
make depend
-make
+make all
%install
-cd build
-make DESTDIR="$RPM_BUILD_ROOT" SUID_ROOT="" install
-find "$RPM_BUILD_ROOT" -type f -print \
- | sed -e "s|$RPM_BUILD_ROOT||" \
- | grep -v "^/usr/doc" \
- > rpm.all
-
-egrep -e "/radio" rpm.all > rpm.radio
-egrep -e "/(dump-mixers|record|showriff|propwatch)" rpm.all > rpm.misc
-egrep -e "/webcam" rpm.all > rpm.webcam
-egrep -e "/alevtd" rpm.all > rpm.alevtd
-egrep -ve "/(radio|dump-mixers|record|showriff|propwatch|webcam|alevtd|v4l-conf)" \
- rpm.all > rpm.xawtv
-
-%files -f build/rpm.xawtv
+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)
-%attr(4711,root,root) %{prefix}/bin/v4l-conf
-%doc README Changes COPYING Programming-FAQ
-%doc README.* UPDATE_TO_v3.0
+%doc COPYING
+%doc Changes TODO README README.*
+%doc Programming-FAQ UPDATE_TO_v3.0
%doc contrib/dot.lircrc 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 radio -f build/rpm.radio
+%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 misc -f build/rpm.misc
+%files -n tv-common
%defattr(-,root,root)
-%doc tools/README
-
-%files webcam -f build/rpm.webcam
+%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/X11/fonts/misc/led*
+/usr/X11R6/lib/xawtv/*.so
+
+%files -n v4l-conf
%defattr(-,root,root)
-%doc webcam/webcam.cgi
+%doc COPYING
+%attr(4711,root,root) /usr/X11R6/bin/v4l-conf
+/usr/X11R6/man/man8/v4l-conf.8.gz
-%files -n alevtd -f build/rpm.alevtd
+%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
-rm -rf $RPM_BUILD_ROOT
-
-%post
-cd /usr/X11R6/lib/X11/fonts/misc
-mkfontdir
-xset fp rehash || true
+if test "%{buildroot}" != ""; then
+ rm -rf "%{buildroot}"
+fi

Privacy Policy