aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:40 (GMT)
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:40 (GMT)
commite99e58b6d385a8ae806a97b88ec4dbb26c898619 (patch)
tree0abfa3103a07f01938548f1881f32e58079316d9
parent602289d4a5303d666ae9eda87fb12c0ea0225c13 (diff)
v3.82
-rw-r--r--Changes10
-rw-r--r--Makefile.in2
-rw-r--r--common/frequencies.c5
-rw-r--r--common/lirc.c3
-rw-r--r--console/fbtv.c2
-rw-r--r--console/scantv.c2
-rw-r--r--console/streamer.c2
-rw-r--r--console/ttv.c2
-rw-r--r--console/webcam.c2
-rw-r--r--debian/changelog6
-rw-r--r--debian/control2
-rw-r--r--debug/Subdir.mk4
-rw-r--r--libng/contrib-plugins/Subdir.mk3
-rw-r--r--libng/grab-ng.c16
-rw-r--r--libng/grab-ng.h2
-rw-r--r--scripts/build-test (renamed from build-test)0
-rw-r--r--vbistuff/alevtd.c2
-rw-r--r--x11/MoTV-de19
-rw-r--r--x11/MoTV-default19
-rw-r--r--x11/MoTV-fixed41
-rw-r--r--x11/MoTV-fr19
-rw-r--r--x11/MoTV-it19
-rw-r--r--x11/Subdir.mk2
-rw-r--r--x11/Xawtv.ad5
-rw-r--r--x11/atoms.c60
-rw-r--r--x11/atoms.h3
-rw-r--r--x11/v4lctl.c2
-rw-r--r--x11/wmhooks.c117
-rw-r--r--x11/wmhooks.h1
-rw-r--r--x11/xt.c26
-rw-r--r--x11/xt.h1
-rw-r--r--xawtv.spec2
32 files changed, 227 insertions, 174 deletions
diff --git a/Changes b/Changes
index 4f648aa..8802972 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,14 @@
+3.81 => 3.82
+============
+
+ * still a few compile bug left ...
+ * s/recode/iconv/. iconv should (unlike recode) be present on almost
+ every system as it comes with glibc ...
+ * wmhooks fixes.
+ * added -driver command line switcht to xawtv/motv.
+
+
3.80 => 3.81
============
diff --git a/Makefile.in b/Makefile.in
index b6c7ad1..e34fcf3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -46,7 +46,7 @@ OSS_LIBS := @LIBOSS@
ALSA_LIBS := @LIBALSA@
AA_LIBS := @AALIBS@
QT_LIBS := @QTLIBS@
-VBI_LIBS := @LIBZVBI@ -lm
+VBI_LIBS := @LIBZVBI@ -lm -lpng
GL_LIBS := @LIBGL@
DV_LIBS := @LIBDV@
FS_LIBS := -L@x_libraries@ @FSLIB@
diff --git a/common/frequencies.c b/common/frequencies.c
index 25f1a72..1c95832 100644
--- a/common/frequencies.c
+++ b/common/frequencies.c
@@ -116,15 +116,14 @@ static int freq_readlist(struct CHANLIST **list, int n, char *name)
continue;
}
- if (1 == sscanf(line," freq = %255[^\n]",value)) {
+ if (1 == sscanf(line," freq = %255[^\n]", value)) {
/* freq = */
(*list)[n-1].freq = atoi(value);
continue;
}
/* Huh ? */
- fprintf(stderr,"%s:%d: syntax error\n",
- DATADIR "/Index.map",nr);
+ fprintf(stderr,"%s:%d: syntax error\n", filename, nr);
}
return n;
}
diff --git a/common/lirc.c b/common/lirc.c
index ad7545e..63f4d73 100644
--- a/common/lirc.c
+++ b/common/lirc.c
@@ -98,7 +98,8 @@ int lirc_tv_init()
config = NULL;
}
if (debug)
- fprintf(stderr, "lirc: ~/.lircrc file %sfound\n", config?"":"not ");
+ fprintf(stderr, "lirc: ~/.lircrc file %sfound\n",
+ config ? "" : "not ");
fcntl(fd,F_SETFL,O_NONBLOCK);
fcntl(fd,F_SETFD,FD_CLOEXEC);
diff --git a/console/fbtv.c b/console/fbtv.c
index aa57b46..9c4e868 100644
--- a/console/fbtv.c
+++ b/console/fbtv.c
@@ -519,7 +519,7 @@ grabber_init(void)
screen.width = fb_var.xres_virtual;
screen.height = fb_var.yres_virtual;
screen.bytesperline = fb_fix.line_length;
- drv = ng_vid_open(ng_dev.video,&screen,0,&h_drv);
+ drv = ng_vid_open(ng_dev.video,NULL,&screen,0,&h_drv);
if (NULL == drv) {
fprintf(stderr,"no grabber device available\n");
exit(1);
diff --git a/console/scantv.c b/console/scantv.c
index d1e0cf1..a33ee06 100644
--- a/console/scantv.c
+++ b/console/scantv.c
@@ -34,7 +34,7 @@ char *tvname;
static void
grabber_init(void)
{
- drv = ng_vid_open(ng_dev.video,NULL,0,&h_drv);
+ drv = ng_vid_open(ng_dev.video,NULL,NULL,0,&h_drv);
if (NULL == drv) {
fprintf(stderr,"no grabber device available\n");
exit(1);
diff --git a/console/streamer.c b/console/streamer.c
index 1bb19e8..a4e9399 100644
--- a/console/streamer.c
+++ b/console/streamer.c
@@ -423,7 +423,7 @@ main(int argc, char **argv)
ng_vfmt_to_desc[video.fmtid],ng_afmt_to_desc[audio.fmtid]);
if (video.fmtid != VIDEO_NONE) {
- drv = ng_vid_open(ng_dev.video,NULL,0,&h_drv);
+ drv = ng_vid_open(ng_dev.video,NULL,NULL,0,&h_drv);
if (NULL == drv) {
fprintf(stderr,"no grabber device available\n");
exit(1);
diff --git a/console/ttv.c b/console/ttv.c
index 5f0133c..46ce94b 100644
--- a/console/ttv.c
+++ b/console/ttv.c
@@ -35,7 +35,7 @@ static int fast;
static void
grabber_init(void)
{
- drv = ng_vid_open(ng_dev.video,NULL,0,&h_drv);
+ drv = ng_vid_open(ng_dev.video,NULL,NULL,0,&h_drv);
if (NULL == drv) {
fprintf(stderr,"no grabber device available\n");
exit(1);
diff --git a/console/webcam.c b/console/webcam.c
index 535709a..a4421a1 100644
--- a/console/webcam.c
+++ b/console/webcam.c
@@ -297,7 +297,7 @@ grab_init(void)
struct ng_attribute *attr;
int val,i;
- drv = ng_vid_open(ng_dev.video,NULL,0,&h_drv);
+ drv = ng_vid_open(ng_dev.video,NULL,NULL,0,&h_drv);
if (NULL == drv) {
fprintf(stderr,"no grabber device available\n");
exit(1);
diff --git a/debian/changelog b/debian/changelog
index 2df330d..8985ef8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xawtv (3.82) unstable; urgency=low
+
+ * new release (closes: #173791).
+
+ -- Gerd Knorr <kraxel@debian.org> Sat, 28 Dec 2002 13:38:59 +0100
+
xawtv (3.81) unstable; urgency=low
* new release (closes: #171346, #171812, #171470).
diff --git a/debian/control b/debian/control
index 27380cb..6cea323 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
Source: xawtv
Section: graphics
Priority: extra
-Build-Depends: libjpeg-dev, libncurses5-dev, xlibs-dev (>= 4.0.1), liblircclient-dev, debhelper, xutils, xbase-clients, aalib1-dev, libasound2-dev, libzvbi-dev (>= 0.2.1), libquicktime-dev, libxaw7-dev, recode
+Build-Depends: libjpeg-dev, libncurses5-dev, xlibs-dev (>= 4.0.1), liblircclient-dev, debhelper, xutils, xbase-clients, aalib1-dev, libasound2-dev, libzvbi-dev (>= 0.2.1), libquicktime-dev, libxaw7-dev
Maintainer: Gerd Knorr <kraxel@debian.org>
Standards-Version: 3.5.7.1
diff --git a/debug/Subdir.mk b/debug/Subdir.mk
index 305d021..e5beb35 100644
--- a/debug/Subdir.mk
+++ b/debug/Subdir.mk
@@ -6,9 +6,9 @@ TARGETS-debug += \
debug/xvideo
endif
-debug/xvideo: debug/xvideo.o
+debug/xvideo: debug/xvideo.o
-debug/xvideo : LDLIBS += $(ATHENA_LIBS)
+debug/xvideo : LDLIBS += $(ATHENA_LIBS)
# global targets
all:: $(TARGETS-debug)
diff --git a/libng/contrib-plugins/Subdir.mk b/libng/contrib-plugins/Subdir.mk
index a34a2c4..f729bdf 100644
--- a/libng/contrib-plugins/Subdir.mk
+++ b/libng/contrib-plugins/Subdir.mk
@@ -13,7 +13,8 @@ TARGETS-contrib-plugins += \
endif
# alsa is c++ and thus we should call g++ for linking ...
-libng/contrib-plugins/snd-alsa.so : CC := $(CXX)
+libng/contrib-plugins/snd-alsa.so : CC := $(CXX)
+libng/contrib-plugins/snd-alsa.so : LDLIBS := $(ALSA_LIBS)
# linear-blend has mmx support ...
ifeq ($(USE_MMX),yes)
diff --git a/libng/grab-ng.c b/libng/grab-ng.c
index f5ea7d7..6ed2a1e 100644
--- a/libng/grab-ng.c
+++ b/libng/grab-ng.c
@@ -516,8 +516,8 @@ ng_conv_find_match(int in, int out)
/* --------------------------------------------------------------------- */
const struct ng_vid_driver*
-ng_vid_open(char *device, struct ng_video_fmt *screen, void *base,
- void **handle)
+ng_vid_open(char *device, char *driver, struct ng_video_fmt *screen,
+ void *base, void **handle)
{
int i;
@@ -541,6 +541,8 @@ ng_vid_open(char *device, struct ng_video_fmt *screen, void *base,
if (NULL == ng_vid_drivers)
return NULL;
for (i = 0; NULL != ng_vid_drivers[i]; i++) {
+ if (driver && 0 != strcasecmp(driver, ng_vid_drivers[i]->name))
+ continue;
if (ng_debug)
fprintf(stderr,"vid-open: trying: %s... \n",
ng_vid_drivers[i]->name);
@@ -839,7 +841,7 @@ void
ng_init(void)
{
static int once=0;
- int count;
+ int count=0;
if (once++) {
fprintf(stderr,"panic: ng_init called twice\n");
@@ -850,10 +852,12 @@ ng_init(void)
ng_color_yuv2rgb_init();
ng_writefile_init();
- count = ng_plugins(LIBDIR);
- if (0 == count)
+ count += ng_plugins(LIBDIR);
+ if (0 == count) {
/* nice for development */
- count = ng_plugins("../libng/plugins");
+ count += ng_plugins("../libng/plugins");
+ count += ng_plugins("../libng/contrib-plugins");
+ }
if (0 == count)
fprintf(stderr,"WARNING: no plugins found [%s]\n",LIBDIR);
}
diff --git a/libng/grab-ng.h b/libng/grab-ng.h
index a0170b3..1fc35cc 100644
--- a/libng/grab-ng.h
+++ b/libng/grab-ng.h
@@ -399,7 +399,7 @@ struct ng_video_conv* ng_conv_find_to(int out, int *i);
struct ng_video_conv* ng_conv_find_from(int out, int *i);
struct ng_video_conv* ng_conv_find_match(int in, int out);
-const struct ng_vid_driver* ng_vid_open(char *device,
+const struct ng_vid_driver* ng_vid_open(char *device, char *driver,
struct ng_video_fmt *screen,
void *base, void **handle);
const struct ng_dsp_driver* ng_dsp_open(char *device, struct ng_audio_fmt *fmt,
diff --git a/build-test b/scripts/build-test
index 7f1509f..7f1509f 100644
--- a/build-test
+++ b/scripts/build-test
diff --git a/vbistuff/alevtd.c b/vbistuff/alevtd.c
index 96d8b2f..dbd1992 100644
--- a/vbistuff/alevtd.c
+++ b/vbistuff/alevtd.c
@@ -23,7 +23,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#ifdef __linux__
-# include <linux/videodev.h>
+# include "videodev.h"
#endif
#include "httpd.h"
diff --git a/x11/MoTV-de b/x11/MoTV-de
index 3a4adaa..cc7441d 100644
--- a/x11/MoTV-de
+++ b/x11/MoTV-de
@@ -10,25 +10,6 @@
! ----------------------------------------------------------------------------
-! fonts [i18n]
-
-*renderTable:
-*renderTable.fontType: FONT_IS_FONTSET
-*renderTable.fontName: \
- -*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*
-
-MoTV.onscreen.label.renderTable:
-MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
-
-MoTV.vtx.label.renderTable:
-MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
-MoTV.vtx.label.renderTable.fontName: 10x20
-
-
-! ----------------------------------------------------------------------------
! strings [i18n]
MoTV.about_box_popup.title: Über motv
diff --git a/x11/MoTV-default b/x11/MoTV-default
index fa0ab0f..0d06b36 100644
--- a/x11/MoTV-default
+++ b/x11/MoTV-default
@@ -10,25 +10,6 @@
! ----------------------------------------------------------------------------
-! fonts [i18n]
-
-*renderTable:
-*renderTable.fontType: FONT_IS_FONTSET
-*renderTable.fontName: \
- -*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*
-
-MoTV.onscreen.label.renderTable:
-MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
-
-MoTV.vtx.label.renderTable:
-MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
-MoTV.vtx.label.renderTable.fontName: 10x20
-
-
-! ----------------------------------------------------------------------------
! strings [i18n]
MoTV.about_box_popup.title: About motv
diff --git a/x11/MoTV-fixed b/x11/MoTV-fixed
index e60c5b3..a21affe 100644
--- a/x11/MoTV-fixed
+++ b/x11/MoTV-fixed
@@ -1,4 +1,35 @@
! ----------------------------------------------------------------------------
+! fonts
+
+*renderTable:
+*renderTable.fontType: FONT_IS_FONTSET
+*renderTable.fontName: \
+ -adobe-helvetica-medium-r-normal-*-14-*-*-*-p-*-iso8859-*, \
+ -cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r, \
+ -*-lucida-medium-r-normal-*-14-*-*-*-p-*-iso8859-*, \
+ -gnu-unifont-medium-r-normal--16-*-*-*-p-*-*-*, \
+ -efont-biwidth-medium-r-normal--16-*-*-*-*-*-*-*, \
+ -*-*-medium-r-normal-*-14-*-*-*-p-*-*-*, \
+ -*-*-medium-r-normal-*-16-*-*-*-p-*-*-*, \
+ -*-*-*-*-*-*-14-*-*-*-*-*-*-*, \
+ -*-*-*-*-*-*-16-*-*-*-*-*-*-*, \
+ *
+
+MoTV.onscreen.label.renderTable:
+MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
+MoTV.onscreen.label.renderTable.fontName: \
+ -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*, \
+ -*-fixed-medium-r-normal--20-*-*-*-*-*-*, \
+ *
+
+MoTV.vtx.label.renderTable:
+MoTV.vtx.label.renderTable.fontType: FONT_IS_FONTSET
+MoTV.vtx.label.renderTable.fontName: \
+ -*-fixed-medium-r-normal--20-*-*-*-*-*-*, \
+ *
+
+
+! ----------------------------------------------------------------------------
! main window
MoTV.geometry: 320x240+50+50
@@ -305,10 +336,16 @@ MoTV.man_popup*label.marginHeight: 5
MoTV.man_popup*label.renderTable: bold,underline
MoTV.man_popup*label.renderTable.fontType: FONT_IS_FONTSET
MoTV.man_popup*label.renderTable.fontName: \
- -*-fixed-medium-r-normal--13-*-*-*-*-*
+ -*-fixed-medium-r-normal--13-*-*-*-*-*-iso8859-*, \
+ -*-fixed-medium-r-normal-ja-13-*-*-*-*-*-iso10646-1, \
+ -gnu-unifont-medium-r-normal--16-*-*-*-*-*-*-*, \
+ *
MoTV.man_popup*label.renderTable.bold.fontType: FONT_IS_FONTSET
MoTV.man_popup*label.renderTable.bold.fontName: \
- -*-fixed-bold-r-normal--13-*-*-*-*-*
+ -*-fixed-bold-r-normal--13-*-*-*-*-*-iso8859-*, \
+ -*-fixed-medium-r-normal-ja-13-*-*-*-*-*-iso10646-1, \
+ -gnu-unifont-bold-r-normal--16-*-*-*-*-*-*-*, \
+ *
MoTV.man_popup*label.renderTable.underline.underlineType: SINGLE_LINE
diff --git a/x11/MoTV-fr b/x11/MoTV-fr
index 86903cf..f2c9748 100644
--- a/x11/MoTV-fr
+++ b/x11/MoTV-fr
@@ -10,25 +10,6 @@
! ----------------------------------------------------------------------------
-! fonts [i18n]
-
-*renderTable:
-*renderTable.fontType: FONT_IS_FONTSET
-*renderTable.fontName: \
- -*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*
-
-MoTV.onscreen.label.renderTable:
-MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
-
-MoTV.vtx.label.renderTable:
-MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
-MoTV.vtx.label.renderTable.fontName: 10x20
-
-
-! ----------------------------------------------------------------------------
! strings [i18n]
MoTV.about_box_popup.title: A propos de motv
diff --git a/x11/MoTV-it b/x11/MoTV-it
index fbaed71..ab95517 100644
--- a/x11/MoTV-it
+++ b/x11/MoTV-it
@@ -11,25 +11,6 @@
! ----------------------------------------------------------------------------
-! fonts [i18n]
-
-*renderTable:
-*renderTable.fontType: FONT_IS_FONTSET
-*renderTable.fontName: \
- -*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*
-
-MoTV.onscreen.label.renderTable:
-MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
-
-MoTV.vtx.label.renderTable:
-MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
-MoTV.vtx.label.renderTable.fontName: 10x20
-
-
-! ----------------------------------------------------------------------------
! strings [i18n]
MoTV.about_box_popup.title: Info su motv
diff --git a/x11/Subdir.mk b/x11/Subdir.mk
index f9b9fe0..e4f801a 100644
--- a/x11/Subdir.mk
+++ b/x11/Subdir.mk
@@ -165,7 +165,7 @@ x11/MoTV.%.ad: x11/MoTV-%
cat $< $(srcdir)/x11/MoTV-fixed > $@
x11/MoTV.de_DE.UTF-8.ad: x11/MoTV.de.ad
- recode latin1..utf8 < $< > $@
+ iconv -f iso-8859-1 -t utf-8 < $< > $@
install-motv-%:
$(INSTALL_DIR) $(resdir)/$*/app-defaults
diff --git a/x11/Xawtv.ad b/x11/Xawtv.ad
index f7b44c2..9c256a7 100644
--- a/x11/Xawtv.ad
+++ b/x11/Xawtv.ad
@@ -4,12 +4,11 @@
Xawtv*international: true
Xawtv*font: 7x13bold
-Xawtv*fontSet: -*-fixed-bold-R-*-*-*-120-*-*-*-*,-*-*-*-R-*-*-*-120-*-*-*-*,fixed
+Xawtv*fontSet: -*-lucidatypewriter-bold-r-normal-*-14-*-*-*-m-*-iso8859-*,-*-courier-bold-r-normal-*-14-*-*-*-m-*-iso8859-*,-gnu-unifont-bold-r-normal--16-*-*-*-c-*-*-*,-efont-biwidth-bold-r-normal--16-*-*-*-*-*-*-*,-*-*-bold-r-normal-*-16-*-*-*-m-*-*-*,-*-*-bold-r-normal-*-16-*-*-*-c-*-*-*,-*-*-*-*-*-*-16-*-*-*-*-*-*-*,*
TopLevelShell*international: true
TopLevelShell*font: 7x13bold
-TopLevelShell*fontSet: -*-fixed-bold-R-*-*-*-120-*-*-*-*,-*-*-*-R-*-*-*-120-*-*-*-*,fixed
-
+TopLevelShell*fontSet: -*-lucidatypewriter-bold-r-normal-*-14-*-*-*-m-*-iso8859-*,-*-courier-bold-r-normal-*-14-*-*-*-m-*-iso8859-*,-gnu-unifont-bold-r-normal--16-*-*-*-c-*-*-*,-efont-biwidth-bold-r-normal--16-*-*-*-*-*-*-*,-*-*-bold-r-normal-*-16-*-*-*-m-*-*-*,-*-*-bold-r-normal-*-16-*-*-*-c-*-*-*,-*-*-*-*-*-*-16-*-*-*-*-*-*-*,*
*popup_help.title: Welcome to xawtv!
xawtv.tv.help: \
diff --git a/x11/atoms.c b/x11/atoms.c
index 85d51e4..ead826b 100644
--- a/x11/atoms.c
+++ b/x11/atoms.c
@@ -9,7 +9,10 @@ Atom WM_DELETE_WINDOW;
Atom _NET_SUPPORTED;
Atom _NET_WM_STATE;
Atom _NET_WM_STATE_STAYS_ON_TOP;
+Atom _NET_WM_STATE_ABOVE;
+Atom _NET_WM_STATE_FULLSCREEN;
Atom _WIN_SUPPORTING_WM_CHECK;
+Atom _WIN_PROTOCOLS;
Atom _WIN_LAYER;
/* ipc: xawtv, xscreensaver */
@@ -51,37 +54,40 @@ Atom XV_ENCODING;
Atom XV_FREQ;
Atom XV_COLORKEY;
+#define INIT_ATOM(dpy,atom) atom = XInternAtom(dpy,#atom,False)
+
void init_atoms(Display *dpy)
{
- WM_PROTOCOLS = XInternAtom(dpy, "WM_PROTOCOLS", False);
- WM_DELETE_WINDOW = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
+ INIT_ATOM(dpy, WM_PROTOCOLS);
+ INIT_ATOM(dpy, WM_DELETE_WINDOW);
+ INIT_ATOM(dpy, _NET_SUPPORTED);
+ INIT_ATOM(dpy, _NET_WM_STATE);
+ INIT_ATOM(dpy, _NET_WM_STATE_STAYS_ON_TOP);
+ INIT_ATOM(dpy, _NET_WM_STATE_ABOVE);
+ INIT_ATOM(dpy, _NET_WM_STATE_FULLSCREEN);
+ INIT_ATOM(dpy, _WIN_SUPPORTING_WM_CHECK);
+ INIT_ATOM(dpy, _WIN_PROTOCOLS);
+ INIT_ATOM(dpy, _WIN_LAYER);
- _NET_SUPPORTED = XInternAtom(dpy, "_NET_SUPPORTED", False);
- _NET_WM_STATE = XInternAtom(dpy, "_NET_WM_STATE", False);
- _NET_WM_STATE_STAYS_ON_TOP =
- XInternAtom(dpy, "_NET_WM_STATE_STAYS_ON_TOP", False);
- _WIN_SUPPORTING_WM_CHECK =
- XInternAtom(dpy, "_WIN_SUPPORTING_WM_CHECK", False);
- _WIN_LAYER = XInternAtom(dpy, "_WIN_LAYER", False);
+ INIT_ATOM(dpy, _NETSCAPE_URL);
+
+ INIT_ATOM(dpy, _XAWTV_STATION);
+ INIT_ATOM(dpy, _XAWTV_REMOTE);
- _XAWTV_STATION = XInternAtom(dpy, "_XAWTV_STATION", False);
- _XAWTV_REMOTE = XInternAtom(dpy, "_XAWTV_REMOTE", False);
+ INIT_ATOM(dpy, XV_MUTE);
+ INIT_ATOM(dpy, XV_ENCODING);
+ INIT_ATOM(dpy, XV_FREQ);
+ INIT_ATOM(dpy, XV_COLORKEY);
+
+ INIT_ATOM(dpy, _MOTIF_CLIPBOARD_TARGETS);
+ INIT_ATOM(dpy, _MOTIF_DEFERRED_CLIPBOARD_TARGETS);
+ INIT_ATOM(dpy, _MOTIF_SNAPSHOT);
+ INIT_ATOM(dpy, _MOTIF_DROP);
+ INIT_ATOM(dpy, _MOTIF_EXPORT_TARGETS);
+ INIT_ATOM(dpy, _MOTIF_LOSE_SELECTION);
XA_DEACTIVATE = XInternAtom(dpy, "DEACTIVATE", False);
- _MOTIF_CLIPBOARD_TARGETS =
- XInternAtom(dpy,"_MOTIF_CLIPBOARD_TARGETS", False);
- _MOTIF_DEFERRED_CLIPBOARD_TARGETS =
- XInternAtom(dpy,"_MOTIF_DEFERRED_CLIPBOARD_TARGETS", False);
- _MOTIF_SNAPSHOT =
- XInternAtom(dpy,"_MOTIF_SNAPSHOT", False);
- _MOTIF_DROP =
- XInternAtom(dpy,"_MOTIF_DROP", False);
- _MOTIF_EXPORT_TARGETS =
- XInternAtom(dpy,"_MOTIF_EXPORT_TARGETS", False);
- _MOTIF_LOSE_SELECTION =
- XInternAtom(dpy,"_MOTIF_LOSE_SELECTION", False);
-
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
XA_DONE = XInternAtom(dpy, "DONE", False);
XA_CLIPBOARD = XInternAtom(dpy, "CLIPBOARD", False);
@@ -101,10 +107,4 @@ void init_atoms(Display *dpy)
MIME_IMAGE_JPEG = XInternAtom(dpy, "image/jpeg", False);
MIME_TEXT_URI_LIST = XInternAtom(dpy, "text/uri-list", False);
- _NETSCAPE_URL = XInternAtom(dpy, "_NETSCAPE_URL", False);
-
- XV_MUTE = XInternAtom(dpy, "XV_MUTE", False);
- XV_ENCODING = XInternAtom(dpy, "XV_ENCODING", False);
- XV_FREQ = XInternAtom(dpy, "XV_FREQ", False);
- XV_COLORKEY = XInternAtom(dpy, "XV_COLORKEY", False);
}
diff --git a/x11/atoms.h b/x11/atoms.h
index 3d20e7a..c69b51b 100644
--- a/x11/atoms.h
+++ b/x11/atoms.h
@@ -8,7 +8,10 @@ extern Atom WM_DELETE_WINDOW;
extern Atom _NET_SUPPORTED;
extern Atom _NET_WM_STATE;
extern Atom _NET_WM_STATE_STAYS_ON_TOP;
+extern Atom _NET_WM_STATE_ABOVE;
+extern Atom _NET_WM_STATE_FULLSCREEN;
extern Atom _WIN_SUPPORTING_WM_CHECK;
+extern Atom _WIN_PROTOCOLS;
extern Atom _WIN_LAYER;
/* ipc: xawtv, xscreensaver */
diff --git a/x11/v4lctl.c b/x11/v4lctl.c
index 4a7bece..b916623 100644
--- a/x11/v4lctl.c
+++ b/x11/v4lctl.c
@@ -37,7 +37,7 @@ Display *dpy;
static void
grabber_init(void)
{
- drv = ng_vid_open(ng_dev.video,NULL,0,&h_drv);
+ drv = ng_vid_open(ng_dev.video,NULL,NULL,0,&h_drv);
if (NULL == drv) {
fprintf(stderr,"no grabber device available\n");
exit(1);
diff --git a/x11/wmhooks.c b/x11/wmhooks.c
index 1ca0356..6e5dc77 100644
--- a/x11/wmhooks.c
+++ b/x11/wmhooks.c
@@ -17,6 +17,7 @@
/* ------------------------------------------------------------------------ */
void (*wm_stay_on_top)(Display *dpy, Window win, int state) = NULL;
+void (*wm_fullscreen)(Display *dpy, Window win, int state) = NULL;
/* ------------------------------------------------------------------------ */
@@ -26,29 +27,46 @@ extern int debug;
#define _NET_WM_STATE_ADD 1 /* add/set property */
static void
-net_wm_stay_on_top(Display *dpy, Window win, int state)
+netwm_set_state(Display *dpy, Window win, int operation, Atom state)
{
XEvent e;
+ memset(&e,0,sizeof(e));
e.xclient.type = ClientMessage;
e.xclient.message_type = _NET_WM_STATE;
e.xclient.display = dpy;
e.xclient.window = win;
e.xclient.format = 32;
- e.xclient.data.l[0] = (state == 1)
- ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
- e.xclient.data.l[1] = _NET_WM_STATE_STAYS_ON_TOP;
- e.xclient.data.l[2] = 0l;
- e.xclient.data.l[3] = 0l;
- e.xclient.data.l[4] = 0l;
+ e.xclient.data.l[0] = operation;
+ e.xclient.data.l[1] = state;
XSendEvent(dpy, DefaultRootWindow(dpy), False,
SubstructureRedirectMask, &e);
}
+static void
+netwm_stay_on_top(Display *dpy, Window win, int state)
+{
+ int op = state ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+ netwm_set_state(dpy,win,op,_NET_WM_STATE_ABOVE);
+}
+
+static void
+netwm_old_stay_on_top(Display *dpy, Window win, int state)
+{
+ int op = state ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+ netwm_set_state(dpy,win,op,_NET_WM_STATE_STAYS_ON_TOP);
+}
+
+static void
+netwm_fullscreen(Display *dpy, Window win, int state)
+{
+ int op = state ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+ netwm_set_state(dpy,win,op,_NET_WM_STATE_FULLSCREEN);
+}
+
/* ------------------------------------------------------------------------ */
-#define WIN_LAYER_ONBOTTOM 2
#define WIN_LAYER_NORMAL 4
#define WIN_LAYER_ONTOP 6
@@ -66,11 +84,7 @@ gnome_stay_on_top(Display *dpy, Window win, int state)
xev.window = win;
xev.message_type = _WIN_LAYER;
xev.format = 32;
- switch (state) {
- case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break;
- case 0: xev.data.l[0] = WIN_LAYER_NORMAL; break;
- case 1: xev.data.l[0] = WIN_LAYER_ONTOP; break;
- }
+ xev.data.l[0] = state ? WIN_LAYER_ONTOP : WIN_LAYER_NORMAL;
XSendEvent(dpy,DefaultRootWindow(dpy),False,
SubstructureNotifyMask,(XEvent*)&xev);
if (state)
@@ -79,37 +93,74 @@ gnome_stay_on_top(Display *dpy, Window win, int state)
/* ------------------------------------------------------------------------ */
-int
-wm_detect(Display *dpy)
+static int
+wm_check_capability(Display *dpy, Window root, Atom list, Atom wanted)
{
Atom type;
- int format;
+ int format,i;
unsigned long nitems, bytesafter;
- unsigned char *args = NULL;
+ unsigned char *args;
+ unsigned long *ldata;
+ char *name;
+ int retval = -1;
+
+ if (Success != XGetWindowProperty
+ (dpy, root, list, 0, (65536 / sizeof(long)), False,
+ AnyPropertyType, &type, &format, &nitems, &bytesafter, &args))
+ return -1;
+ if (type != XA_ATOM)
+ return -1;
+ ldata = (unsigned long*)args;
+ for (i = 0; i < nitems; i++) {
+ if (ldata[i] == wanted)
+ retval = 0;
+ if (debug > 1) {
+ name = XGetAtomName(dpy,ldata[i]);
+ fprintf(stderr,"wm cap: %s\n",name);
+ XFree(name);
+ }
+ }
+ XFree(ldata);
+ return retval;
+}
+
+int
+wm_detect(Display *dpy)
+{
Window root = DefaultRootWindow(dpy);
- /* netwm compliant */
- if (Success == XGetWindowProperty
- (dpy, root, _NET_SUPPORTED, 0, (65536 / sizeof(long)), False,
- AnyPropertyType, &type, &format, &nitems, &bytesafter, &args) &&
- nitems > 0) {
+ /* netwm checks */
+ if (NULL == wm_stay_on_top &&
+ 0 == wm_check_capability(dpy,root,_NET_SUPPORTED,
+ _NET_WM_STATE_ABOVE)) {
+ if (debug)
+ fprintf(stderr,"wmhooks: netwm state above\n");
+ wm_stay_on_top = netwm_stay_on_top;
+ return 0;
+ }
+ if (NULL == wm_stay_on_top &&
+ 0 == wm_check_capability(dpy,root,_NET_SUPPORTED,
+ _NET_WM_STATE_STAYS_ON_TOP)) {
+ if (debug)
+ fprintf(stderr,"wmhooks: netwm state stays_on_top\n");
+ wm_stay_on_top = netwm_old_stay_on_top;
+ return 0;
+ }
+ if (NULL == wm_fullscreen &&
+ 0 == wm_check_capability(dpy,root,_NET_SUPPORTED,
+ _NET_WM_STATE_FULLSCREEN)) {
if (debug)
- fprintf(stderr,"wmhooks: netwm\n");
- wm_stay_on_top = net_wm_stay_on_top;
- XFree(args);
+ fprintf(stderr,"wmhooks: netwm state fullscreen\n");
+ wm_fullscreen = netwm_fullscreen;
return 0;
}
- /* gnome-compilant */
- if (Success == XGetWindowProperty
- (dpy, root, _WIN_SUPPORTING_WM_CHECK, 0, (65536 / sizeof(long)), False,
- AnyPropertyType, &type, &format, &nitems, &bytesafter, &args) &&
- nitems > 0) {
+ /* gnome checks */
+ if (NULL == wm_stay_on_top &&
+ 0 == wm_check_capability(dpy,root,_WIN_PROTOCOLS,_WIN_LAYER)) {
if (debug)
- fprintf(stderr,"wmhooks: gnome\n");
- /* FIXME: check capabilities */
+ fprintf(stderr,"wmhooks: gnome layer\n");
wm_stay_on_top = gnome_stay_on_top;
- XFree(args);
return 0;
}
diff --git a/x11/wmhooks.h b/x11/wmhooks.h
index 9488482..3b97102 100644
--- a/x11/wmhooks.h
+++ b/x11/wmhooks.h
@@ -1,2 +1,3 @@
int wm_detect(Display *dpy);
void (*wm_stay_on_top)(Display *dpy, Window win, int state);
+void (*wm_fullscreen)(Display *dpy, Window win, int state);
diff --git a/x11/xt.c b/x11/xt.c
index fcc97cc..c8d6f20 100644
--- a/x11/xt.c
+++ b/x11/xt.c
@@ -1,7 +1,7 @@
/*
* common X11 stuff (mostly libXt level) moved here from main.c
*
- * (c) 1997-2000 Gerd Knorr <kraxel@goldbach.in-berlin.de>
+ * (c) 1997-2002 Gerd Knorr <kraxel@bytesex.org>
*
*/
@@ -25,7 +25,7 @@
#if defined(__linux__)
# include <sys/ioctl.h>
-# include <linux/videodev.h>
+# include "videodev.h"
#endif
#include "config.h"
@@ -138,6 +138,11 @@ XtResource args_desc[] = {
XtOffset(struct ARGS*,device),
XtRString, NULL
},{
+ "driver",
+ XtCString, XtRString, sizeof(char*),
+ XtOffset(struct ARGS*,driver),
+ XtRString, NULL
+ },{
"dspdev",
XtCString, XtRString, sizeof(char*),
XtOffset(struct ARGS*,dspdev),
@@ -262,6 +267,7 @@ const int args_count = XtNumber(args_desc);
XrmOptionDescRec opt_desc[] = {
{ "-c", "device", XrmoptionSepArg, NULL },
{ "-device", "device", XrmoptionSepArg, NULL },
+ { "-driver", "driver", XrmoptionSepArg, NULL },
{ "-C", "dspdev", XrmoptionSepArg, NULL },
{ "-dspdev", "dspdev", XrmoptionSepArg, NULL },
{ "-vbidev", "vbidev", XrmoptionSepArg, NULL },
@@ -824,6 +830,15 @@ do_fullscreen(void)
Window root,child;
int wpx,wpy,mask;
+ if (wm_fullscreen) {
+ /* full service for us :-) */
+ fs = !fs;
+ if (debug)
+ fprintf(stderr,"fullscreen %s via netwm\n", fs ? "on" : "off");
+ wm_fullscreen(dpy,XtWindow(app_shell),fs);
+ return;
+ }
+
if (fs) {
if (debug)
fprintf(stderr,"turning fs off (%dx%d+%d+%d)\n",w,h,x,y);
@@ -1236,7 +1251,7 @@ grabber_init()
if (!do_overlay) {
if (debug)
fprintf(stderr,"x11: remote display (overlay disabled)\n");
- drv = ng_vid_open(args.device, NULL, base, &h_drv);
+ drv = ng_vid_open(args.device, args.driver, NULL, base, &h_drv);
} else {
screen.width = XtScreen(app_shell)->width;
screen.height = XtScreen(app_shell)->height;
@@ -1249,7 +1264,7 @@ grabber_init()
screen.bytesperline,
have_dga ? ", DGA" : "",
have_vm ? ", VidMode" : "");
- drv = ng_vid_open(args.device, &screen, base, &h_drv);
+ drv = ng_vid_open(args.device, args.driver, &screen, base, &h_drv);
}
if (NULL == drv) {
fprintf(stderr,"no video grabber device available\n");
@@ -1283,7 +1298,8 @@ grabber_scan(void)
}
close(fh);
- driver = ng_vid_open(ng_dev.video_scan[i], NULL, NULL, &handle);
+ driver = ng_vid_open(ng_dev.video_scan[i], args.driver,
+ NULL, NULL, &handle);
if (NULL == driver) {
fprintf(stderr,"%s: initialization failed\n",ng_dev.video_scan[i]);
continue;
diff --git a/x11/xt.h b/x11/xt.h
index 46b9902..3492860 100644
--- a/x11/xt.h
+++ b/x11/xt.h
@@ -2,6 +2,7 @@
struct ARGS {
/* char */
char *device;
+ char *driver;
char *dspdev;
char *vbidev;
char *joydev;
diff --git a/xawtv.spec b/xawtv.spec
index 8b6362b..0b1fe8b 100644
--- a/xawtv.spec
+++ b/xawtv.spec
@@ -1,7 +1,7 @@
Name: xawtv
Group: Applications/Multimedia
Autoreqprov: on
-Version: 3.81
+Version: 3.82
Release: 0
License: GPL
Summary: v4l applications

Privacy Policy