Hey everyone,
let's assume we have a use-case of a call where videos are switched frequently. With Unified Plan, this now leads to an increasingly large SDP with as many mids as videos were previously shared and them just being marked as "inactive". Feeding the Android implementation of WebRTC with that, this leads to a lot of decoders that have been initialized, but never released.
This can be problematic on not-so-powerful devices. For example, HMDs like the Vuzix M400 or the RealWear HMT-1 will be unable to initialize decoders when reaching ~14 tracks in total (I suppose because all the egl stuff of inactive tracks is still loaded and they go out of memory).
My question is: Is it possible to somehow force a release here? Removing them from the SDP does not work as this leads to my favorite m-line consistency errors. I tried disposing/releasing tracks and transceivers without any luck as this either leads to errors when closing the peerconnection or it simply has no effect and still does not trigger "release" calls in the decoder.
I feel like I am missing the proper way to deal with this. As the tracks will never be there again, there should be somehow to release the decoders here and with that free up the egl resources etc., right? My only workaround solution at the moment is releasing the peer connection and creating a new one, but that's a bit ugly as it leads to an obvious connection loss.
Any advice/ideas appreciated, thanks!