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

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Sep 16 12:35:41 CEST 2006


Jonas Jermann wrote:

>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
>  
>

please, let's reach an agreement. In order to have support for dvd menus
we need the recognition of mouse movements in mplayer.
Coding it in a completely modular approach would probably turn out to be
a nightmare (assuming it's even possible with the current video filters 
design)
and development would stall for a long time; adding the code Jonas and I 
posted
would permit us to go on with development.
(Moreover, I think my rescaling function is not as dirty and ill-placed 
as Attila claims,
although it won't work with filters applied to the video stream)





More information about the MPlayer-dev-eng mailing list