vo_dmabuf_wayland: support 90 degree rotations

All we have to do is set VO_CAP_ROTATE90 and then use buffer transform.
Maybe ideally we would rotate with vavpp instead if possible, but this
would be a convoluted mess that I'm not really interested in dealing
with right now.
This commit is contained in:
Dudemanguy 2023-09-17 19:29:59 -05:00
parent c6cef1bad3
commit ed5c744aa9
1 changed files with 3 additions and 0 deletions

View File

@ -672,6 +672,8 @@ done:
if (!vo_wayland_reconfig(vo))
return VO_ERROR;
wl_surface_set_buffer_transform(vo->wl->video_surface, img->params.rotate / 90);
// Immediately destroy all buffers if params change.
destroy_buffers(vo);
return 0;
@ -831,6 +833,7 @@ err:
const struct vo_driver video_out_dmabuf_wayland = {
.description = "Wayland dmabuf video output",
.name = "dmabuf-wayland",
.caps = VO_CAP_ROTATE90,
.preinit = preinit,
.query_format = query_format,
.reconfig2 = reconfig,