adder: send CAPS event downstream fixing not-negotiated errors
authorTim-Philipp Müller <tim@centricular.net>
Sat, 4 Aug 2012 23:41:10 +0000 (00:41 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Sat, 4 Aug 2012 23:41:10 +0000 (00:41 +0100)
commit24478261a26a464ecf827787b94cc04061c2a88f
treefd502d81d523be44b84985037ccbda23364b193f
parentec13933aaaa15cc7c0b83fd13abf8ccd12e47b9b
adder: send CAPS event downstream fixing not-negotiated errors

Make sure to send a CAPS event downstream when we get our
first input caps. This fixes not-negotiated errors and
adder use with downstream elements other than fakesink.

Even gst-launch-1.0 audiotestsrc ! adder ! pulsesink works now.

Also, flag the other sink pads as FIXED_CAPS when we receive
the first CAPS event on one of the sink pads (in addition to
setting those caps on the the sink pads), so that a caps query
will just return the fixed caps from now on.

There's still a race between other upstreams checking if
caps are accepted and sending a first buffer with possibly
different caps than the first caps we receive on some other
pad, but such is life.

Also need to take into account optional fields better/properly.

https://bugzilla.gnome.org/show_bug.cgi?id=679545
gst/adder/gstadder.c
gst/adder/gstadder.h