[MPlayer-dev-eng] [PATCH] Fix for broken vo_xmga support in GUI mode

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Sep 26 12:43:28 CEST 2010


On Sun, Sep 26, 2010 at 03:08:11AM -0700, Dirk Porezag wrote:
> > The x11_common.c patch unfortunately is not ok, setting resize for a movement
> > is a bad idea and causes flickering and other issues with other VOs.
> > Maybe add a VO_EVENT_MOVE or so...
> 
> I have a hard time verifying that the submitted patch actually causes the 
> flickering. While I agree that VO_EVENT_RESIZE may be a bit too much for a move, 
> the SVN version as of May 16th 2010 (last working version I used) did exactly 
> this. In fact, the patch just reinstates the behavior that was present until a 
> few months ago! I don't see how flickering would be caused by this patch without 
> having an actual change in geometry just before 
> libvo/x11_common.c:vo_x11_check_events() is called

Because several vos (e.g. gl) need to reinitialize if the size is changed.
Using VO_EVENT_RESIZE would make every window movement cause a completely
useless reinitializtion.

> I have modified my patch to only generate a VO_EVENT_EXPOSE which is sufficient 
> to get the correct bevavior, at least for vo_xmga.

Great, now you are adding a bug to use another bug to hide a third bug.
Maintainability byebye.
A window movement event is _not_ an expose event (this is the bug you add).
Treating it as such will cause e.g. -vo gl to needless redraw the window on
move in a composited environment.
vo_xmga has no need to and thus should not do anything at all on a
VO_EVENT_EXPOSE (this is the bug you use).
vo_xmga needs to know when the window was moved, which currently is not
exposed (which is the bug you hide).

> But IMHO the critical point 
> here is not my change in libvo/x11_common.c:check_resize(). Even without my 
> patch I have flickering in full screen mode. After digging a little deeper, I 
> have found that my flickering problem is caused by calling check_resize pretty 
> much always before the main event processing loop in 
> libvo/x11_common.c:vo_x11_check_events():
> #-----------------------------
> if (WinID > 0)
>         ret |= check_resize();
> #-----------------------------
> This line was introduced after May 16th 2010, I haven't yet checked when and why 
> but when I deactivate it, all my flickering problems go away (but - as already 
> said - they are already present if I use the current unpatched HEAD version of 
> libvo/x11_common.c).

Possibly vo_xmga does not set vo_dwidth correctly in fullscreen, in which case it would
get a resize event all the time, reinitializing constantly.
Does this happen when you start MPlayer with -fs, when you switch to fullscreen
at runtime or in both cases.

> Enclosed is my modified patch, I'm aware of the fact that this will probably 
> need further discussion. I'll try to find the revision where the changes 
> discussed above were introduced, maybe this will shed some light on the whole 
> issue.

It will only shed light on which issues they fixed, but I doubt it will
help much with fixing vo_xmga.
A lot of stuff in libvo/ was cleaned up, code deduplicated, behaviour
made consistent etc.
Some of these changes need changes in the individual vos to work 100%
right, and vo_xmga was never fully updated because of the lack of
hardware to test any changes properly.


More information about the MPlayer-dev-eng mailing list