Problem when binding Android Surface to glimagesink

Wei Lee wm7101 at gmail.com
Fri May 6 07:22:33 UTC 2016


Hi Sebastian,

Thanks for your reply. The following is my GStreamer code.

http://paste.ofcode.org/3npqJKDwgavsxnGvL8ws5k


Basically, I follow the tutorial and does not modify a lot. And it could
work well if I use SurfaceView and get Surface just like the tutorial does. 

However, since I want to play video using Google cardboard SDK, I use an
OpenGL ES engine on Android called Rajawali. It gives me a Surface which is
created by a SurfaceTexture. If I use the Surface like this:

SufaceTexture surfaceTexture; // Created by engine
Surface surface = new Surface(surfaceTexture);
nativeSurfaceInit(surface);

In this case, it will draw the content on a new Context which is not
rendered by the engine. 
However, if I use Surface by Android MediaPlayer like this:

SufaceTexture surfaceTexture; // Created by engine
Surface surface = new Surface(surfaceTexture);
MediaPlayer mp = MediaPlayer.create(mContext, R.raw.test);
mp.setSurface(surface);
mp.start();

It will not create a new context and render on the current context so I can
see the result.
It seems glimagesink will create a new context to draw by default.
Is it possible to do some operations to make glimagesink draw content on
original context just like the MediaPlayer does?

Thanks a lot for your help.

Best regards,
Wei




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-when-binding-Android-Surface-to-glimagesink-tp4677346p4677361.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list