Top Description Fields Constructors Methods
org.lwjgl.egl

public Class KHRStreamCrossProcessFD

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

Native bindings to the KHR_stream_cross_process_fd extension.

This extension allows an EGLStreamKHR object handle to be duplicated into another process so that the EGLStream producer can be in one process while the EGLStream consumer can be in another process.

Duplicating the EGLStreamKHR object handle into another process is peformed in 3 steps

  1. Get a file descriptor associated with the EGLStream.
  2. Duplicate the file descriptor into another process.
  3. Create an EGLStreamKHR from the duplicated file descriptor in the other process.

The file descriptor is obtained by calling eglGetStreamFileDescriptorKHR().

Duplicating the file descriptor into another process is outside the scope of this extension. See issue \#1 for an example of how to do this on a Linux system.

The EGLStreamKHR object handle is created in the second process by passing the file descriptor to the eglCreateStreamFromFileDescriptorKHR() function. This must be done while the EGLStream is in the EGL_STREAM_STATE_CREATED_KHR state.

Once the EGLStreamKHR object handle is created in the second process, it refers to the same EGLStream as the EGLStreamKHR object handle in the original process. A consumer can be associated with the EGLStream from either process. A producer can be associated with the EGLStream from either process.

Requires EGL 1.2 and KHR_stream.

Field Summary

Modifier and TypeField and Description
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
eglCreateStreamFromFileDescriptorKHR(long dpy, int file_descriptor)

public static int
eglGetStreamFileDescriptorKHR(long dpy, long stream)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EGL_NO_FILE_DESCRIPTOR_KHRback to summary
public static final int EGL_NO_FILE_DESCRIPTOR_KHR

Constructor Detail

KHRStreamCrossProcessFDback to summary
protected KHRStreamCrossProcessFD()

Method Detail

eglCreateStreamFromFileDescriptorKHRback to summary
public static long eglCreateStreamFromFileDescriptorKHR(long dpy, int file_descriptor)
Annotations
@NativeType:EGLStreamKHR
eglGetStreamFileDescriptorKHRback to summary
public static int eglGetStreamFileDescriptorKHR(long dpy, long stream)
Annotations
@NativeType:EGLNativeFileDescriptorKHR