We pass pmem file descriptors in the OpenCore framework using
data_header_info.private_data_ptr, an opaque pointer to private data
shared between the various nodes.

If you want to allocate memory in the video MIO and have the video
decoder use it, you'll need to change the negotiation so that the
output node allocates its own memory and the decoder uses it. I
haven't tried this myself, but I'm pretty sure that OpenCore supports
that model.

Pmem file descriptor -> physical address translation takes place in
the kernel. It sounds like you need to modify SurfaceFlinger to
accomodate your needs. We know that the SurfaceFlinger HAL is
insufficient, and there are plans for a rewrite in the near future.

On Dec 14, 7:53 pm, jasperr <[email protected]> wrote:
> Hi Dave,
>
> Could you explain further on how to share frame buffers between video
> decoders and video surface output?
>
> (1)if the decoder allocates the physical memory addresses from the
> pmem driver, how video surface output get the pmem heap and the offset
> of a frame buffer?  Via the context argument in the WriteAsync() API?
>
> (2) if I still want to use the video surface output to allocate the
> memory, is there any way to let the decoder get a frame buffer address
> and directly decode frame data to this buffer? I saw there is a
> "useMemoryAllocators()" API, but don know if it can help.
>
> (3) When I get the frame buffer allocated by the pmem driver, can I
> get its kernel address or physical address? I want to use a device
> driver other than "fb0" to do Hardware color space conversion. So I
> need to know the kernel address.
>
> Many thanks
> Jasperr
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to