GNOME Bugzilla – Bug 752911
Regression: interaudiosink/src does not work with adder
Last modified: 2015-07-28 04:19:08 UTC
This can be demonstrated with the following pipeline which works on gstreamer 1.4.5 (fedora 22) but does not seem to work consistently in gstreamer 1.5.2 (compiled from source, in uninstalled environment) gst-launch-1.0 audiotestsrc ! interaudiosink interaudiosrc ! adder ! autoaudiosink It appears that *sometimes* it doesn't fail in 1.5.2. But when it does, it fails with: $ gst-launch-1.0 audiotestsrc ! interaudiosink interaudiosrc ! adder ! autoaudiosink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Redistribute latency... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstInterAudioSrc:interaudiosrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstInterAudioSrc:interaudiosrc0: streaming task paused, reason not-negotiated (-4) Execution ended after 0:00:00.001261506 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... Playing around with my actual code and the GST dot debug tool, it appears that the adder ends up with a S16LE src pad and the interaudiosrc has a S32LE sink pad, and that's why it fails. Not sure why the adder provokes it. Adding an audioconvert element doesn't seem to make a difference.
Seems perhaps could be related to https://bugzilla.gnome.org/show_bug.cgi?id=730051 ?
This seems to be some timing issue related to caps set/get in sink and src When it is working 0:00:00.054350690 23877 0x82a5090 ERROR basesrc gstbasesrc.c:3194:gst_base_src_default_negotiate:<audiotestsrc0> caps of src: audio/x-raw, format=(string){ S16LE, S32LE, F32LE, F64LE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ] 0:00:00.054456572 23877 0x82a5090 ERROR basesink gstbasesink.c:4959:gst_base_sink_default_query:<interaudiosink0> Checking if requested caps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1 are a subset of pad caps audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ] result 1 0:00:00.054500964 23877 0x82a5090 ERROR interaudiosink gstinteraudiosink.c:254:gst_inter_audio_sink_set_caps: Vineeth finfo present Pipeline is live and does not need PREROLL ... Redistribute latency... 0:00:00.054765192 23877 0x82a50c0 ERROR interaudiosrc gstinteraudiosrc.c:241:gst_inter_audio_src_get_caps: Vineeth finfo present 0:00:00.054812745 23877 0x82a50c0 ERROR basesrc gstbasesrc.c:3194:gst_base_src_default_negotiate:<interaudiosrc0> caps of src: audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1 when it is not working 0:00:00.056770104 23859 0x9d4f0c0 ERROR interaudiosrc gstinteraudiosrc.c:251:gst_inter_audio_src_get_caps: Vineeth finfo absent 0:00:00.056771741 23859 0x9d4f090 ERROR basesrc gstbasesrc.c:3194:gst_base_src_default_negotiate:<audiotestsrc0> caps of src: audio/x-raw, format=(string){ S16LE, S32LE, F32LE, F64LE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ] 0:00:00.056824344 23859 0x9d4f0c0 ERROR basesrc gstbasesrc.c:3194:gst_base_src_default_negotiate:<interaudiosrc0> caps of src: audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved 0:00:00.056938877 23859 0x9d4f090 ERROR basesink gstbasesink.c:4959:gst_base_sink_default_query:<interaudiosink0> Checking if requested caps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1 are a subset of pad caps audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ] result 1 0:00:00.057021710 23859 0x9d4f090 ERROR interaudiosink gstinteraudiosink.c:254:gst_inter_audio_sink_set_caps: Vineeth finfo present gst_inter_audio_src_get_caps is getting called before gst_inter_audio_sink_set_caps in case of issue scenario... This does work by reverting the below patch as the negotiation does not fail, http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/gst/inter/gstinteraudiosink.c?id=76f879525dd63eb75e2f1d4161564fda4a97b888
It's indeed the same bug. In practice, before adder, interleave, audiointerleave or audiomixer, you need to add capsfilter to fix the same input caps. The way GStreamer does caps negotiation does not allow for this kind of "mixer" where all the inputs need to have something in common (such as the clock rate in this case) to auto-negotiate reliably. *** This bug has been marked as a duplicate of bug 730051 ***
Not sure if that is the same issue... This is not an always issue.. this happens some times with the same pipeline due to timing problems i guess.. And the same does not happen on reverting the commit mentioned above which was done on 22/10/2014, after the previous bug was reported..
If a capsfilter is required, shouldn't that be in the documentation for adder?