[Interest] Using QMediaplayer with QAbstractVideoSurface on Android?

Lopes Yoann Yoann.Lopes at digia.com
Tue May 13 16:52:11 CEST 2014


On Android, a media player can only render to texture or directly to screen. We currently only support rendering to texture. 
The texture is created by the Android Qt Multimedia plugin following a callback from the QSGVideoNode in the scenegraph thread. That callback is a hack and doesn't allow custom QAbstractVideoSurface to work unless they replicate it. 

I'll find another way to have it working without the hack. In the meantime, you can have your custom surface working by disabling the scenegraph threaded rendering with qputenv("QSG_RENDER_LOOP", "basic").

Another thing you need to know is that the texture you'll get uses the GL_TEXTURE_EXTERNAL_OES texture target and not the regular GL_TEXTURE_2D target. You can find some information about this here http://developer.android.com/reference/android/graphics/SurfaceTexture.html and here http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt


More information about the Interest mailing list