After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648181 - [basetransform] Trigger upstream renegotiation if the sinkpad is (re-)linked
[basetransform] Trigger upstream renegotiation if the sinkpad is (re-)linked
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.11.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-19 07:28 UTC by Oleksij Rempel
Modified: 2011-05-14 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Oleksij Rempel 2011-04-19 07:28:52 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.
Comment 1 Oleksij Rempel 2011-04-19 07:40:41 UTC
The pipeline looks like this:
empathy(autoaudiosrc !  audioconvert ! audioresample ! volume )-> farsight(audioconvert ! audioeresample ! speexenc ! rtp...)
Comment 2 Sebastian Dröge (slomo) 2011-04-19 07:58:31 UTC
basetransform should probably trigger upstream renegotiation when the sinkpad is (re-)linked.
Comment 3 Tim-Philipp Müller 2011-04-19 08:42:14 UTC
> 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.
Comment 4 Tim-Philipp Müller 2011-04-19 08:42:56 UTC
Maybe a structure-changed event (in both directions), but then could also just do the renegotiate event.
Comment 5 Sebastian Dröge (slomo) 2011-04-26 14:00:47 UTC
Yes, I'm going to push the renegotiate event changes after the release and was planning to fix this bug with the event.
Comment 6 Sebastian Dröge (slomo) 2011-05-05 14:06:44 UTC
That's implemented in 0.11 now and will soon be implemented in 0.10
Comment 7 Sebastian Dröge (slomo) 2011-05-14 10:03:04 UTC
...and unfortunately it's not really possible to implement this in 0.10 because of negotiation limitations. Sorry