[webkit-dev] Rendering Video using video overlay rather than on a Cairo surface (Graphics overlay)

Ajit Singh ajit.singh at 2wire.com
Fri Jun 5 09:55:55 PDT 2009


Thanks Sriram, after disabling Toolbar/Address Bar, coordinates match exactly.


-----Original Message-----
From: Sriram Neelakandan [mailto:sriram.neelakandan at gmail.com]
Sent: Thu 6/4/2009 10:13 PM
To: Ajit Singh
Cc: Simon Frasjavascript:SetCmd(cmdSend);er; webkit-dev at lists.webkit.org
Subject: Re: [webkit-dev] Rendering Video using video overlay rather than on a Cairo surface (Graphics overlay)
 
On Fri, Jun 5, 2009 at 9:56 AM, Ajit Singh <ajit.singh at 2wire.com> wrote:
> The first problem which i'm facing in this endaveour is of translating the coordinates from WebKit domain to the BCM Framebuffer. Basically the coordinates supplied in paint/setsize cannot be directly used on the native graphics software layer.
> Do you guys have some suggestion ?


Firstly the Webkit Coordinates is from the Window Origin of the Frame
i guess. So who will add the offset for the Toolbar / Address Bar if
any on top of the frame ?

Also Most TVs (including HD LCD or PLASMA) do not display the full
1280x720 pixels on the screen.
There is some amount of underscan that cuts off a few pixels from all
the sides..
So my guess is you have to check what exactly is 0x0.. So even if the
resolution is 1280x720 u dont actually display exactly from 0x0..
Basically there will be some X-offset and Y-offset which needs to be
considerd...
This is what i have seen with my development exp on HD platforms.. so
i usually cut off a good 10-15%

Not sure if this is the exact problem you are seeing.

>
> -----Original Message-----
> From: Simon Fraser [mailto:simon.fraser at apple.com]
> Sent: Sat 5/30/2009 8:52 AM
> To: Sriram Neelakandan
> Cc: Ajit Singh; webkit-dev at lists.webkit.org
> Subject: Re: [webkit-dev] Rendering Video using video overlay rather than on    a Cairo surface (Graphics overlay)
>
> On May 29, 2009, at 10:12 PM, Sriram Neelakandan wrote:
>
>> On Sat, May 30, 2009 at 9:44 AM, Ajit Singh <ajit.singh at 2wire.com>
>> wrote:
>>> a custom MIPS processor which has a dedicated video scalar on it.
>> I guess the BCM7xxx chip must have an attribute window to control the
>> Video and Graphics Plane blending.
>>
>>>
>>> I want to render video using a video scalar instead of this Cairo
>>> surface. I
>>> came to know the video coordinates of the Videobox are inside paint
>>> function
>>> of MediaPlayerPrivateGstreamer..
>>> What is the best way to do it?
>>
>> So what u can do is this:
>> When the setSize/paint function gets called; "size and rect indicate
>> the visible video area to be displayed"
>> Setup the Attribute window to blend the Graphics over Video.
>> In case you dont have an attribute window and use the Alpha bits in
>> ARGB8888 OSD mode ;
>> then u will have to fill the necessary Alpha bits in your primary
>> OSD plane !
>
> Something else you should consider here is ways that the video can be
> clipped
> and transformed. Video should be clipped by CSS overflow and clip, and
> can also
> be scrolled inside an iframe. All these need to clip the video
> correctly.
>
> You should also consider CSS transforms, which can cause the video to
> be rotated,
> or scaled.
>
> Any solution which naively puts a hardware surface over some rect
> where the video is
> supposed to be will be broken in many cases.
>
>> Now the tough job is to blend Graphics/HTML controls that the page
>> will render on top of the Video plane
>> That may require some hacking in the Renderer to see whats below and
>> ensure we tweak the Alpha bits to bring Graphics on top for those
>> player controls alone (with transparency maintained as per CSS rules
>> !)
>>
>> Will be interested in knowing your proceedings ..
>
> This is exactly what the ACCELERATED_COMPOSITING code path does. There
> is
> currently a Core Animation backend for Mac (GraphicsLayerCA.mm); you'd
> have to
> write a backend for your compositing system if you wish to use this
> code path.
>
> Simon
>
>
>
>
>
>



-- 
Sriram Neelakandan
Author - Embedded Linux System Design And Development
(http://tinyurl.com/2doosu)



More information about the webkit-dev mailing list