How to acquire NvBuffer from EGLStream and use for nvv4l2h264enc

Hi guys,
In this post a solution suggested for acquire nvbuffer(dmaBuffer) from EGLstream

It is impossible to map the buffer directly. Need one memcpy through CUDA.
You need to create NvBuffer and get CUDA pointer of destination by calling:


,use CUDA consumer APIs to get CUDA pointer of source:


, and copy source(CUDA consumer) to destination(NvBuffer). 

Is there any complete sample code with for example GL producer or CUDA producer and DMA consumer like what suggested above post.
Thanks so much.

A possible solution is to create NvBuffer so that you can map it to EGLImage for CUDA processing. And use hardware encoder to encode to h264/h265 stream.

Let’s have further discussion in
EGLstream DMA Consumer solutions

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