After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 597253 - [gst-plugins-gl] rewrite the way a gstgldisplay is forwarded
[gst-plugins-gl] rewrite the way a gstgldisplay is forwarded
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
git master
Other All
: Normal normal
: 0.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-04 00:55 UTC by Julien Isorce
Modified: 2010-02-09 11:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (24.06 KB, patch)
2009-10-04 00:55 UTC, Julien Isorce
none Details | Review
update patch: make it compile on linux (24.70 KB, patch)
2009-10-05 09:10 UTC, Julien Isorce
none Details | Review

Description Julien Isorce 2009-10-04 00:55:41 UTC
Created attachment 144693 [details] [review]
patch

** Current implementation:
A gstgldisplay is instancied by the gl src in terms of gl chain.
And then the next element get it through the first gstglbuffer.
For example, in videotestsrc ! glupload ! glfilter ! glimagesink
there is one gstgldisplay created by glupload, and forwarded to glfilter and
glimagesink through the first gstglbuffer.

** New way (patch):
Now, this is done though queries.
All glelements get their ref on a gstgldisplay in READY state.
A gstgldisplay is created by the gl sink (in terms of gl chain) and transmited
to the other gl elements of the same chain through queries.

** Main reason:
This rewrite is mainly a first step to be able to share OpenGL context hold
by the gstgldisplay using more complex glelements.
For example, with a glvideomixer. The associated gstgldisplay of each gl chain
of the sink pads will share their OpenGL context.

** Why current implementation is blocker:
[It's not possible with the current implementation because no textures and no
other opengl stuffs (fbo, shader) must exist before all opengl constext are
shared. And gstgldisplay was transmited through the first gstglbuffer which
contains a gltexture (and fbo and shaders are already initialized)]

** Pending work:
For now, I wrote this patch using GST_QUERY_CUSTOM, but I would like to have a
specific GstQueryType.
I could use gst_query_type_register ("gstgldisplay", "gstgldisplay of gl
chain"),
but I really do not know where to put this call. Because all gl elements has to
know this query type.

** Submit:
I would like that some guys review this patch because I am not sure to use
queries in the best way.
(all tests/pipelines and tests/examples are still working on win32, not tested
yet on other platforms)
Comment 1 Julien Isorce 2009-10-05 09:10:38 UTC
Created attachment 144771 [details] [review]
update patch: make it compile on linux
Comment 2 Julien Isorce 2009-10-07 20:04:53 UTC
Any suggestion in order to avoid the use of GST_QUERY_CUSTOM ?
Comment 3 Julien Isorce 2009-10-23 08:58:41 UTC
commit 506c6682d6daae6e8b21657133e89cc3315caa9f
Author: Julien Isorce <julien.isorce@gmail.com>
Date:   Sun Oct 4 02:23:45 2009 +0200

    rewrite the way a gstgldisplay is transmited to the gl elements

    Before, a gstgldisplay was instancied by the gl src in terms of gl chain.
    And then the next element got it through the first gstglbuffer.
    Now, this is done though queries.
    All glelements get their ref on a gstgldisplay in READY state.
    This rewrite is mainly a first step to be able to share OpenGL context hold
    by the gstgldisplay using more complex glelements.
    For example, with a glvideomixer. The associated gstgldisplay of each gl chain
    of the sink pads will share their OpenGL context.