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

KO Myung-Hun komh78 at gmail.com
Fri Feb 28 15:49:36 CET 2014



Reimar Döffinger wrote:
> 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".
> 

Ooops, forgive my poor english. ^^ And when I change the vo_panscan_x/y,
there is no effects. So I concluded like that. Maybe, my codes do not
use MPlayer's function correctly.

I'll investigate more.

Thanks.

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



More information about the MPlayer-dev-eng mailing list