diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-07-12 17:49:50 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-07-22 17:23:23 +0200 |
commit | 0faff37e73ccb5f513b337ae0eae640fcf655295 (patch) | |
tree | 04e414fb519c58ef11e6ab1c590595bee44be5d5 | |
parent | 604986749ed3380fd176360f3e49ee1824cecc45 (diff) |
pluginutil: set GLX display type
The function gst_vaapi_create_display_from_gl_context() cretes a
GstVaapiDisplay given a GstGLContext. But it didn't created a GLX VA display
when the GL platform was GLX, but a plain X11 VA display.
This patch fixes that, by querying the GL platform earlier.
https://bugzilla.gnome.org/show_bug.cgi?id=766206
-rw-r--r-- | gst/vaapi/gstvaapipluginutil.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c index de32521d..4422daa9 100644 --- a/gst/vaapi/gstvaapipluginutil.c +++ b/gst/vaapi/gstvaapipluginutil.c @@ -136,12 +136,19 @@ gst_vaapi_create_display_from_gl_context (GstObject * gl_context_object) GstGLDisplay *const gl_display = gst_gl_context_get_display (gl_context); gpointer native_display = GSIZE_TO_POINTER (gst_gl_display_get_handle (gl_display)); + GstGLPlatform platform = gst_gl_context_get_gl_platform (gl_context); GstVaapiDisplay *display, *out_display; GstVaapiDisplayType display_type; switch (gst_gl_display_get_handle_type (gl_display)) { #if USE_X11 case GST_GL_DISPLAY_TYPE_X11: +#if USE_GLX + if (platform == GST_GL_PLATFORM_GLX) { + display_type = GST_VAAPI_DISPLAY_TYPE_GLX; + break; + } +#endif display_type = GST_VAAPI_DISPLAY_TYPE_X11; break; #endif @@ -192,7 +199,7 @@ gst_vaapi_create_display_from_gl_context (GstObject * gl_context_object) if (!display) return NULL; - switch (gst_gl_context_get_gl_platform (gl_context)) { + switch (platform) { #if USE_EGL case GST_GL_PLATFORM_EGL:{ guint gles_version; |