GNOME Bugzilla – Bug 648181
[basetransform] Trigger upstream renegotiation if the sinkpad is (re-)linked
Last modified: 2011-05-14 10:03:04 UTC
In some situations, for example empathy/telepathy, we do not know what caps do we need to initiate pulsesrc. We even do not know what codec will be used at what sample rate. Possible codecs variations are: audio/SPEEX:8000; audio/SPEEX:16000; audio/AMR; audio/G729; audio/ILBC; ... may be CELP too. To initiate one of this codec we should initiate the source (vor example pulsesrc). Pulsesrc will automatically set 44100Hz with two channels. After Codec is started we will need 8000 or 16000 Hz with one channel (May be some time in the future 2 as well?). The curious thing, my external webcam/mic provide only 16000 Hz. So at end result CPU is really besy with resampling: mic(16000Hz/1channel)->pulsesrc(44100/2ch)->speexenc(16000/1ch). The fact it resamples two chennels insted of one make things worse. ===================================================================== So my wish is to add some kind of reinit call to pulsesrc, after speexenc (or other codec) is linked.
The pipeline looks like this: empathy(autoaudiosrc ! audioconvert ! audioresample ! volume )-> farsight(audioconvert ! audioeresample ! speexenc ! rtp...)
basetransform should probably trigger upstream renegotiation when the sinkpad is (re-)linked.
> basetransform should probably trigger upstream renegotiation when the sinkpad > is (re-)linked. Not sure if this is useful in itself. It would need to be 'anything downstream' really, to cater for e.g. src ! audioconvert ! encoder ... (and encoder swap) etc.
Maybe a structure-changed event (in both directions), but then could also just do the renegotiate event.
Yes, I'm going to push the renegotiate event changes after the release and was planning to fix this bug with the event.
That's implemented in 0.11 now and will soon be implemented in 0.10
...and unfortunately it's not really possible to implement this in 0.10 because of negotiation limitations. Sorry