[MPlayer-dev-eng] [PATCH] factor common code to handle -wid, vo_gc creation etc. out into x11_common.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Nov 16 19:07:43 CET 2008


On Sun, Nov 16, 2008 at 07:58:14PM +0200, Ivan Kalvachev wrote:
> On 11/16/08, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > Hello,
> > attached patch gets rid of a large part of massive code duplication.
> > The reason I am sending this as a patch first is that I can't test most
> > -vos, though I do not think anything will break besides where the
> > behaviour was previously inconsistent between vos.
> > Since I am almost the only one working on libvo stuff I will only give a
> > few days to test/object though.
> > In a next step I will probably move the CONFIG_XF86VM stuff, too, though
> > that will have the side effect that for vos that do not support it, when
> > -vm is specified on the command line it will no longer be ignored but
> > instead break things completely - IMO this is acceptable.
> 
> The following code vanishes without explanation:
> 
> -     XGetGeometry(mDisplay, vo_window, &mRoot,
> -                      &drwX, &drwY, &vo_dwidth, &vo_dheight,
> -                      &drwBorderWidth, &drwDepth);
> -         aspect_save_prescale(vo_dwidth, vo_dheight);

Not really, it is in x11_common.c, the line
 if (WinID) vo_x11_update_geometry();
(note that of the values set here only vo_dwidth and vo_dheight were actually ever used).
The aspect_save_prescale indeed disappeared, some vos used it, some
didn't, it seemed like nonsense to me, and without effect in
addition since aspect is not used with non-rootwin -wid.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list