test: vaapicontext: support wayland display
authorMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 19 Jun 2020 07:23:52 +0000 (09:23 +0200)
committerMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 31 Jul 2020 12:02:33 +0000 (14:02 +0200)
commit24be7b8aaec7dd427652236b8d4f4af4e35024be
treed6917b95b195d5da3d97f47c6f4e141e79945d9d
parent283fceac0b048fe95c6a15b2690d818ece2a519e
test: vaapicontext: support wayland display

On Wayland, The whole gtk window is one Wayland surface. So
gtk_widget_get_window() must be called on the top-level widget.
For any other widget the following gdk_window_ensure_native() may create a
new top-level Wayland surface that is never visible.

As a result, the coordinates passed to
gst_video_overlay_set_render_rectangle() must be relativ to the top-level
window. Otherwise the video is placed incorrectly.

Original-Patch-By: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/342>
tests/examples/meson.build
tests/examples/test-vaapicontext.c