Consumer-side steps:

  1. Create the socket on the port number given as an argument (default: 8888) and set the created socket ID to g_ServerID (refer to nvgldemo_main.c).
  2. Create the cross-partition EGLStream for the consumer end by setting the attributes (refer to nvgldemo_main.c).
    EGL_STREAM_TYPE_NV:EGL_STREAM_CROSS_PARTITION_NV, EGL_STREAM_ENDPOINT_NV:EGL_STREAM_PRODUCER_NV,
    EGL_SOCKET_HANDLE_NV: g_SEGLerverID
    demoState.stream = eglCreateStreamKHR(demoState.display, attr);
  3. Bind the consumer end of the EGLStream with the GL texture (refer to eglstreamcrosspart/consumer.cpp).
    glBindTexture(GL_TEXTURE_EXTERNAL_OES, args.videoTexID);
    eglStreamConsumerGLTextureExternalKHR(args.display, 
    args.eglStream) 
  4. Latch the recent image frame to the texture with eglStreamConsumerAcquireKHR, render the frame, and call eglSwapBuffers (refer to eglstreamcrosspart/consumer.cpp):
    eglStreamConsumerAcquireKHR(args.display,args.eglStream)