Android Gstreamer-1.0 with GL texture

Gregoire Gentil gregoire at gentil.com
Sun May 24 12:55:23 PDT 2015


Hello,

I'm trying to adapt the Android Gstreamer video tutorial with a GL 
Texture. I have updated the GstreamerSurfaceView to a 
GstreamerGLSurfaceView which extends GLSurfafeView and I have 
implemented a MainRenderer. My only constraint is that I need to know 
the TextureID to which the frame is dumped.

I have tried the pipeline "decodebin ! glupload ! glimagesink" but I 
don't manage to pass the textureID that I receive from my Java call
GLES20.glGenTextures(1, hTex, 0);. More precisely, glupload doesn't seem 
to be any more a transform video plugin and the following code doesn't 
work with the 1.0 framework:

GstElement *tt = gst_bin_get_by_name(GST_BIN(data->pipeline), 
"gluploadelement0");
g_object_set(G_OBJECT(tt), "external-opengl-context", 1, NULL);

The following thread is very interesting and similar to what I want to 
achieve but it's confusing me:
http://gstreamer-devel.966125.n4.nabble.com/glimagesink-and-how-it-likes-to-do-things-td4668229.html

Yes, I want to do the equivalent of gst_gl_memory_copy_into_texture but 
I don't want to have to develop my own sink/plugin.

My main question is the following: can I upload the video frame to a 
texture without having to develop any gstreamer component? Can I pass or 
get the right caps to one of the existing gl plugins so that the frame 
is dumped/uploaded to the texture and I know the texture id? What would 
be the pipeline?

I'm definitely fine to pass the id a created texture or alternatively to 
have gstreamer creating the texture and giving me back the id number,

Grégoire


PS: It would be very nice to have an Android Gstreamer Tutorial-6 that 
would show how to use a texture!


More information about the gstreamer-android mailing list