After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764363 - videoaggregator: Does not take into account the best output format that is computed
videoaggregator: Does not take into account the best output format that is co...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.6.0
Other Linux
: Normal blocker
: 1.8.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 756207
Blocks:
 
 
Reported: 2016-03-30 12:37 UTC by Sebastian Dröge (slomo)
Modified: 2016-04-07 10:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
videoaggregator: Use best format to determine downstream video format (1.14 KB, patch)
2016-03-30 15:46 UTC, Thibault Saunier
rejected Details | Review
videoaggregator: repsect the result of find_best_format in the default update_caps (7.50 KB, patch)
2016-04-04 11:03 UTC, Matthew Waters (ystreet00)
committed Details | Review

Description Sebastian Dröge (slomo) 2016-03-30 12:37:20 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.
Comment 1 Matthew Waters (ystreet00) 2016-03-30 13:00:08 UTC
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.
Comment 2 Thibault Saunier 2016-03-30 14:27:48 UTC
(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.
Comment 3 Thibault Saunier 2016-03-30 15:46:58 UTC
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 4 Thibault Saunier 2016-03-30 17:11:04 UTC
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.
Comment 5 Matthew Waters (ystreet00) 2016-04-04 11:03:57 UTC
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.
Comment 6 Thibault Saunier 2016-04-05 09:20:53 UTC
Review of attachment 325319 [details] [review]:

It looks good to me and I think using gst_caps_merge makes sense.
Comment 7 Sebastian Dröge (slomo) 2016-04-05 11:21:05 UTC
Merge is almost always the right thing to do. It's equivalent to append but creates smaller caps if possible.
Comment 8 Matthew Waters (ystreet00) 2016-04-06 01:10:24 UTC
But merge loses the ordering which is actually important here.

Thibault: have you tested it with GES?
Comment 9 Sebastian Dröge (slomo) 2016-04-06 06:51:49 UTC
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.
Comment 10 Thibault Saunier 2016-04-06 10:21:34 UTC
> Thibault: have you tested it with GES?

Yes, seems to work as expected
Comment 11 Matthew Waters (ystreet00) 2016-04-07 10:34:23 UTC
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