Share NvEglRenderer fd with other processes

Hello,
In the example code #12 in multimedia API, camera_v4l2_cuda, I’m trying to separate rendering and capturing parts of the code in Jetson Nano Dev Kit. The rendering part has to run in another process which is not related to the current process(meaning it is created separately and is not forked from the current process). But I cannot get it to work.

I tried sending the renderer_fd to the process using IPC sockets, it gives the following error:

nvbuff_utils: dmabuf_fd 38 mapped entry NOT found.

The IPC part is working correctly since I tested it with a similar code on my ubuntu 16.04 laptop.

What am I missing?

Hi,
We don’t support this. You would need to have NvEglRender in the same process.

We have reviewed the request in the topic:

Currently it is still pending and not in plan.

That’s unfortunate. I have two processes that I need to share camera buffers with each other. What is your suggestion? Is there a way to create eglimage in the first process and share it with the second process?

  • the first process is for capturing the camera and doing some processing on the frame.
  • the second process is for rendering camera frame and other rendering stuff on same window.

Hi,
There is no existing sample for this. You may check

And see if you can integrate socketFD with 12_camera_v4l2_cuda

Hi,
Sorry for the late response. Been busy for quite a while!
After lots of trials and errors, I successfully shared camera feed with another process.
EGL Stream examples that DaneLLL mentioned was quite helpful.

Thank you very much

Hi, a.tabrizi:

I tried to use the following method to share camera buffer between different processes, but encountered problems.

Can you share your way or source code, thank you

Frank.Lv