Skip to content
Snippets Groups Projects

Draft: wayland: add background surface and center video

3 unresolved threads

Add a subsurface which displays the video, allowing to change its position from the vout display to center it, and use the vout window surface to render the black border when the video aspect ratio doesn't match the window size.

It's a draft MR because:

  • on wlroots, EFL, using subsurface place functions with the parent result in a crash.
  • on KDE, place_below with the parent doesn't have any effect.
  • on gnome-shell, pushing a 1x1 buffer for the toplevel surface, even with the wp_viewporter resizing the buffer to the correct size, trigger a configured event on the xdg-shell backend which signal a resize to 1x1.
  • there's a single subsurface for the border, maybe up to 4 subsurfaces can lead to a better result for handling the borders.
  • the video is placed above the back borders, although it's usually better to place it in the lowest hardware plane.

So the support is really really poor.

It's also an additional surface layer that might take an HW plane for nothing on some platforms.

To workaround these issue, maybe adding the functionnality in a different submodule can be done.

This MR was already published in the previous years, but never updated before.

Fixes #18045

Edited by Rémi Denis-Courmont

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
51 52 struct wl_shm *shm;
52 53 struct wp_viewporter *viewporter;
53 54 struct wp_viewport *viewport;
55 struct wl_compositor *compositor;
56 struct wl_subcompositor *subcompositor;
57
58 struct wl_surface *surface;
59 struct wl_subsurface *subsurface;
60
61 struct
62 {
63 struct wl_buffer *buffer;
64 struct wp_viewport *viewport;
65 } back_bg;
  • 51 52 struct wl_shm *shm;
    52 53 struct wp_viewporter *viewporter;
    53 54 struct wp_viewport *viewport;
    55 struct wl_compositor *compositor;
  • Rémi Denis-Courmont
  • It seems this is now broken on sway...

  • Alexandre Janniaux mentioned in merge request !1224 (merged)

    mentioned in merge request !1224 (merged)

  • Rémi Denis-Courmont changed the description

    changed the description

  • Alexandre Janniaux mentioned in merge request !1978 (merged)

    mentioned in merge request !1978 (merged)

  • In staging for proper support for this kind of hack, it will close the issue on the buffer sealing issue: https://wayland.app/protocols/single-pixel-buffer-v1

  • Alexandre Janniaux added 9009 commits

    added 9009 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading