GNOME Bugzilla – Bug 764363
videoaggregator: Does not take into account the best output format that is computed
Last modified: 2016-04-07 10:34:39 UTC
+++ This bug was initially created as a clone of Bug #756207 +++ That last patch breaks pipeline like: gst-launch-1.0 videotestsrc num-buffers=30 pattern=solid-color foreground-color=0 ! videoconvert ! video/x-raw,format=RGBA ! textoverlay text='test yes yo' color=5293848812 valignment=center font-desc='Serif Italic 36' ! compositor ! videoconvert ! autovideosink where the compositor should force an ALPHA channel downstream as upstream has one so that. Currently instead of showing the compositor checkerboard as expected it shows the text over a black frame.... which totally breaks titles in pitivi.
And that works for me with default master. autovideosink chooses glimagesink here (as no Xv ports for xvimagesink) which only takes RGBA. Forcing ximagesink exhibits the problem. compositor's negotiation needs fixing to prefer formats with alpha.
(In reply to Matthew Waters (ystreet00) from comment #1) > And that works for me with default master. autovideosink chooses > glimagesink here (as no Xv ports for xvimagesink) which only takes RGBA. > Forcing ximagesink exhibits the problem. > > compositor's negotiation needs fixing to prefer formats with alpha. It used to prefer formats with alpha only if some sinkpads had an alpha channel which was the correct behaviour.
Created attachment 325030 [details] [review] videoaggregator: Use best format to determine downstream video format We were computing it but not using it at all, we need to make sure that we respect it.
Comment on attachment 325030 [details] [review] videoaggregator: Use best format to determine downstream video format It is not complete as I got some crashes with it.
Created attachment 325319 [details] [review] videoaggregator: repsect the result of find_best_format in the default update_caps Not quite sure about the gst_caps_merge whether it should be a gst_caps_append instead.
Review of attachment 325319 [details] [review]: It looks good to me and I think using gst_caps_merge makes sense.
Merge is almost always the right thing to do. It's equivalent to append but creates smaller caps if possible.
But merge loses the ordering which is actually important here. Thibault: have you tested it with GES?
Merge doesn't lose the ordering. It should only merge structures together if this wouldn't break the ordering. There are some unit tests about that.
> Thibault: have you tested it with GES? Yes, seems to work as expected
commit aa2b23fe395dcff3343a17ecf976f01298aa6896 Author: Matthew Waters <matthew@centricular.com> Date: Mon Apr 4 20:55:51 2016 +1000 videoaggregator: repect the result of find_best_format in the default update_caps We weren't using the result of find_best_format at all. Also, move the find_best_format usage to the default update_caps() to make sure that it is also overridable. https://bugzilla.gnome.org/show_bug.cgi?id=764363 and 1.8 faaa1715ee08de1b9ac151519cd919fdff0ad309