[vlc-devel] [PATCH v2 12/19] wayland/shm: use the picture placement from the core
Steve Lhomme
robux4 at ycbcr.xyz
Tue Aug 25 16:20:25 CEST 2020
---
modules/video_output/wayland/shm.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
index fb894920e2e..4ec6664bd6c 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -161,22 +161,21 @@ static int Control(vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_RESET_PICTURES:
{
video_format_t *fmt = va_arg(ap, video_format_t *);
- vout_display_place_t place;
+ const vout_display_place_t *place = vd->place;
video_format_t src;
assert(sys->viewport == NULL);
- vout_display_PlacePicture(&place, &vd->source, vd->cfg, VOUT_ORIGIN_TOP_LEFT);
video_format_ApplyRotation(&src, &vd->source);
- fmt->i_width = src.i_width * place.width
+ fmt->i_width = src.i_width * place->width
/ src.i_visible_width;
- fmt->i_height = src.i_height * place.height
+ fmt->i_height = src.i_height * place->height
/ src.i_visible_height;
- fmt->i_visible_width = place.width;
- fmt->i_visible_height = place.height;
- fmt->i_x_offset = src.i_x_offset * place.width
+ fmt->i_visible_width = place->width;
+ fmt->i_visible_height = place->height;
+ fmt->i_x_offset = src.i_x_offset * place->width
/ src.i_visible_width;
- fmt->i_y_offset = src.i_y_offset * place.height
+ fmt->i_y_offset = src.i_y_offset * place->height
/ src.i_visible_height;
break;
}
@@ -193,10 +192,9 @@ static int Control(vout_display_t *vd, int query, va_list ap)
if (sys->viewport != NULL)
{
video_format_t fmt;
- vout_display_place_t place;
+ const vout_display_place_t *place = vd->place;
video_format_ApplyRotation(&fmt, &vd->source);
- vout_display_PlacePicture(&place, &vd->source, vd->cfg, VOUT_ORIGIN_TOP_LEFT);
wp_viewport_set_source(sys->viewport,
wl_fixed_from_int(fmt.i_x_offset),
@@ -204,7 +202,7 @@ static int Control(vout_display_t *vd, int query, va_list ap)
wl_fixed_from_int(fmt.i_visible_width),
wl_fixed_from_int(fmt.i_visible_height));
wp_viewport_set_destination(sys->viewport,
- place.width, place.height);
+ place->width, place->height);
}
else
return VLC_EGENERIC;
--
2.26.2
More information about the vlc-devel
mailing list