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 679545 - [0.11] adder: not-negotiated errors
[0.11] adder: not-negotiated errors
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.11.x
Other Linux
: Normal blocker
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-07 08:22 UTC by David Klasinc
Modified: 2012-08-05 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Klasinc 2012-07-07 08:22:10 UTC
This is the pipeline that I am trying to use:

gst-launch-1.0 -v audiotestsrc freq=100 ! adder name=mix ! audioconvert ! pulsesink audiotestsrc freq=500 ! mix.

And it will result in this output:
---------------------------------------
bigwhale@thefish:~/Code/Kazam/unstable/bin$ gst-launch-1.0 -v audiotestsrc freq=100 ! adder name=mix ! audioconvert ! pulsesink audiotestsrc freq=500 ! mix.
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAdder:mix.GstPad:sink_0: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAdder:mix.GstPad:sink_0: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAdder:mix.GstPad:sink_0: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAdder:mix.GstPad:sink_1: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAdder:mix.GstPad:sink_1: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAdder:mix.GstPad:sink_1: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1
ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert0: not negotiated
Additional debug info:
gstbasetransform.c(2076): gst_base_transform_handle_buffer (): /GstPipeline:pipeline0/GstAudioConvert:audioconvert0:
not negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

----------------------------------------------
Pipeline without adder works as expected.
Comment 1 David Klasinc 2012-07-07 08:22:53 UTC
Here's the link to the prettier formatting of the output:

http://paste.ubuntu.com/1078465/
Comment 2 Tim-Philipp Müller 2012-07-07 13:01:14 UTC
I was looking at this yesterday. The reason for the not-negotiated error is that adder never sends a CAPS event downstream.

The negotiation code is a bit weird though, and so is the gst_pad_set_caps() in gstcompat.h which sends caps events upstream...

I think we'll need some clarifications on how (re)negotiation is supposed to work here.
Comment 3 David Klasinc 2012-07-10 14:57:43 UTC
If there's anything I could do to help resolve this? Apart from the obvious testing? I am working on Kazam Screencaster and mixing two audio sources is disabled because of this and I'd like to resolve this as soon as possible so that fix lands in Debian/Ubuntu.
Comment 4 Tim-Philipp Müller 2012-08-04 23:51:55 UTC
At least the most basic stuff should work now hopefully; sorry it took so long to get this fixed.

commit 24478261a26a464ecf827787b94cc04061c2a88f
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Sun Aug 5 00:41:10 2012 +0100

    adder: send CAPS event downstream fixing not-negotiated errors
    
    Make sure to send a CAPS event downstream when we get our
    first input caps. This fixes not-negotiated errors and
    adder use with downstream elements other than fakesink.
    
    Even gst-launch-1.0 audiotestsrc ! adder ! pulsesink works now.
    
    Also, flag the other sink pads as FIXED_CAPS when we receive
    the first CAPS event on one of the sink pads (in addition to
    setting those caps on the the sink pads), so that a caps query
    will just return the fixed caps from now on.
    
    There's still a race between other upstreams checking if
    caps are accepted and sending a first buffer with possibly
    different caps than the first caps we receive on some other
    pad, but such is life.
    
    Also need to take into account optional fields better/properly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679545

commit ec13933aaaa15cc7c0b83fd13abf8ccd12e47b9b
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Sat Aug 4 22:25:08 2012 +0100

    tests: add adder test to check that caps are sent downstream
Comment 5 Tim-Philipp Müller 2012-08-05 10:53:02 UTC
>     There's still a race between other upstreams checking if
>     caps are accepted and sending a first buffer with possibly
>     different caps than the first caps we receive on some other
>     pad, but such is life.

Err, that should've been "... and sending a CAPS event with possibly different caps than the first caps we received on some other pad" obviously.