Hi, Ajay

But how to set position of overlay with current overlay interface.

Regards
Jill
On Mar 24, 12:33 pm, AJAY <ajay...@gmail.com> wrote:
> You are correct. The current android_surface_output.cpp doesnt have
> any Overlay implementation . However you can check the TI
> implementation at omap-zoom site
>
> Here is the link 
> :http://git.omapzoom.org/?p=platform/hardware/ti/omap3.git;a=tree;f=li...
>
> -Ajay
>
> On Mar 19, 10:52 am, waterblood <guoyin.c...@gmail.com> wrote:
>
>
>
> > Hi All,
>
> >    Below is my understanding about how to enable theOverlayin a new
> > hardware platform. Correct me if I am wrong.
>
> > 1.  Implement the stub funtions in hardware\libhardware\modules\overlay
> > \overlay.cpp, this will generate a share library liboverlay.trout.so.
>
> > 2. In SurfaceFlinger, it will create a DisplayHardware instance, and
> > call DisplayHardware::init() which will create anoverlayengine from
> > liboverlay.trout.so.
>
> > 3. When we want a OverlayRef from ISurface, we call
> > ISurface::createOverlay() which will take use of theoverlayengine
> > creat in step 2.
>
> > 4. Create aOverlayfrom OverlayRef as it in frameworks\base\libs
> > \surfaceflinger\tests\overlays\overlays.cpp.
>
> >     sp<OverlayRef> ref = isurface->createOverlay(320, 240,
> > PIXEL_FORMAT_RGB_565);
> >     sp<Overlay>overlay= newOverlay(ref);
>
> >     /*
> >      * here we can use theoverlayAPI
> >      */
>
> >     overlay_buffer_t buffer;
> >    overlay->dequeueBuffer(&buffer);
> >     printf("buffer = %p\n", buffer);
>
> >     void* address =overlay->getBufferAddress(buffer);
> >     printf("address = %p\n", address);
>
> >    overlay->queueBuffer(buffer);
>
> > My questions are:
> > a. In step 4, as we want paint something in theoverlay, should we
> > just put the image data to the buffer return by  overlay->dequeueBuffer
> > (), and call queueBuffer() to show the buffer?
>
> > b. I dont see any update in android_surface_output to take use 
> > ofoverlayinterface, will it be updated to useoverlayinterface ifoverlayis 
> > exit in the hardware? I suggest the surface output may try
> > to create OverlayRef from surface interface, if it fail, surface
> > output take the display mechanism as before(post buffer), otherwise it
> > use thisoverlayto display video frame.
>
> > Thanks
> > Guoyin Chen- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to