[webkit-dev] Rendering Video using video overlay rather than on a Cairo surface (Graphics overlay)
Simon Fraser
simon.fraser at apple.com
Sat May 30 08:52:17 PDT 2009
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
More information about the webkit-dev
mailing list