Skip to content
Snippets Groups Projects
Commit fc68298a authored by Pierre Lamot's avatar Pierre Lamot
Browse files

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
parent 1785e907
No related branches found
No related tags found
Loading
Showing
with 1950 additions and 3 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment