using gl context of external app

Andres Colubri andres.colubri at gmail.com
Wed Sep 2 01:20:58 PDT 2015


Hi there,

I have a question about the GL plugins. I'm implementing an OpenGL
application that uses gstreamer to play videos, and my goal is to have
gstreamer uploading the frames to GL textures, and the app rendering these
textres on its own GL surface. From what I read online, I should use a
glupload element to copy the frames into GL textures, and then all I would
need to do is to retrieve the glids using appsink. I'm able to pull the ids
with the following pipeline:

uridecodebin uri=%s ! videoconvert ! " + caps + " ! videoscale ! glupload
name=glup ! appsink name=sink

However, in order to render the textures, gstreamer should use the same GL
context from my application.

Fromt looking at the cluttershare example (
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/clutter/cluttershare.c)
and other pieces of code I found on the web, seems that I should pass the
handle of the GL context to gstreamer with the following code:

  GstElement *glupload = gst_bin_get_by_name (GST_BIN (v->play), "glup");
  g_object_set (G_OBJECT (glupload), "external-opengl-context", context,
NULL);
  gst_object_unref (glupload);

However I get the following error:

(<unknown>:33272): GLib-GObject-WARNING **: g_object_set_valist: object
class 'GstGLUploadElement' has no property named 'external-opengl-context'

GstGLFilter seems to have an "other-context" property, but I don't need to
apply any filter on the frames, just to pull them out of the pipeline. Any
ideas on how to do this?

Thanks!
Andres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150902/18e30aa6/attachment.html>


More information about the gstreamer-devel mailing list