[MPlayer-dev-eng] [PATCH] Fix for broken vo_xmga support in GUI mode
Dirk Porezag
porezag at yahoo.com
Wed Sep 29 01:17:30 CEST 2010
Actually, removing the #ifdef VO_XMGA in mga_template.c:set_window does not
help much here. set_window will set the screen height to 960 for both GUI and
non-GUI mode. The reason why fullscreen works for non-GUI mode and it doesn't in
GUI mode is located in x11_common.c: As I have already mentioned in a previous
mail, x11_common.c:vo_x11_check_events() will call check_resize() ALWAYS if
WinID > 0 and check_resize() will reset vo_dheight to 1024. The constant
ping-pong between 1024 (check_resize) and 960 (set_window) will cause the
observed flickering.
However, in non GUI mode, WinID is always = -1 so check_resize isn't called at
all (except if a ConfigureNotify event is being processed, which happens only if
the window is really resized). I would really be grateful if someone could
explain to me why check_resize() is called ALWAYS whenever WinID > 0 (I refer to
line 821 in x11_common.c). Resizing works nicely - at least for vo_x11, vo_xv
and vo_xmga - if this call is completely abolished. It was not present in
previous versions and was only introduced in early July 2010 - what is the
reason behind it? It certainly is wasting CPU cycles with every frame displayed
so I'd really like to understand why it got there.
Nonetheless, the problem with vo_xmga flickering in GUI mode can also be fixed
by removing the vo_dwitdh and vo_dheight assignments in vo_xmga.c:set_window.
These assignments are not necessary since dwidth/dheight are managed nicely from
the non VO specfic parts of the code. Everything works and looks nicely without
these assignments (even with subtitles and in panscan mode).
But still, I'd like to understand why check_resize is called so often in
vo_x11_check_events.
Thanks,
Dirk
----- Ursprüngliche Mail ----
> Von: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> An: mplayer-dev-eng at mplayerhq.hu
> Gesendet: Montag, den 27. September 2010, 6:57:13 Uhr
> Betreff: Re: [MPlayer-dev-eng] [PATCH] Fix for broken vo_xmga support in GUI
>mode
>
> On Sun, Sep 26, 2010 at 01:52:21PM -0700, Dirk Porezag wrote:
> > I assume that the handling in mga_template.c:set_window() is incorrect but
> > before I do something stupid please answer me the following questions:
> >
> > 1. What's the exact meaning of vo_dwidth/vo_dheight and
> > vo_screenwidth/vo_screenheight? Size of the window available to mplayer
>(e.g.
>
> > real fullscreen in fullscreen mode) or the size of the movie on screen
> > (excluding potential "blacked out" areas)?
> >
> > 2. What should these values be in fullscreen mode?
>
> In the past they had wildly varying meaning, but nowadays they are supposed
> to be the size of the full window.
> Which btw. should mean you can just get rid of the whole
> #ifdef VO_XMGA in set_window.
> If you just remove the modification of these values in set_window things
> should mostly work.
> Only the subtitle drawing code I guess might be off, but I am not sure...
> it actually looks like that one might behave more correctly after that as
> well (you'll need to use -panscan to see the difference, but that code
> is broken anyway since it only handles the width differently for panscan,
> so if the screen has a larger aspect than the video it won't work right...)
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
More information about the MPlayer-dev-eng
mailing list