Hi,
I’m currently working on a project in which we need to have one EGLStream producer and multiple EGLStream consumers on PX2.
We tried to do this based on img_cap_eglprod and eglstream sample codes.
I already looked into this page https://docs.nvidia.com/drive/nvvib_docs/index.html#page/NVIDIA%2520DRIVE%2520Linux%2520SDK%2520Development%2520Guide%2FGraphics%2520Programming%2520Guide%2Fgraphics_guide_eglstreams.html%23 , and I have some questions.
- Are there any sample code which has more details than the link? It would be even better to have some sample applications.
- After looking into the page, I knew that I can establish two EGLStreams for two producers/consumers and use the same image buffer to send by setting multisend attribute. However, what I don't know is what should I do when calling NvMediaEglStreamProducerGetImage? From your sample code, img_cap_eglprod, I can see that producer always calls this api and returns the buffer back to the queue. But, in the two producers scenario, should I call it twice in both EGLStreams? Or should I just call it with any one of the producers?
- Another similar question, but in the consumer side, is that from the page looks like we only need to release the image back to the EGLStream once by any of the consumers who is the last one to reference this image? Or should we do something like, in the eglstream sample code, calling NvMediaEglStreamConsumerReleaseImage twice by each consumer?
- Any suggestion if the two consumers are in the two different processes?
Thanks in advance!
Best,
Krammer