<div dir="ltr">Hi Folks,<div><br></div><div>I'm experimenting with gstreamer context sharing mechanism.</div><div>I have <i>EGLContext context; </i>and creating gstreamer shared context from it with gst_gl_display_create_context()</div><div><br></div><div>Then I want to access the texture which is created in <i>EGLContext</i> from gstreamer shared context.</div><div>That is why I'm using gst_gl_context_thread_add to activate shared context and save the texture:<br></div><div><br></div><div> gst_gl_context_thread_add(<br>        state->sharedContext,<br>        (GstGLContextThreadFunc)save_gst_tga,<br>        state<br>    );<br></div><div><br></div><div>// Activate gstreamer context and save the texture to tga file.</div><div>static bool save_gst_tga(GstGLContext * context, APP_STATE_T * state)<br>{<br>    if (!gst_gl_context_activate(state->sharedContext, true))<br>        g_print("gst_gl_context_activate(true) returned error %d\n", eglGetError());<br><br>    // Gstreamer context is activated in gstreamer thread, now save the texture.</div><div>    // But this produces an empty file!!!<br>    return save_tga(state, "tga_file_gst.tga");<br>}<br></div><div><br></div><div><div>In save_gst_tga I activate gstreamer shared context and save the texture but it's empty. Am I missing something?</div><div>I've posted the whole code here:</div><div><a href="https://github.com/LusineH/gstreamer_shared_context/blob/main/testegl.c">https://github.com/LusineH/gstreamer_shared_context/blob/main/testegl.c</a><br></div><div><br></div><div>Regards,</div><div>Lusine</div></div></div>