parsebin/decodebin3: Fix usage of subtitle "parsers"
Decoders exposing themselves as parsers
Some of the "subtitle parsers" are not parsers, they are decoders (they convert from their format to a "raw" text format).
- They should not be used in
parsebin
- They should be considered as "Decoders" in
decodebin3
. i.e. we should fallback to plugging them if the format doesn't match the output caps, just like a regular audio/video decoder
The straightforward solution would therefore be to:
-
Change the classification of "decoders" subtitle elements to Subtitle/Decoder
Except .. this brings in a serious issue, which is that it would mean that subtitle formats can no longer be "parsed" within parsebin
and:
- Either the stream isn't exposed at all (because it's not recognized as valid)
- Or it is... but it's no longer a "timed and parsed elementary stream" (i.e. with
GST_FORMAT_TIME
segment and containing invidual buffers for each subtitle). This will break everything for users ofparsebin
(such asurisourcebin
,decodebin3
, ...)
A potential solution would be to refactor those "decoder" elements and split out the parsing code from the "rendering" (to pango text) decoding.