summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-12 17:53:58 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-13 17:13:20 +0100
commitc653cb55f9a97d1bf6d3fc1d0ae30dcd958174a5 (patch)
treef03052287ff7606b671d89f11a95dcd1da595d87
parent19fe5c4d07e48dce1a64085f96653cad4498db2e (diff)
vaapi: register vaapisink as marginal on wayland
vaapsink, when used with the Intel VA-API driver, tries to display surfaces with format NV12, which are handled correctly by Weston. Nonetheless, COGL cannot display YUV surfaces, making fail pipelines on mutter. This shall be solved either by COGL or by making the driver to paint RGB surfaces. In the meanwhile, let's just demote vaapisink as marginal when the Wayland environment is detected, no matter if it is Weston. https://bugzilla.gnome.org/show_bug.cgi?id=775698
-rw-r--r--gst/vaapi/gstvaapi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/vaapi/gstvaapi.c b/gst/vaapi/gstvaapi.c
index 0edec43c07..9a82454406 100644
--- a/gst/vaapi/gstvaapi.c
+++ b/gst/vaapi/gstvaapi.c
@@ -210,6 +210,7 @@ plugin_init (GstPlugin * plugin)
{
GstVaapiDisplay *display;
GArray *decoders;
+ guint rank;
plugin_add_dependencies (plugin);
@@ -234,8 +235,11 @@ plugin_init (GstPlugin * plugin)
gst_element_register (plugin, "vaapidecodebin",
GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
- gst_element_register (plugin, "vaapisink",
- GST_RANK_PRIMARY, GST_TYPE_VAAPISINK);
+ rank = GST_RANK_PRIMARY;
+ if (g_getenv ("WAYLAND_DISPLAY"))
+ rank = GST_RANK_MARGINAL;
+ gst_element_register (plugin, "vaapisink", rank, GST_TYPE_VAAPISINK);
+
#if USE_ENCODERS
gst_vaapiencode_register (plugin, display);
#endif