Building a Cross-Partition EGLStream Pipeline

A cross-partition EGLStream is one where the producer and consumer are in two different partitions in a multi-OS environment.

Creating a cross-partition stream is similar to the second method (using EGL_NV_stream_remote) for creating a cross-process extension described above. The two processes must establish socket communication with each other, and then pass ownership of that socket to the stream, with each end creating an EGLStream object from their socket. For cross-partition streams, NVIDIA requires that the type used for the socket be INET. (This is in constrast with cross-process streams described above.)

In our example code, the consumer acts as a server, opening a socket and listening for a connection on a known address. The producer then connects to that address, and both sides obtain the socket to use for the stream. They then proceed to create their EGLStreams. After both endpoints have created their EGLStream object, consumer and producer connection proceeds as in the single process case.

You can execute the following cross-partition examples in two shells, one for each partition.

To run cross-partition samples, hv0 of the consumer and producer partition must be configured to use two different IP addresses. For example, on VM1 (the producer partition), set it to 12.0.0.2 using:

ifconfig hv0 12.0.0.2

Similarly, on the consumer partition, set it to 12.0.0.1.