textoverlay: cairo font corruption on windows - a modest proposal
Cairo has "issues" on windows with font corruption in multi-threaded environment, and this affects GStreamer
as we use Cairo in
textoverlay, for example.
Here is a summary of the text issues.
Fixing Cairo itself is a significant task. Until that happens, I propose we add a mutex in the base text overlay element, windows only, that protects any Cairo font and text rendering calls, until we do have a fix in Cairo itself. As this could kill performance, we could make this a property to be enabled by the user.
Yes, this is a shameless hack, but the alternative at the moment is to get strange boxes or no text at all
textoverlay in certain scenarios on windows.