summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-05-12 13:06:24 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-05-12 17:04:02 +0200
commit7e25936fe22352e7b0eded3857ad8f39296ec170 (patch)
treee5452888e420c1a6f8694e45e7a7e562fbe94516 /gst-libs
parent39636b6ea5a900111e7ef47a4a70f8f1e3394892 (diff)
libs: window: x11: fix src rect info when using vpp
Since we started using VPP in VaapiWindowX11, we need to care about the case that src rect and window's size are different. So, once VPP has converted to other format, we should honor the size of the VPP's surface as source rect. Otherwise, it is cropped according the previous size of the source rect. https://bugzilla.gnome.org/show_bug.cgi?id=782542
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_x11.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_x11.c b/gst-libs/gst/vaapi/gstvaapiwindow_x11.c
index 909672ba..44b15c26 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_x11.c
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_x11.c
@@ -37,6 +37,7 @@
#include "gstvaapipixmap_priv.h"
#include "gstvaapidisplay_x11.h"
#include "gstvaapidisplay_x11_priv.h"
+#include "gstvaapisurface_priv.h"
#include "gstvaapiutils.h"
#include "gstvaapiutils_x11.h"
@@ -463,9 +464,15 @@ conversion:
gst_vaapi_window_vpp_convert_internal (window, surface, NULL, NULL,
flags);
if (G_LIKELY (vpp_surface)) {
+ GstVaapiRectangle vpp_src_rect;
+
surface_id = GST_VAAPI_OBJECT_ID (vpp_surface);
+ vpp_src_rect.x = vpp_src_rect.y = 0;
+ vpp_src_rect.width = GST_VAAPI_SURFACE_WIDTH (vpp_surface);
+ vpp_src_rect.height = GST_VAAPI_SURFACE_HEIGHT (vpp_surface);
+
status =
- gst_vaapi_window_x11_put_surface (window, surface_id, src_rect,
+ gst_vaapi_window_x11_put_surface (window, surface_id, &vpp_src_rect,
dst_rect, flags);
ret = vaapi_check_status (status, "vaPutSurface()");