Producer-side steps:

  1. Receive the stream file descriptor through the socket (given as an eglstreamsocket argument) and create the stream (refer to nvgldemo_main.c):
    eglCreateStreamFromFileDescriptorKHR(demoState.display, fd)
  2. Create the EGLStream surface (refer to nvgldemo_main.c).
    eglCreateStreamProducerSurfaceKHR(
                        demoState.display,
                        demoState.config,
                        demoState.stream,
                        srfAttrs)
  3. Create EGLContext and eglMakeCurrent on the EGLStream surface created in step 2.
  4. Start to render the frames and eglSwapBuffers.