qt: add X11 video compositor
The composition works as follow: * Both the interface and the video are rendered in an offscreen window (using X11 composite extension) * We register to damage event (x11 damage extension) to get notified when the content of the offscreen video window change. When we receive a damage event we ask the rendering part of the composition to refresh * The interface is rendered in the offscreen surface using a RenderControl, when the interface do render, the composition is asked to refresh * A dedicated thread is spawned to do the rendering, upon a refresh event it will take the pictures from the offscreen surface and blend them into the actual window using X11 render extension. Using a separated thread from Qt ensure that the rendering of the video will not be stalled if Qt thread is busy. * The damage events are listened on a separate X11 connection and on a separate thread than Qt main thread (here the rendering thread). This allows to receive theses events independently from Qt (in case the Qt thread is stalled). Note that it is not possible to peek in qt X11 event queue from a non gui thread as the QX11Info::peekEventQueue is no longer thread safe since 5.12. fixes: #25627, #22155
Showing
- configure.ac 9 additions, 1 deletionconfigure.ac
- modules/gui/qt/Makefile.am 37 additions, 1 deletionmodules/gui/qt/Makefile.am
- modules/gui/qt/maininterface/compositor.cpp 7 additions, 0 deletionsmodules/gui/qt/maininterface/compositor.cpp
- modules/gui/qt/maininterface/compositor.hpp 2 additions, 1 deletionmodules/gui/qt/maininterface/compositor.hpp
- modules/gui/qt/maininterface/compositor_x11.cpp 212 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11.cpp
- modules/gui/qt/maininterface/compositor_x11.hpp 77 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11.hpp
- modules/gui/qt/maininterface/compositor_x11_renderclient.cpp 122 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_renderclient.cpp
- modules/gui/qt/maininterface/compositor_x11_renderclient.hpp 72 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_renderclient.hpp
- modules/gui/qt/maininterface/compositor_x11_renderwindow.cpp 578 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_renderwindow.cpp
- modules/gui/qt/maininterface/compositor_x11_renderwindow.hpp 212 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_renderwindow.hpp
- modules/gui/qt/maininterface/compositor_x11_uisurface.cpp 305 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_uisurface.cpp
- modules/gui/qt/maininterface/compositor_x11_uisurface.hpp 95 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_uisurface.hpp
- modules/gui/qt/maininterface/compositor_x11_utils.cpp 109 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_utils.cpp
- modules/gui/qt/maininterface/compositor_x11_utils.hpp 114 additions, 0 deletionsmodules/gui/qt/maininterface/compositor_x11_utils.hpp
- modules/gui/qt/qt.cpp 6 additions, 0 deletionsmodules/gui/qt/qt.cpp
Loading
Please register or sign in to comment