audioaggregator: always use downstream's rate requirements
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 15 Jul 2019 14:08:34 +0000 (16:08 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 18 Jul 2019 05:43:14 +0000 (08:43 +0300)
commitbced52d2e8618750e30398f3d03dbac2f3ef4fee
tree64030d03f8bda94dddd277fa5bb8854e97664bfe
parent4d5d7bf1c06149040f2ebc69b707eb4ce45aa454
audioaggregator: always use downstream's rate requirements

We were previously only fixating the rate in the getcaps
implementation when downstream was requiring a discrete value,
causing negotiation to fail when upstream was capable of rate
conversion, but not made aware that it had to occur.

Instead of fixating the rate, we can simply update our sink
template caps with whatever GValue the downstream caps are holding
as their rate field.

Allows negotiation to successfully complete with pipelines such as:

audiotestsrc ! audio/x-raw, rate=48000 ! audioresample ! audiomixer name=m ! \
audio/x-raw, rate={800, 1000} ! autoaudiosink \
audiotestsrc ! audio/x-raw, rate=44100 ! audioresample ! m.
gst-libs/gst/audio/gstaudioaggregator.c