[MPlayer-users] Problems with mplayer slave and wid

Anders Rune Jensen anders at gnulinux.dk
Mon May 28 21:49:32 CEST 2007


Hi

I have an application that creates an sdl window to display stuff. Now I
want to display a movie inside the sdl window and for that I create an
x11 window whose parent is the sdl's x11 window, and points mplayer to
it's wid so that it playbacks video inside that window. So far so good.
I then control mplayer using standard slave input. 

The problem is that in wid mode, mplayer still tries to register input.
So the SDL window is fighting with mplayer for input. And sometimes
(quite randomly) I'm able to control mplayer using standard keys. Even
if all input is disabled? I start mplayer using:

  -noconsolecontrols -nojoystick -nolirc -nomouseinput -nocache 
  -slave  -quiet -osdlevel 0 -vo xv

So the only input mplayer should receive is from slave input. I have
tracked the problem down to line 288 in libvo/vo_xv.c:

                vo_x11_selectinput_witherr(mDisplay, vo_window,
                                           StructureNotifyMask |
                                           KeyPressMask |
                                           PropertyChangeMask |
                                           PointerMotionMask |
                                           ButtonPressMask |
                                           ButtonReleaseMask |
                                           ExposureMask);

Looking into vo_x11_selectinput_witherr it seems that keypressmask is
never masked out?

Is this a bug in mplayer or can I do something in my app to deny mplayer
it's input?

Thanks in advance for help and thanks for a great program :)

--
Anders Rune Jensen




More information about the MPlayer-users mailing list