Skip to content
  • Mathieu Duponchelle's avatar
    audioaggregator: always use downstream's rate requirements · bced52d2
    Mathieu Duponchelle authored and Sebastian Dröge's avatar Sebastian Dröge committed
    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.
    bced52d2