[Bug 777409] pluginbase: Query for OpenGL app_context

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Jan 23 19:46:08 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=777409

Matt Fischer <mattfischer84 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #343911|reviewed                    |none
             status|                            |
 Attachment #343911|0                           |1
        is obsolete|                            |

--- Comment #15 from Matt Fischer <mattfischer84 at gmail.com> ---
Created attachment 344069
  --> https://bugzilla.gnome.org/attachment.cgi?id=344069&action=edit
pluginbase: Query for OpenGL app_context

Here's an updated patch that fixes the ISO C90 error, uses an early return for
the display check, and correctly unrefs the new variables.

As far as what happens in non-OpenGL situations, basically all that will happen
is that the app_context and display queries will return NULL, so we won't make
a context and things will proceed the way they had in the past.  This just
provides a little bit of an extra opportunity for things to succeed that might
not have been present before, but it doesn't change its ability to handle the
case where it doesn't succeed.

I also wish that we didn't need the gl_display and gl_other_context variables,
but unfortunately the weird way that gst_gl_handle_set_context() works requires
them.  Basically we call gst_gl_ensure_element_data(), which will send out a
query, and then the application will call set_context() on the element.  So the
set_context() function needs a place to save those items to so that they can be
referenced once the gst_gl_ensure_element_data() function returns.  I don't see
a way to do that that doesn't require adding new variables into the element
itself.  I've added code to free them in the close() function, though, so
hopefully they won't cause any problems.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list