open gl surface as source ?

Arnaud Loonstra arnaud at z25.org
Fri Nov 28 12:16:35 PST 2014


Would this be aadded to the gl plugins? It could be a great base for a 
cross platform syphon/spout solution?

Rg,

Arnaud

On 11/27/2014 10:58 PM, Matthew Waters wrote:
>
> On 28/11/14 05:31, stic at free.fr wrote:
>> Thanks a lot for your answer, you give me a clue :)
>> But it's a bit hard for me to see clearly how things should be done.
>> Do you know if there is somewhere a little example to give a better idea of how it should work, at least for the GstGLMemory part ?
>
> buf = gst_buffer_new ();
> gst_gl_memory_setup_buffer (context, buf, video_info); /* adds new
> GstGLMemory to the buffer */
> gst_video_frame_map (gl_frame, video_info, buf, GST_MAP_READ | GST_MAP_GL);
> tex_id = *(guint *)gl_frame.data[0];
>
> /* draw to texture */
>
> gst_video_frame_unmap (gl_frame);
>
> Or in order to reuse buffers, you can use a GstGLBufferPool.
>
> One thing to keep in mind is that you'll need to share your GL context
> with the pipeline so that there will not be a download and upload of the
> GL texture you send from appsrc.  That is done using the GstContext
> mechanism.  As for examples, you probably want to to have a look at the
> gltestsrc, glfilter or glmixer elements for inspiration.
>
>> Cheers.
>>
>> ----- Mail original -----
>> De: "Matthew Waters" <ystreet00 at gmail.com>
>> À: gstreamer-devel at lists.freedesktop.org
>> Envoyé: Jeudi 13 Novembre 2014 12:33:17
>> Objet: Re: open gl surface as source ?
>>
>> On 13/11/14 19:34, stic at free.fr wrote:
>>> Hi gstreamer friends,
>>>
>>> I would like to know if there is a possibility to get an open gl surface as source with the available plugins in gstreamer ?
>>> Something like a glimagesrc instead of glimagesink ?
>> If you mean s/surface/texture/g then yes it is possible but not with the
>> current plugins.  If you are willing to write come code, it should be
>> possible using appsrc and GstGLMemory filled buffers.
>>
>> Cheers
>> Matt
>>
>>> Thanks.
>>> Regards.
>>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


-- 
Stichting z25.org
Concordiastraat 67A
3551 EM Utrecht
The Netherlands

m: +31-(0)6-41861063
e: arnaud at z25.org
w: http://z25.org
t: http://twitter.com/z25org
f: http://fb.com/z25org
g: http://gplus.to/z25
l: http://linkedin.com/company/z25


More information about the gstreamer-devel mailing list