Consumer-side steps:
- Create the socket on the port number given as an argument (default: 8888) and set the created socket ID to
g_ServerID(refer tonvgldemo_main.c). - 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); -
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) -
Latch the recent image frame to the texture with
eglStreamConsumerAcquireKHR, render the frame, and calleglSwapBuffers(refer toeglstreamcrosspart/consumer.cpp):eglStreamConsumerAcquireKHR(args.display,args.eglStream)