mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 05:56:31 +00:00
gst-plugins-base: Set swap interval to 0 for wayland EGL windows
This allows the stream to drive the buffers submitted to the display server. If the application does not receive frame events for a period of time due to minimization or tty switch for example, instead of waiting to process and then catching up when frame events resume, the stream will resume instantly. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7691>
This commit is contained in:
parent
64c6ff97c4
commit
6846746a0e
1 changed files with 9 additions and 0 deletions
|
@ -1278,6 +1278,15 @@ gst_gl_context_egl_activate (GstGLContext * context, gboolean activate)
|
|||
}
|
||||
result = eglMakeCurrent (egl->egl_display, egl->egl_surface,
|
||||
egl->egl_surface, egl->egl_context);
|
||||
#if GST_GL_HAVE_WINDOW_WAYLAND
|
||||
if (GST_IS_GL_WINDOW_WAYLAND_EGL (context->window)) {
|
||||
if (eglSwapInterval (egl->egl_display, 0) == EGL_TRUE) {
|
||||
GST_INFO ("Set EGL swap interval to 0");
|
||||
} else {
|
||||
GST_INFO ("Failed to set EGL swap interval to 0");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
result = eglMakeCurrent (egl->egl_display, EGL_NO_SURFACE,
|
||||
EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
|
|
Loading…
Reference in a new issue