GNOME Bugzilla – Bug 597253
[gst-plugins-gl] rewrite the way a gstgldisplay is forwarded
Last modified: 2010-02-09 11:20: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)
Created attachment 144771 [details] [review] update patch: make it compile on linux
Any suggestion in order to avoid the use of GST_QUERY_CUSTOM ?
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.