[Bug 723674] Make external sink(s) compatible with gst-gl

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Feb 23 01:19:05 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=723674
  GStreamer | gst-plugins-gl | git

--- Comment #13 from Julien Isorce <julien.isorce at gmail.com> 2014-02-23 09:40:04 UTC ---
(In reply to comment #12)
> (In reply to comment #11)
> > Well done for the already 3 commited patchs. For the display part it will be
> > also useful for https://bugzilla.gnome.org/show_bug.cgi?id=709747#c10. I will
> > try to split
> > https://bug709747.bugzilla-attachments.gnome.org/attachment.cgi?id=266903.
> 
> :)
> 
> > (In reply to comment #9)
> > Have a look at the first attached file (external_sink_wrap_gl_callback /
> > "share").
> > (It assumes one of the clutter gl threads (and I guess there is only one) is
> > running in the main GMainContext but we could add this callback in the right
> > GMainContext if that was not the case.)
> 
> It's not guaranteed that there will only ever be one clutter GMainContext. 
> Clutter has expressed interest in going multithreaded although that doesn't
> seem to be materialising anytime soon.  Also, there is the policy within
> GStreamer that we do not rely on there ever being a GMainContext at any point
> in time.

Ah right for cluttersink, I only did some experiments with webkitgtk :)
Then for clutter there is clutter_threads_add_timeout_full. I have not looked
at cluttersink though.

> 
> > Upstream gl elements will response to [GST_GL_TYPE_CONTEXT, sink->context,
> > "share", G_TYPE_BOOLEAN, TRUE] the same way as for
> > https://bugzilla.gnome.org/show_bug.cgi?id=704809. Except here cluttersink
> > explicitly tells upstream it has to share.

> 
> The problem here is getting the gl context out of cluttersink cleanly [1] as
> cogl does not directly support what we are trying to do (yet? :)).  Everything
> else should work from our point of view.
> 
> [1] There are the {egl,glX}GetCurrentContext() family of functions however we
> cannot really know which to call.  I would prefer to define some minimal
> integration requirements rather than relying on some heuristics.

You are entirely right. It would be preferable that the external API already
exposes that. If not we could suggest them. In the mean time and for more
external API coverage we could wrap those {egl,glX,...}GetCurrentContext() in
gstgl API. (gst_gl_context_new_wrapped_from_current() ?)

To go further we could provide some base functions that the external sink could
directly uses. (gst_gl_context_new_wrapped_from_g_main_context which would
setup and call g_timeout_add_full for you, with a callback that calls
gst_gl_context_new_wrapped_from_current. Or
gst_gl_context_new_wrapped_from_clutter_thread which would setup and call
clutter_threads_add_timeout_full for you, with a callback that calls
gst_gl_context_new_wrapped_from_current)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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