Skip to content
Snippets Groups Projects

qt: X11 video compositor V2

Merged Pierre Lamot requested to merge chub/vlc:x11-mt-dev into master
  1. Oct 22, 2021
    • Pierre Lamot's avatar
      qt: add X11 video compositor · 96166bad
      Pierre Lamot authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      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
      96166bad
    • Pierre Lamot's avatar
      snap: add libxdamage dependency · 990f7ccf
      Pierre Lamot authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      990f7ccf
    • Pierre Lamot's avatar
      cfb14b4d
Loading