[MPlayer-dev-eng] [PATCH] support -mouse-movements on OS/2

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Feb 28 08:01:43 CET 2014


On 27.02.2014, at 15:40, KO Myung-Hun <komh78 at gmail.com> wrote:
> Reimar Döffinger wrote:
>> On 27.02.2014, at 08:23, KO Myung-Hun <komh78 at gmail.com> wrote:
>>> Hi/2.
>>> 
>>> Reimar Döffinger wrote:
>>>> On Sun, Feb 23, 2014 at 11:12:05PM +0900, KO Myung-Hun wrote:
>>>>> Hi/2.
>>>>> 
>>>>> This patch add -mouse-movements support to OS/2.
>>>>> 
>>>>> -- 
>>>>> KO Myung-Hun
>>>>> 
>>>>> Using Mozilla SeaMonkey 2.7.2
>>>>> Under OS/2 Warp 4 for Korean with FixPak #15
>>>>> In VirtualBox v4.1.28 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
>>>>> 
>>>>> Korean OS/2 User Community : http://www.ecomstation.co.kr
>>>>> 
>>>> 
>>>>> Index: libvo/vo_kva.c
>>>>> ===================================================================
>>>>> --- libvo/vo_kva.c    (revision 36900)
>>>>> +++ libvo/vo_kva.c    (working copy)
>>>>> @@ -479,6 +573,32 @@
>>>>> 
>>>>>        return (MRESULT)TRUE;
>>>>> 
>>>>> +    case WM_MOUSEMOVE:
>>>>> +        {
>>>>> +        int x = SHORT1FROMMP(mp1);
>>>>> +        int y = SHORT2FROMMP(mp1);
>>>>> +
>>>>> +        RECTL rclDst;
>>>>> +
>>>>> +        // get a current movie area
>>>>> +        kvaAdjustDstRect(&m_int.kvas.rclSrcRect, &rclDst);
>>>>> +
>>>>> +        // offset to movie area
>>>>> +        x -= rclDst.xLeft;
>>>>> +        y -= rclDst.yBottom;
>>>>> +
>>>>> +        // rescale to image coordinate
>>>>> +        x = x * vo_dwidth / (rclDst.xRight - rclDst.xLeft);
>>>>> +        y = y * vo_dheight / (rclDst.yTop - rclDst.yBottom);
>>>>> +
>>>> 
>>>> This looks wrong, all of this should be handled by
>>>> rescale_input_coordinates in command.c
>>> 
>>> Ok.
>>> 
>>>> I suspect this might be related to the missing panscan
>>>> support and aspect handling that differs from normal
>>>> MPlayer.
>>> 
>>> I have a question. Is there a way to set a movie position relative a
>>> window ? What are vo_dx and vo_dy ?
>> 
>> Hm, the problem is I usually use none of these directly, but through the various helper functions.
>> I think vo_dx/vo_dy specify where the window should be on screen (compare -geometry).
>> I think vo_panscan_x/y should be specifying an additional offset inside the window. Note: _additional_, i.e. over what you get from centering according to aspect() scaling.
>> 
> 
> The reason why I asked, is rescale_input_coordinates() does not seem to
> consider the offset of a movie relative to a window. That is, it seems
> to assume that a movie origin is the same as the window origin.
> 
> Anyway, if there is no way to specify a movie origin relative to a
> window origin, I'll commit this patch.

As I said there is, you can specify any origin via vo_panscan_x and vo_panscan_y.
It's just that if you do not use MPlayer's functions to decide video position for you, calculating the correct values there can be tricky, since they are not the origin relative to the window borders but offsets from the "default placement".

>>> And not related this thread, currently dvdnav:// shows a white
>>> rectangular cursor on OS/2. But on Windows, it shows a selected item
>>> with some marks. Where should I look into ?
>> 
>> This tends to happen when the proper subtitle stream does not get selected (the marks come from a vobsub stream). Sometimes read errors or seeking can cause this effect, I wouldn't know how this could happen as an OS-specific thing though...
> 
> Ah, so ? Hmm...
> 
> BTW, VLC shows a selected mark correctly. VLC and MPlayer are using same
> libs on OS/2. Very strange...

Well, I don't know the cause, but checking the normal subtitles are working might help.
Also check you do not use -nosub.
There should be some "highlight" code that decides between drawing a rectangle or not that might lead you to the reason it uses that instead of an image.


More information about the MPlayer-dev-eng mailing list