EGLStream State
After an EGLStream is created, at any given time, the EGLStream is in one of the following defined states:
-
EGL_STREAM_STATE_CREATED_KHR
: The EGLStream has been created but not yet connected to a producer or a consumer. -
EGL_STREAM_STATE_CONNECTING_KHR
: The EGLStream has been connected to a consumer but not yet connected to a producer. -
EGL_STREAM_STATE_EMPTY_KHR
: The EGLStream has been connected to a consumer and a producer, but the producer has not yet posted any image frames. -
EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR
: The producer has posted at least one image frame that the consumer has not yet acquired. -
EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR
: The producer has posted at least one image frame, and the consumer has acquired the most recently posted image frame. -
EGL_STREAM_STATE_DISCONNECTED_KHR
: The producer, the consumer, or both, are no longer connected to the EGLStream (e.g., they have been destroyed). Once the EGLStream is in this state it remains in this state until the EGLStream is destroyed. In this state onlyeglQueryStreamKHR()
andeglDestroyStreamKHR()
are valid operations.
The EGLStream state is queried as follows:
EGLBoolean eglQueryStreamKHR(
EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLuint64KHR *value);
The following state transitions may occur:
-
EGL_STREAM_STATE_CREATED_KHR
: A new EGLStream is created in this state. -
EGL_STREAM_STATE_CREATED_KHR
toEGL_STREAM_STATE_CONNECTING_KHR
: Occurs when a consumer is connected to the EGLStream. -
EGL_STREAM_STATE_CONNECTING_KHR
toEGL_STREAM_STATE_EMPTY_KHR
: Occurs when a producer is connected to the EGLStream. -
EGL_STREAM_STATE_EMPTY_KHR
toEGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR
: Occurs the first time the producer inserts an EGL image frame. -
EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR
toEGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR
: Occurs when the consumer begins acquiring a newly posted EGL image frame. -
EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR
toEGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR
: Occurs when the producer posts a new EGL image frame. - Any state to
EGL_STREAM_STATE_DISCONNECTED_KHR
: Occurs when the producer or consumer is destroyed.