About Overlay interface

by pramod » Mon, 06 Apr 2009 06:34:11 GMT

Sponsored Links

I am implementing a custom MIO which makes use of Overlay interface.
my MIO calls the overlay ref  through the call "mSurface-

Currently i am facing problem in "mSurface->createOverlay", this is
not returning the OverlayRef. Due to this the next call to "new Overlay
(ref)" is failing.

layer,sp<OverlayRef>* overlayRef, uint32_t w, uint32_t h, int32_t
format)"  in LayerBuffer.cpp should return the Overlay ref object.

am i missing anything??? Is the overlay support fully implemented in
current Cupacake branch..?

Thanks in advance.


About Overlay interface

by waterblood » Tue, 07 Apr 2009 02:26:22 GMT

 It should be a overlay engine in surfaceflinger which means a you
should implment a overlay hardware HAL in hardware\libhardware\modules


Sponsored Links

About Overlay interface

by pramod » Tue, 07 Apr 2009 03:03:33 GMT

 hi ,

Thanks for responding, i have already implemented the overlay hardware
HAL in libhardware.
The overlay engine is created in the surfaceflinger,during
displayhardware init().
After putting some debug prints i found out that this overlay engine
is properly being used during the creation of the Overlay in
LayerBuffer::OverlaySource::OverlaySource. The OverlayRef is also
created and is retured properly.

But my problem is that i am not being able to access the OverlayRef
object in android_surface_output.cpp. The OverlayRef object is created
using the template class sp<>.

I have even included the libraries libutils, libcutils which might be
needed for usage of template class sp, and also the header file "utils/

Still i am not able to access the OverlayRef object.

Any help to solve the issue would be greatly appreciated.



About Overlay interface

by AJAY » Mon, 13 Apr 2009 10:58:42 GMT

 Hi Hanchao,

I am implementing a custom MIO which makes use of Overlay interface.I
have implemented my MIO calls "mSurface->createOverlay" to get
reference to the OverlayRef object.

The above createOverlay function is implemented in the ISurface.cpp.
The height ,weight, format information is passed using the parcel
object and the overlay is created succesfully. The created overlay is
passed back to the ISurface through the call
"OverlayRef::writeToParcel". But while reading the reply  parcel
through "OverlayRef::readFromParcel(reply)" call ,the OverlayRef
object is NULL.

Did you face similar issue when implementing overlay ?



Other Threads

1. Can't change the input size of OpenCore's H.264 Encoder


While using Author Engine, I find that H.264 Encoder's input size
can't be changed from its default value 176x144. Log file shows
PVMFEncNode has negotiated 352x288 as input buffer size with AVCEnc
OMX component, but it has no effects on encoder.

MPEG4 and H.263 both work well. Is it a known issue of H.264 Encoder?


2. Displaying YUV data from middleware component


My requirement needs me to draw the YUV data from the framework layer.
Is this possible? From the android code, I seem to understand the
following :

1. Create an ISurface object.
2. Extract frame data in form of YUV
3. Create a IMemory object with the YUV data.
4. Call mSurface->RegisterBuffer()

My doubts are ::
1. Is my understanding right? Is this approach feasible?
2. How do we create IMemory object referencing to the frame data? Say,
I set the yuv file( in the SD card) as a data source to the framework

Thanks & Regards,

3. Market Download Problems?

4. Accelerometer or orientation for rolling ball code?

5. Open GMail Attachments with my app

6. Image from internet won't display.

7. Removal / Recovery from Android Emulator on OS X