capssetter: negotiation failure
Example pipeline : videotestsrc ! video/x-raw,format=v210 ! videoconvert ! capssetter caps="video/x-raw" ! video/x-raw,format=UYVY ! fakesink
This should not fail (the capssetter is in 'join' mode, which will add/override the incoming caps values). Theoretically videoconvert
should end up negotiating to UYVY
.... but it doesn't (it ends up doing passthrough).
The problem is that the caps transformation function of capssetter
only works in one direction (converting upstream caps to downstream ones). When converting caps from downstream to upstream it either returns the query filter caps or ANY.
Ideally it should do something smarter to allow passing some of the downstream information (i.e. negotiated caps) upstream if at least the caps name is the same.
Further example: capssetter caps="video/x-raw,pixel-aspect-ratio=8/9
if you wanted to override the PAR. In this case , when converting caps in reverse, capssetter could detect that the field will be overriden and therefore just return the downstream caps with the pixel-aspect-ratio
field removed (it will replace it anyway).