[MPlayer-dev-eng] [PATCH] propagate mouse movement from vo device

Jonas Jermann jjermann at gmx.net
Fri Sep 15 22:27:38 CEST 2006


On Fri, Sep 15, 2006 at 09:04:42PM +0200, Attila Kinali wrote:
> On Fri, 15 Sep 2006 19:19:50 +0200
> Nico Sabbi <nicola_sabbi at fastwebnet.it> wrote:
> 
> > This patch, written by Jonas Jermann and extended in the rescale() 
> > function by me,
> > is needed to tell mplayer the coordinates of the mouse during movement;
> > it will be used by the dvdnav code to select buttons with the mouse.
> 
> I had a quick look at the code and for me it seems to be
> not so clean. IMHO the rescaling function belongs into
> the vo module. mplayer.c should not know and definitly
> not care about whether the vo module is in full screen
> or not, or whether the coordinates match something.
> IMHO half of rescale_input_coordinates belongs into
> x11_common.c (maybe geometry.c or somewhere more generic
> to be reused in other vo modules too).
> 
> Then, the coordinates should be passed upwards the vf
> chain so that any image size changing vf module can
> translate the coordinate back to what its input format
> was (again, a generic function that can be reused
> would be good).
> 
> In the end, mplayer.c should get coordinates that
> do match the original image.
> 
> I know, this is a lot more complicated than it is now,
> but if you apply it this way, it will become a total
> mess as soon as someone tries to take -vf crop or expand
> into account.
> 
> IMHO we should really start slowly to seperate the different
> sub modules of mplayer and get rid of all global variables
> so that maintaining and porting becommes simpler. Adding
> new cross-dependencies is IMHO not the right thing to do.

This is about dvd menu's they shouldn't be modified by user actions
like filters/crop/etc. I want to say that the dvd menu's  should be
threated as something "special". It's probably almost impossible to
calculate the original video frame coordinates after a complicated
filter chain (or a huge mess). The filter parameters the user specifies
are probably meant for the "real" dvd video only anyway and not for
the interactive part...

Best Regards
	Jonas Jermann



More information about the MPlayer-dev-eng mailing list