How to allow for multiple qmlglsink instances on Android

I am working on a fork of QGroundControl, where I am trying to get multiple qmlglsink instances to work on Android. It works on my Linux and Windows build, but I am getting the following log error on Android.

Cannot map External OES textures

I found this related fix for Windows Allow for multiple qmlglsink instances on windows (#1004) · Issues · GStreamer / gstreamer · GitLab and was wondering how I could apply this to Android. Any pointers are appreciated.

you may try to use compositor to merge multiple sources and play it into one sink.

That error is not related to multiple QML elements at all. Multiple qmlglsink elements should work just fine on all platforms.

External OES textures can be produced by the android video decoder and are not CPU-mappable. If you (or something else) are attempting to map those buffers, it will fail.

My goal is to play one source into multiple sinks for split screen.

Playing a source into just one qmlglsink works fine for me on Android. However, once I tee a second qmlglsink, I get the External OES textures log error. Do you have an idea for why this is? Thanks.

To provide more context, here is what my pipeline looks like:

                                                                 +-> queue -> videoSinkBin
                                                                 |
rtspsrc -> rtpjitterbuffer -> parsebin -> queue -> decodebin -> tee
                                                                 |
                                                                 +-> queue -> videoSinkBin

where videoSinkBin is composed of:

glupload --> glcolorconvert --> qmlglsink

I see. Try putting the glupload ! glcolorconvert before the tee so that the OES textures are removed before duplicating.

2 Likes

Thanks, that seemed to work!