[vlc-devel] [PATCH 07/20] vdpau/display: use the picture placement from the core
Rémi Denis-Courmont
remi at remlab.net
Tue Aug 25 15:42:26 CEST 2020
Le tiistaina 25. elokuuta 2020, 10.29.55 EEST Steve Lhomme a écrit :
> ---
> modules/hw/vdpau/display.c | 30 ++++++++++++++----------------
> 1 file changed, 14 insertions(+), 16 deletions(-)
>
> diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
> index 4eb937c00d8..772553b8971 100644
> --- a/modules/hw/vdpau/display.c
> +++ b/modules/hw/vdpau/display.c
> @@ -233,20 +233,19 @@ static int Control(vout_display_t *vd, int query,
> va_list ap) {
> video_format_t *fmt = va_arg(ap, video_format_t *);
> const video_format_t *src= &vd->source;
> - vout_display_place_t place;
> + const vout_display_place_t *place = vd->place;
>
> msg_Dbg(vd, "resetting pictures");
> - vout_display_PlacePicture(&place, src, vd->cfg);
>
> - fmt->i_width = src->i_width * place.width / src->i_visible_width;
> - fmt->i_height = src->i_height * place.height /
> src->i_visible_height; - sys->width = fmt->i_visible_width =
> place.width;
> - sys->height = 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 / src->i_visible_height; + fmt->i_width = src->i_width
> * place->width / src->i_visible_width; + fmt->i_height =
> src->i_height * place->height / src->i_visible_height; + sys->width
> = fmt->i_visible_width = place->width;
> + sys->height = 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 / src->i_visible_height;
>
> - const uint32_t values[] = { place.x, place.y,
> - place.width, place.height, };
> + const uint32_t values[] = { place->x, place->y,
> + place->width, place->height, };
> xcb_configure_window(sys->conn, sys->window,
> XCB_CONFIG_WINDOW_X|XCB_CONFIG_WINDOW_Y|
>
> XCB_CONFIG_WINDOW_WIDTH|XCB_CONFIG_WINDOW_HEIGHT, @@ -255,15 +254,14 @@
> static int Control(vout_display_t *vd, int query, va_list ap) }
> case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> {
> - vout_display_place_t place;
> + const vout_display_place_t *place = vd->place;
>
> - vout_display_PlacePicture(&place, &vd->source, vd->cfg);
> - if (place.width != vd->fmt.i_visible_width
> - || place.height != vd->fmt.i_visible_height)
> + if (place->width != vd->fmt.i_visible_width
> + || place->height != vd->fmt.i_visible_height)
> return VLC_EGENERIC;
>
> - const uint32_t values[] = { place.x, place.y,
> - place.width, place.height, };
> + const uint32_t values[] = { place->x, place->y,
> + place->width, place->height, };
> xcb_configure_window(sys->conn, sys->window,
> XCB_CONFIG_WINDOW_X|XCB_CONFIG_WINDOW_Y|
>
> XCB_CONFIG_WINDOW_WIDTH|XCB_CONFIG_WINDOW_HEIGHT,
OK
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list