Problem when binding Android Surface to glimagesink

Sebastian Dröge sebastian at centricular.com
Tue May 10 06:40:18 UTC 2016


On Fr, 2016-05-06 at 09:43 -0700, Wei Lee wrote:
> Thanks a lot for your information.
> 
> My purpose is to render video on an Android Surface which is created
> from SurfaceTexture.
> I guess I am not the first one trying to do this.
> Is there any related examples/tutorials or elements already exists
> for this purpose?

Not really, other than the elements I mentioned in my last mail. To
implement this you need to get some understanding of OpenGL ES, EGL and
the Android APIs in any case.

For your specific case, what you have is a SurfaceTexture and you want
things to be rendered in there in the GL context provided by the
texture? So one question that you'll need to answer then is from which
thread you're actually allowed to make that GL context "current" and do
the rendering. If you have some example code (even in Java) that does
rendering to such a SurfaceTexture, that can help you to understand how
things can be done with GStreamer, in combination with looking at the
code of the elements I mentioned before.

> I have found that there is an plugin called androidmedia which could
> do zero copy rendering on android.
> https://bugzilla.gnome.org/show_bug.cgi?id=731204
> But after some surveys, since I know so little about OpenGL stuffs, I
> still have no idea how to use it.
> And not sure if it is designed to solve problem similar as mine,
> either.

The androidmedia plugin gives access to Android specific elements, in
detail video decoders (which can do zerocopy rendering in GLES) and a
camera source element. Both unrelated to what you want.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160510/308117cc/attachment-0001.sig>


More information about the gstreamer-devel mailing list