/* the size of the video in the buffers */
gint video_width, video_height;
+ /* video width scaled according to par */
+ gint scaled_width;
+
enum wl_output_transform buffer_transform;
/* when this is not set both the area_surface and the video_surface are not
case WL_OUTPUT_TRANSFORM_180:
case WL_OUTPUT_TRANSFORM_FLIPPED:
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
- src.w = priv->video_width;
+ src.w = priv->scaled_width;
src.h = priv->video_height;
break;
case WL_OUTPUT_TRANSFORM_90:
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
src.w = priv->video_height;
- src.h = priv->video_width;
+ src.h = priv->scaled_width;
break;
}
GstWlWindowPrivate *priv = gst_wl_window_get_instance_private (self);
if (G_UNLIKELY (info)) {
- priv->video_width =
+ priv->scaled_width =
gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
+ priv->video_width = info->width;
priv->video_height = info->height;
wl_subsurface_set_sync (priv->video_subsurface);
if (!priv->configured)
return;
- if (priv->video_width != 0) {
+ if (priv->scaled_width != 0) {
wl_subsurface_set_sync (priv->video_subsurface);
gst_wl_window_resize_video_surface (self, TRUE);
}
wl_surface_commit (priv->area_surface_wrapper);
- if (priv->video_width != 0)
+ if (priv->scaled_width != 0)
wl_subsurface_set_desync (priv->video_subsurface);
}