Video to opengl texture in app

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Video to opengl texture in app

Tracy Brown

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: [hidden email]

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Video to opengl texture in app

Matthew Waters
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: [hidden email]

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (499 bytes) Download Attachment