[Bug 704806] Implement GL context sharing

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Sep 2 05:18:12 PDT 2013


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

--- Comment #15 from Matthew Waters <ystreet00 at gmail.com> 2013-09-02 12:18:07 UTC ---
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #10)
> 
> > > What options do you see to share contexts independently? Other than downloading
> > > and uploading again?
> > 
> > You can't share contexts independently, they must be initialized with another
> > context so that they can share the same object space.
> 
> I see, for that we should implement a fallback copying path in GstGLMemory then
> :( Maybe for some implementations this could be made less worse by having a
> custom implementation around EGLImage or something else.

There are essentially two cases we have to deal with:
1. gstglfilter ! queue ! another_gl_filter (not based on libgstgl)
2. gstglfilter ! queue ! non-GL element

Solutions :):
1. Unconditionally share with a global GstGLContext (all GL shareable objects
would be shared even those not related at all)
2. Attempt to figure out some kind of context chain that can be used to create
a context that can download/upload the data from another thread.  It would
probably look like some kind of tree possibly even inside GstGLContext.
3. Attempt to download before crossing a potential thread boundary.  We
currently already do this based on GstGLMemory existence in a buffer.
4. Allow external contexts to be wrapped up in GstGLContext.

Use case 1 requires some kind of communication of the GL contexts that each
filter on either side of the queue can use (or EGLImage/equivalent).  Would
require solution 4 and (2 or 1)
Use case 2 is already partially solved by solution 3.  The problem with that
solution is that it is probably too coarse a distinction to be useful for
integration with other GL elements that don't use libgstgl.  Alternatively one
could require libgstgl for OpenGL with GStreamer and implement solution 2 :) or
define the interaction of GL contexts between elements in a pipeline and use
solution 2 + 4.

-- 
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