using gl context of external app
Andres Colubri
andres.colubri at gmail.com
Mon Sep 14 05:57:15 PDT 2015
Hi Matt,
Thank for pointing out the typo... I guess that's the consequence of
working late on Sunday night :-)
So after fixing that I'm getting a non-zero gl context, but only if I move
gst_gl_context_get_current_gl_context() to the init function that is called
when the gl context in the main application should be current (if I call it
in the callback it still returns zero). So what I do is to save the context
in a global variable and use it in the callback. Is this approach sound?
Andres
On Mon, Sep 14, 2015 at 7:04 AM, Matthew Waters <ystreet00 at gmail.com> wrote:
> On 14/09/15 20:41, Andres Colubri wrote:
>
> Hi guys,
>
> Thanks for the info. The combination of calls:
>
> GstGLDisplay* display = gst_gl_display_new();
> guintptr context =
> gst_gl_context_get_current_gl_context(GST_GL_HAVE_PLATFORM_CGL);
> GstGLContext* gstcontext = gst_gl_context_new_wrapped(display, context,
> GST_GL_HAVE_PLATFORM_CGL, GST_GL_API_OPENGL);
>
>
> Shouldn't this be?
> s/GST_GL_HAVE_PLATFORM_CGL/GST_GL_PLATFORM_CGL/
>
> in the bus callback seems like the solution I have been looking for, at
> least on OS X. However, gst_gl_context_get_current_gl_context always
> returns 0, so theres is a problem a problem. Maybe the bus callback is
> called when the GL context is not current in the calling thread.
>
>
> The gst_gl_context_get_current* family of functions require that the
> external context be current in the calling thread for them to work. The
> synchronous bus callback is called from a GStreamer element streaming
> thread which is not the main thread.
>
> Cheers
> -Matt
>
> I will also give a try to caopengllayersink once 1.6 is out.
>
> Cheers,
> Andres
>
>
> On Sun, Sep 6, 2015 at 5:51 AM, Sebastian Dröge <sebastian at centricular.com
> > wrote:
>
>> On Fr, 2015-09-04 at 11:50 -0400, Andres Colubri wrote:
>> > Hi Matt,
>> >
>> > Cool, thanks for the follow up on OS X. I'm pretty sure that JOGL
>> > doesn't use XQuartz, so it is probably just a NSApp. For Linux and
>> > Windows, it relies on X11 and (if understand the native core
>> > correctly) on the win32 API.
>>
>> Note that Matthew also blogged about how to integrate libgstgl with
>> other GL libraries here:
>> http://ystreet00.blogspot.gr/2015/09/gstreamer-16-and-opengl-contexts.html
>>
>> Maybe that contains some further useful information for you :)
>>
>> > Do you want me to open an issue on the gstreamer tracker requesting
>> > the API enhancement, so at least the discussion is better focused?
>>
>> Sounds like a good plan :)
>>
>> --
>> Sebastian Dröge, Centricular Ltd · <http://www.centricular.com>
>> http://www.centricular.com
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150914/faf8f341/attachment.html>
More information about the gstreamer-devel
mailing list