Draft: wayland: add background surface and center video
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
Merge request reports
Activity
changed milestone to %4.0
added Component::Video: Wayland Platform::GNU/Linux Type::task labels
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; - Resolved by Rémi Denis-Courmont
- Resolved by Rémi Denis-Courmont
Fixes #18045 AFAIU
mentioned in merge request !1224 (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
added 9009 commits
-
67652853...fed5c865 - 9008 commits from branch
videolan:master
- 841aff0f - wayland: add background surface and center video
-
67652853...fed5c865 - 9008 commits from branch