This extension defines a new object, the EGLStream, that can be used to efficiently transfer a sequence of image frames from one API to another. The EGLStream has mechanisms that can help keep audio data synchronized to video data.
Each EGLStream is associated with a "producer" that generates image frames and inserts them into the EGLStream. The producer is responsible for inserting each image frame into the EGLStream at the correct time so that the consumer can display the image frame for the appropriate period of time.
Each EGLStream is also associated with a "consumer" that retrieves image frames from the EGLStream. The consumer is responsible for noticing that an image frame is available and displaying it (or otherwise consuming it). The consumer is also responsible for indicating the latency when that is possible (the latency is the time that elapses between the time it is retrieved from the EGLStream until the time it is displayed to the user).
Some APIs are stream oriented (examples: OpenMAX IL, OpenMAX AL). These APIs may be connected directly to an EGLStream as a producer or consumer. Once a stream oriented producer is "connected" to an EGLStream and "started" it may insert image frames into the EGLStream automatically with no further interaction from the application. Likewise, once a stream oriented consumer is "connected" to an EGLStream and "started" it may retrieve image frames from the EGLStream automatically with no further interaction from the application.
Some APIs are rendering oriented and require interaction with the application during the rendering of each frame (examples: OpenGL, OpenGL ES, OpenVG). These APIs will not automatically insert or retrieve image frames into/from the EGLStream. Instead the application must take explicit action to cause a rendering oriented producer to insert an image frame or to cause a rendering oriented consumer to retrieve an image frame.
The EGLStream conceptually operates as a mailbox. When the producer has a new image frame it empties the mailbox (discards the old contents) and inserts the new image frame into the mailbox. The consumer retrieves the image frame from the mailbox and examines it. When the consumer is finished examining the image frame it is either placed back in the mailbox (if the mailbox is empty) or discarded (if the mailbox is not empty).
Timing is mainly controlled by the producer. The consumer operated with a fixed latency that it indicates to the producer through the EGL_CONSUMER_LATENCY_USEC_KHR attribute. The consumer is expected to notice when a new image frame is available in the EGLStream, retrieve it, and display it to the user in the time indicated by EGL_CONSUMER_LATENCY_USEC_KHR. The producer controls when the image frame will be displayed by inserting it into the stream at time T - EGL_CONSUMER_LATENCY_USEC_KHR where T is the time that the image frame is intended to appear to the user.
This extension does not cover the details of how a producer or a consumer works or is "connected" to an EGLStream. Different kinds of producers and consumers work differently and are described in additional extension specifications.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final long | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static long | |
| public static long | |
| public static boolean | |
| public static boolean | |
| public static boolean | eglQueryStreamKHR(long dpy, long stream, int attribute, int[] value)
Array version of: |
| public static boolean | |
| public static boolean | eglQueryStreamu64KHR(long dpy, long stream, int attribute, long[] value)
Array version of: |
| public static boolean | |
| public static long | |
| public static int | |
| public static int |
| EGL_BAD_STATE_KHR | back to summary |
|---|---|
| public static final int EGL_BAD_STATE_KHR | |
| EGL_BAD_STREAM_KHR | back to summary |
|---|---|
| public static final int EGL_BAD_STREAM_KHR | |
| EGL_CONSUMER_FRAME_KHR | back to summary |
|---|---|
| public static final int EGL_CONSUMER_FRAME_KHR | |
| EGL_CONSUMER_LATENCY_USEC_KHR | back to summary |
|---|---|
| public static final int EGL_CONSUMER_LATENCY_USEC_KHR | |
| EGL_NO_STREAM_KHR | back to summary |
|---|---|
| public static final long EGL_NO_STREAM_KHR | |
| EGL_PRODUCER_FRAME_KHR | back to summary |
|---|---|
| public static final int EGL_PRODUCER_FRAME_KHR | |
| EGL_STREAM_STATE_CONNECTING_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_CONNECTING_KHR | |
| EGL_STREAM_STATE_CREATED_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_CREATED_KHR | |
| EGL_STREAM_STATE_DISCONNECTED_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_DISCONNECTED_KHR | |
| EGL_STREAM_STATE_EMPTY_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_EMPTY_KHR | |
| EGL_STREAM_STATE_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_KHR | |
| EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR | |
| EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR | back to summary |
|---|---|
| public static final int EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR | |
| KHRStream | back to summary |
|---|---|
| protected KHRStream() | |
| eglCreateStreamKHR | back to summary |
|---|---|
public static long eglCreateStreamKHR(long dpy, IntBuffer attrib_list)
| |
| eglCreateStreamKHR | back to summary |
|---|---|
| public static long eglCreateStreamKHR(long dpy, int[] attrib_list) Array version of:
| |
| eglDestroyStreamKHR | back to summary |
|---|---|
public static boolean eglDestroyStreamKHR(long dpy, long stream)
| |
| eglQueryStreamKHR | back to summary |
|---|---|
public static boolean eglQueryStreamKHR(long dpy, long stream, int attribute, IntBuffer value)
| |
| eglQueryStreamKHR | back to summary |
|---|---|
| public static boolean eglQueryStreamKHR(long dpy, long stream, int attribute, int[] value) Array version of:
| |
| eglQueryStreamu64KHR | back to summary |
|---|---|
public static boolean eglQueryStreamu64KHR(long dpy, long stream, int attribute, LongBuffer value)
| |
| eglQueryStreamu64KHR | back to summary |
|---|---|
| public static boolean eglQueryStreamu64KHR(long dpy, long stream, int attribute, long[] value) Array version of:
| |
| eglStreamAttribKHR | back to summary |
|---|---|
public static boolean eglStreamAttribKHR(long dpy, long stream, int attribute, int value)
| |
| neglCreateStreamKHR | back to summary |
|---|---|
| public static long neglCreateStreamKHR(long dpy, long attrib_list) | |
| neglQueryStreamKHR | back to summary |
|---|---|
| public static int neglQueryStreamKHR(long dpy, long stream, int attribute, long value) | |
| neglQueryStreamu64KHR | back to summary |
|---|---|
| public static int neglQueryStreamu64KHR(long dpy, long stream, int attribute, long value) | |