Video to opengl texture in app

Matthew Waters ystreet00 at gmail.com
Tue Oct 9 02:36:53 UTC 2018


Two options.

1. Upload to OpenGL in GStreamer.  This has the potential for upstream
decoders to negotiate zerocopy paths that avoid a download/upload
to/from system memory.  The pipeline for that would look like 'decoder !
glupload ! glcolorconvert ! appsink'.  To be able to correctly interact
with the OpenGL textures from your application, you need to provide the
application OpenGL context to GStreamer for sharing using something like
http://ystreet00.blogspot.com/2015/09/gstreamer-16-and-opengl-contexts.html. 
Depending on your application, there may already be elements for your
toolkit. e.g. Gtk+3 and Qt/Qml elements exist.  This provides the
application with OpenGL textures that can be used in your OpenGL scene. 
Other sources of inspiration are the gtkglsink and qmlglsink elements
for the entire process for integrating with an external API.
2. Upload to OpenGL outside of GStreamer as you've already found.

Cheers
-Matt

On 9/10/18 8:17 am, Tracy Brown wrote:
>
> Hey guys,
>
>  
>
> I’ve been struggling to find a performant way to get the video out of
> gstreamer into my app’s opengl texture…is there a standard way to do this?
>
>  
>
> What I’m doing now is using an appsink to get the raw sample data and
> then uploading it up to an opengl texture.
>
>  
>
> Thanks for your time!
>
>  
>
> TRACY BROWN |SOFTWARE DESIGN ENGR II |NAVICO
>
> NavicoBrands_strip_RGB_sml
>
> 4500 S. 129th East Avenue, Ste. 200 |Tulsa, OK 74134-5885 USA
>
> *Office: *+1 918.438.8427|*Email:*_tracy.brown at navico.com
> <mailto:tracy.brown at navico.com>_**
>
> *Skype ID:*tracy.brown.navico | *Mobile:*+1 918.852.5217
>
>  
>
> Confidentiality Notice | This message may contain confidential and/or
> privileged information.
> If you are not the addressee or authorized to receive this for the
> addressee, you must not use,
> copy, disclose or take any action based on this message or any
> information herein.
> If you have received this message in error, please advise the sender
> immediately by reply e-mail
> and delete this message. Thank you for your cooperation.
>
>  
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181009/9975b8f1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 17486 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181009/9975b8f1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181009/9975b8f1/attachment-0001.sig>


More information about the gstreamer-devel mailing list