Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5 closed defect (fixed)

xscreensaver disabler stopped working

Reported by: waschk@… Owned by: reimar
Priority: normal Component: vo
Version: unspecified Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

With the recent upgrade from xscreensaver 4.15 to 4.16, mplayer's disable
xscreensaver stopped working when using -vo sdl. When I switch to -vo xv,
everything's working as expected. With xscreensaver 4.15, it was working with
-vo sdl too.

Hardware:
Intel Pentium 4, Radeon 9100 board using the open source radeon driver.

Software:
This is on Mandrakelinux 10.1 (Cooker) with mplayer-cvs 20040628 compiled using
Mandrake's unofficial gcc:
[goetz@n5 goetz]$ gcc --version
gcc (GCC) 3.4.1 (Mandrakelinux (Cooker) 3.4.1-0.3mdk)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm running kernel 2.6.7rc2

X is version xorg 6.7.0.

I'll report the output of mplayer tomorrow, but the message said that it
disabled the screensaver.

Attachments (4)

mplayer-vo-sdl.txt (7.2 KB) - added by waschk@… 14 years ago.
output of mplayer -vo sdl
mplayer-vo-xv.txt (7.6 KB) - added by waschk@… 14 years ago.
output of mplayer -vo xv
scr-test.diff (614 bytes) - added by reimar 14 years ago.
first draft of a fix
scr-test2.diff (1.4 KB) - added by reimar 14 years ago.
fix, second try

Download all attachments as: .zip

Change History (17)

Changed 14 years ago by waschk@…

output of mplayer -vo sdl

comment:1 Changed 14 years ago by waschk@…

Changed 14 years ago by waschk@…

output of mplayer -vo xv

comment:2 Changed 14 years ago by waschk@…

comment:3 Changed 14 years ago by reimar

The problem seems to be that saver_on and saver_off functions in x11_common.c
have a parameter mDisplay to select the X Display, while xscreensaver_heartbeat
uses the global (in x11_common.c) mDisplay variable.
This variable isn't set when using vo_sdl, as it doesn't use vo_init (also in
x11_common.c).
Not sure whether the correct fix is to make vo_sdl use vo_init or to modify
xscreensaver_heartbeat or saver_on and saver_off...
Anyway, please try the attached patch to find out if my theory is right.

Changed 14 years ago by reimar

first draft of a fix

comment:4 Changed 14 years ago by reimar

comment:5 Changed 14 years ago by reimar

  • Owner changed from moritz@… to Reimar.Doeffinger@…

comment:6 Changed 14 years ago by waschk@…

With that patch, mplayer segfaults on vo initialisation.

comment:7 Changed 14 years ago by reimar

Could you provide more information? Like a gdb backtrace (you will have to
configure --enable-debug=2).
For me it causes a segfault when quitting MPlayer, which isn't unexpected as the
patch is a really ugly quick hack, but before trying to make a real patch I'd
like to know if I guessed the reason correctly...

comment:8 Changed 14 years ago by waschk@…

[goetz@abgrund MPlayer]$ gdb ./mplayer
GNU gdb 6.1-1mdk (Mandrake Linux)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run -nofs /home/goetz/videos/old/alias.2x12.the_getaway.ws_dvdrip_xvid-fov.avi
Starting program: /home/goetz/RPM/BUILD/MPlayer/mplayer -nofs
/home/goetz/videos/old/alias.2x12.the_getaway.ws_dvdrip_xvid-fov.avi
[Thread debugging using libthread_db enabled]
[New Thread 1090315488 (LWP 31788)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale

MPlayer dev-CVS-040628-10:42-3.4.1 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2540 MHz (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/goetz/.mplayer/config
Reading /home/goetz/.mplayer/codecs.conf: Can't open
'/home/goetz/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 73 audio & 178 video codecs
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
scripts.
Using usleep() timing
Input config file /home/goetz/.mplayer/input.conf parsed: 54 binds
Opening joystick device /dev/input/js0
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.

Playing /home/goetz/videos/old/alias.2x12.the_getaway.ws_dvdrip_xvid-fov.avi.
Detaching after fork from child process 31791.
Cache fill: 0,00% (0 bytes) AVI file format detected.
VIDEO: [XVID] 640x368 16bpp 23,976 fps 1007,3 kbps (123,0 kbyte/s)
Clip info:

Software: Nandub v1.0rc2

==========================================================================
Trying to force audio codec driver family libmad...
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 16000->192000 (128,0 kbit)
Selected audio codec: [mad] afm:libmad (libMAD MPEG layer 1-2-3)
==========================================================================
SDL: Using driver: x11
Disabling DPMS
xscreensaver_disable: xscreensaver wid=10485761.
Detaching after fork from child process 31792.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
[pl_volnorm] Normalizer plugin in use.
[pl_volnorm] Normalizer plugin in use.
AO: [plugin] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 640 x 368 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,74:1 - prescaling to correct movie aspect.
VO: [sdl] 640x368 => 640x368 Planar YV12
A: 0,6 V: 0,0 A-V: 0,625 ct: 0,000 1/ 1 0% 0% 0,0% 0 0 99%
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1090315488 (LWP 31788)]
0x407ffbf2 in XSendEvent () from /usr/X11R6/lib/libX11.so.6
(gdb) bt
#0 0x407ffbf2 in XSendEvent () from /usr/X11R6/lib/libX11.so.6
#1 0x080a2260 in xscreensaver_heartbeat () at x11_common.c:1562
#2 0x0808183b in main (argc=3, argv=0xbffff454) at mplayer.c:3645
(gdb)

comment:9 Changed 14 years ago by reimar

  • Status changed from new to assigned

oh. Once you see it it's obvious it can't work ;-)
I tried a different way to fix it. Please try the next patch (and don't forget
to revert the previous one).

Changed 14 years ago by reimar

fix, second try

comment:10 Changed 14 years ago by reimar

  • attachments.isobsolete changed from 0 to 1

comment:11 Changed 14 years ago by waschk@…

That patch worked for me, thanks.

comment:12 Changed 14 years ago by reimar

  • Resolution set to fixed
  • Status changed from assigned to closed

I will try to get this into CVS. If you experience any problems with that patch,
please report.

comment:13 Changed 14 years ago by reimar

was applied into CVS.

Note: See TracTickets for help on using tickets.