[MPlayer-dev-eng] [PATCH] Fix for broken vo_xmga support in GUI mode
Dirk Porezag
porezag at yahoo.com
Thu Oct 7 01:04:25 CEST 2010
OK the reason for all the problems that occur after applying the more aggressive
patch is that vo_screenwidth and vo_screenheight are not set up properly and
then aspect() breaks. For vo_xmga I was able to fix this by adding this simple
extra patch:
--- mga_template.c.sav 2010-10-06 23:20:19.000000000 +0200
+++ mga_template.c 2010-10-06 23:23:06.000000000 +0200
@@ -350,6 +350,7 @@
}
return VO_TRUE;
case VOCTRL_UPDATE_SCREENINFO:
+ aspect_save_screenres(vo_screenwidth, vo_screenheight);
#ifdef VO_XGMA
update_xinerama_info();
#endif
With this, vo_xmga works nicely in both GUI and non GUI modes. However vo_mga is
still broken since preinit() is not setting up vo_screenwidth and
vo_screenheight at all if this VO module is used. In fact, previous versions
didn't set up these values either, but the rest of the code was able to handle
the situation where vo_screenwidth = vo_screenheight = 0. To be honest, I'm not
sure how this should be resolved. Is it an acceptable situation to have
vo_screenwidth = vo_screenheight = 0 or should these variables be set up in all
cases? If they must be set up, I don't know where to get the screen info from.
X11 stuff cannot be used since mga is explicitly NOT relying on X11. And getting
the current screen info via mga_vid is currently not possible since there's no
ioctl that will return these values.
Any suggestions?
----- Ursprüngliche Mail ----
> Von: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> An: mplayer-dev-eng at mplayerhq.hu
> Gesendet: Sonntag, den 3. Oktober 2010, 9:28:05 Uhr
> Betreff: Re: [MPlayer-dev-eng] [PATCH] Fix for broken vo_xmga support in GUI
>mode
>
> On Sat, Oct 02, 2010 at 03:45:38PM -0700, Dirk Porezag wrote:
> > > I think it should be ok, however it should be one patch per issue it
>fixes
> >
> > > (and with a short explanation which issue that is).
> > Understood & agreed. Here we go:
> >
> > vo_xmga-fix-move.patch:
> > PROBLEM: Following recent cleanup actions in libvo/x11_common.c and related
> > files, the vo_xmga does not move the movie screen with the X window any
>more.
>
> > This fix introduces a VO_EVENT_MOVE event which is used in the vo_xmga
>module to
>
> > fix the movie screen location after a move. Other VOs are not impacted.
>
> Ok, I'll apply that (with some cosmetics) once the other stuff is solved.
>
> > vo_xmga-fix-gui-crash.patch:
> > PROBLEM: Following recent updates in the libvo section, the X11 drawable
> > vo_window is not initialized correctly any more in GUI mode. This leads to
>an
>
> > immediate crash of mplayer upon starting. The patch fixes this behavior.
> >
> > vo_xmga-fix-gui-fullscreen-flicker.patch:
> > PROBLEM: Following recent changes in libvo/x11_common.c, the check_resize()
> > function is now called much more often than in previous releases. This has
> > exposed a bug in libvo/mga_template.c:set_window(): The way the vo_dwidth
>and
>
> > vo_dheight variables are set here is inconsistent with what
> > libvo/x11_common:check_resize() does and leads to flickering due to quickly
> > oscillating changes of these variables. vo_dwidth and vo_dheight should not
>be
>
> > set by set_window() at all but managed by the more generic (vo independent)
> > functions. This patch fixes the issue (and the flickering).
>
> Since now finally with you there is someone available to test things,
> I'd like to suggest the more radical approach as in attached patch.
> This hopefully will keep MGA working beyond future changes, e.g.
> aspect scaling and panscan in windowed mode should then work without
> any further changes.
> You will need to keep that move patch on top of it, and it likely
> has some bugs, could you test (with and without Gui, and also
> -vo mga not only xmga)?
>
More information about the MPlayer-dev-eng
mailing list