Login  Register

Re: TextureNames creation failed when calling GLMediaPlayer.initGL with multiple players

Posted by Peter F on Oct 31, 2014; 9:30am
URL: https://forum.jogamp.org/TextureNames-creation-failed-when-calling-GLMediaPlayer-initGL-tp4033009p4033473.html

Hello,

I know it's been a while since this came up, but I thought I'd get back in touch to let you know how things have turned out thus far.

I'm still not 100% sure what is causing the stream workers to become locked, but the chances are it's threading issue caused by our code - we have a multi-threaded system that isn't exactly thread safe yet, in particular when it comes to rendering it seems... So it looks like that one is on me.

I've been trying to get the GLMediaPlayer running on Android with mixed success, but in this case, failure would seem to be the result of the Android unit's MediaServer returning Codec instances that aren't compatible. I notice that JOGL's Android GLMediaPlayer uses an Android MediaPlayer, and then using the OpenGL texture ID contained within the SurfaceTexture, given to the Android MediaPlayer, to re-draw the video frame texture elsewhere. Pretty neat :)

You may be interested to know that this only seems to work where the devices MediaServer returns an instance of Android's OMXCodec - My theory is that only this really knows how to interact with the surface supplied by the Android Framework. I've had to circumvent JOGL slightly here and use Android's MediaCodec class, which is more likely to get an OMXCodec instance back from the OpenMax layer.

This is only on a select few devices that we're trying out, they're Android smart TV boxes from different Chinese manufacturers. The fault likely lies in their software - one drawback of an open source OS, or it could be their GPU firmware / drivers... I've tried running the JOGL demos from the Android Play Store, and the video ones don't work properly, if at all, on these devices.

For example, one device we tried was the Neo Minix:

When running the video cube demo, no video frames are drawn on the cube, the space where it should appear is black. However, the video frame does appear drawn behind the cube across the whole screen. In the logcat the device is not using the OMXCodec of the Stagefright library ( Can't quite remember which it does use, maybe ffmpeg ).

In conclusion, I don't think there's anything you need to worry about, I think the only thing to take away from this is that devices might not be correctly configured, so don't work as expected. On other devices I've tried, HP slate, Nexus7, Galaxy Tab, they all work fine with the JOGL and Android MediaPlayers.

Pete.