opengl context sharing with gstreamer
Lusine Hayrapetyan
lusinehayrapetyan1992 at gmail.com
Thu Sep 16 16:23:58 UTC 2021
Hi Folks,
I'm experimenting with gstreamer context sharing mechanism.
I have *EGLContext context; *and creating gstreamer shared context from it
with gst_gl_display_create_context()
Then I want to access the texture which is created in *EGLContext* from
gstreamer shared context.
That is why I'm using gst_gl_context_thread_add to activate shared context
and save the texture:
gst_gl_context_thread_add(
state->sharedContext,
(GstGLContextThreadFunc)save_gst_tga,
state
);
// Activate gstreamer context and save the texture to tga file.
static bool save_gst_tga(GstGLContext * context, APP_STATE_T * state)
{
if (!gst_gl_context_activate(state->sharedContext, true))
g_print("gst_gl_context_activate(true) returned error %d\n",
eglGetError());
// Gstreamer context is activated in gstreamer thread, now save the
texture.
// But this produces an empty file!!!
return save_tga(state, "tga_file_gst.tga");
}
In save_gst_tga I activate gstreamer shared context and save the texture
but it's empty. Am I missing something?
I've posted the whole code here:
https://github.com/LusineH/gstreamer_shared_context/blob/main/testegl.c
Regards,
Lusine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210916/370a947a/attachment.htm>
More information about the gstreamer-devel
mailing list