Consumer-side steps:

  1. Create the stream and get the file descriptor of the stream (refer to eglstreamcube.c).
    client->stream = eglCreateStreamKHR(demoState.display,     streamAttr);
    client->fd = eglGetStreamFileDescriptorKHR(demoState.display, client->stream);
  2. Share the file descriptor with the producer through the socket.
  3. Bind the consumer end of the EGLStream with the GL texture (refer to eglstreamcube.c).
    glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture);
    eglStreamConsumerGLTextureExternalKHR(demoState.display, client->stream) 
  4. Latch the recent image frame to the texture with eglStreamConsumerAcquireKHR:
    eglStreamConsumerAcquireKHR(demoState.display,stream)
  5. Render the texture as one face of the cube.