Skip to content

Draft: SubOverlay baseclass

Mark Nauwelaerts requested to merge mnauw/gstreamer:suboverlay into main

The goal here is to avoid the copy-paste clones of (much of) basetextoverlay that seem to have grown over the years. So it is different from PR !4938 in that it is not so much focused on text/markup and is less ambitious in introducing new API. Well, yes, there is a baseclass, but that is "local" as in a matter of implementation choice of element subclass (as opposed to meta that travel elsewhere).

Although, once the duplication is out of the way, it may well be easier to have a more advanced GstVideoOverlayComposition (or some such), which allows for more/else than (alpha) blending and/or could render "lazily" when called at a later (downstream) down (along with parameters available at that time, e.g. video or render window info). In any case, as mentioned, any such is not the (primary) goal here.

These commits also include ports of (pango) basetextoverlay, dvdspu and dvbsuboverlay. It should also be easy to port some other elements to this baseclass, notably assrender, ttmlrender and ceaccoverlay (which I could also tend to, if there is any such interest and some test samples are available).

In shameless fashion, the baseclass has been put in -base, so the ported basetextoverlay could make use of it (or could it use something in -bad also nowadays in the mono repo?). Of course, that (and use of GST_USE_UNSTABLE_API) should still be sorted out, along with other comments and observations that come up.

Merge request reports