Hi, within past days I've been doing some test to use clutter for gstreamergl rendering. This would really be useful for my SoC project, to bring some animated bling to Cheese.
Gstreamer-gl creates a opengl texture from video data (at the moment a
RECT one but I managed to "convert" it to a conventional one rendering
to a texture2d with a fbo).
The thing I'd like to achieve is to share this texture handle between
gstreamergl and clutter and use it within a ClutterTexture.
This is strictly what I'm doing for each frame:
clutter_texture_set_cogl_texture
((CLUTTER_TEXTURE(cluttersink->texture),
cogl_texture_new_from_foreign (
cluttersink->tex,
GL_TEXTURE_2D,
cluttersink->width,
cluttersink->height,
0, 0, COGL_PIXEL_FORMAT_RGBA_8888
));
I create the ClutterTexture in the gstbasesink _start function and then
get it from the app with a gobject property.
Everything seems going right (new_from_foreign creates a texture of the
right size, doesn't complain neither fails) but I still get a black
screen.
The reason I think this happens is because both gstreamergl and clutter
have their own GlxContext. Since gstreamergl and clutter have their own
threads, I'd need some way to share the GLXContext to be able to share
GL objects too.
This could probably be done in gstreamergl creating our context with the
clutter one marked as shared.
Is there someway to retrieve the GLXContext from clutter backend? I see
there is some api to retrieve X11 stuff like display, screen, window,
etc.. is there some equivalent thing for glx?
Anyway, do you think I'm on the right "path"? Could there be any other
reason for the black screen?
I found this nice faq that seems to support this idea:
http://www.equalizergraphics.com/documentation/parallelOpenGLFAQ.html
Best regards,
Filippo
--
Filippo Argiolas
Jabber: [EMAIL PROTECTED]
Web: http://fargiolas.netsons.org
Irc: fargiolas (GimpNET, Freenode)
signature.asc
Description: Questa รจ una parte del messaggio firmata digitalmente
