Package org.lwjgl.egl

Class KHRStreamFIFO

java.lang.Object
org.lwjgl.egl.KHRStreamFIFO

public class KHRStreamFIFO extends Object
Native bindings to the KHR_stream_fifo extension.

This extension allows an EGLStream to operate as a fifo rather than as a mailbox.

The EGL_KHR_stream extension defines the EGLStream object. The EGLStream object works like a 1 entry mailbox, allowing the consumer to consume the frame that the producer most recently inserted. If the consumer requests image frames faster than the producer creates them then it gets the most recent one over and over until a new one is inserted. If the producer inserts frames faster than the consumer can consume them then the extra frames are discarded. The producer is never stalled.

This extension allows an EGLStream to be placed into fifo mode. In fifo mode no images are discarded. If the producer attempts to insert a frame and the fifo is full then the producer will stall until there is room in the fifo. When the consumer retrieves an image frame from the EGLStream it will see the image frame that immediately follows the image frame that it last retrieved (unless no such frame has been inserted yet in which case it retrieves the same image frame that it retrieved last time).

Timing of the EGLStream in mailbox mode, as described by the EGL_KHR_stream extension, is the responsibility of the producer (with help from the consumer in the form of the EGL_CONSUMER_LATENCY_USEC_KHR hint).

In contrast, timing of an EGLStream in fifo mode is the responsibility of the consumer. Each image frame in the fifo has an associated timestamp set by the producer. The consumer can use this timestamp to determine when the image frame is intended to be displayed to the user.

Requires EGL 1.2 and KHR_stream.

  • Field Details

    • EGL_STREAM_FIFO_LENGTH_KHR

      public static final int EGL_STREAM_FIFO_LENGTH_KHR
      See Also:
    • EGL_STREAM_TIME_NOW_KHR

      public static final int EGL_STREAM_TIME_NOW_KHR
      See Also:
    • EGL_STREAM_TIME_CONSUMER_KHR

      public static final int EGL_STREAM_TIME_CONSUMER_KHR
      See Also:
    • EGL_STREAM_TIME_PRODUCER_KHR

      public static final int EGL_STREAM_TIME_PRODUCER_KHR
      See Also:
  • Method Details

    • neglQueryStreamTimeKHR

      public static int neglQueryStreamTimeKHR(long dpy, long stream, int attribute, long value)
    • eglQueryStreamTimeKHR

      public static boolean eglQueryStreamTimeKHR(long dpy, long stream, int attribute, LongBuffer value)
    • eglQueryStreamTimeKHR

      public static boolean eglQueryStreamTimeKHR(long dpy, long stream, int attribute, long[] value)
      Array version of: QueryStreamTimeKHR