Format negotiation
From Buzztard
We have to deal with various audio formats. There is integer and float, there is multi channel audio and so on. The major problem is that adder can't handle inputs of various formats. As a solution we can plug a capsfilter after adder. Now we need to set the caps on the filter to constrain the lower end to the better of the linked formats. This format has to be re-checked whenever we add or remove a link.
We can not simply intersect the src-caps of all inputs, as then we would negotiate to the lower quality.
[edit] example template caps
audio/x-raw-float
rate: [ 1, 2147483647 ]
channels: [ 1, 2147483647 ]
endianness: 1234
width: { 32, 64 }
audio/x-raw-int
channels: [ 1, 2147483647 ]
rate: [ 1, 2147483647 ]
endianness: 1234
width: 16
depth: 16
signed: true
audio/x-raw-float
rate: [ 1, 2147483647 ]
channels: 2
endianness: 1234
width: 32
audio/x-raw-int
rate: [ 1, 2147483647 ]
channels: 2
endianness: 1234
width: 16
depth: 16
signed: true
[edit] algorithm
- if any of the caps are float -> float
- count max-channels
- if int then check max width,depth of int-caps
- if float then check max depth of float-caps
For future we need to keep min/max_channels. If min_channels<max_channels reiterate wire.src and add panorama elements.



