Agx video encoding using dmafd

Hi,

I am trying to use video encoder to create Hevc videos on Agx.
VideoEncoder->capture_plane.qBuffer requires a NvBuffer input. Is there a method(I searched within classes like NvBuffer or nvbuf_utils but didn’t find yet) or sample code that we can use for reference to convert DmdFd int back to the NvBuffer? Since the producer in our system returns only DmaFd. Thanks

Hi,
Can the dmafd be mapped to an EGLImage? If yes, you can call NvEGLImageFromFd() to get EGLImage of NvBuffer, and copy EGLImage of dmafd to EGLImage of NvBuffer.

This sample may help:
Trying to process with OpenGL an EGLImage created from a dmabuf_fd - #9 by DaneLLL

Hi,

Thanks for the response. EGLImage is not an option for the input parameter of qBuffer within NvVideoEncoder though. I do recognize this function of transforming to EGLImage. But this might not be the data structure that can be directly used in this case.

Hi,
There is no interface to convert dmafd to NvBuffer. Would need to allocate NvBuffer first and then call NvEGLImageFromFd() to get EGLImage.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.