GNOME Bugzilla – Bug 795397
audiomixer caps negotiation broken
Last modified: 2018-05-06 09:32:51 UTC
This pipeline fails on 1.14: gst-launch-1.0 audiotestsrc ! audio/x-raw,rate=48000 ! audiomixer ! audioresample ! audio/x-raw,rate=44100 ! fakesink Some logs: INFO audioaggregator gstaudioaggregator.c:671:gst_audio_aggregator_sink_getcaps:<audiomixer0:sink_0> Getting caps with filter audio/x-raw, rate=(int)48000, format=(string){ 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, S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2147483647 ] DEBUG audioaggregator gstaudioaggregator.c:673:gst_audio_aggregator_sink_getcaps:<audiomixer0:sink_0> sink template 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)44100, channels=(int)[ 1, 2147483647 ], layout=(string)interleaved DEBUG audioaggregator gstaudioaggregator.c:674:gst_audio_aggregator_sink_getcaps:<audiomixer0:sink_0> downstream caps audio/x-raw, format=(string){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)44100, channels=(int)[ 1, 2147483647 ], layout=(string)interleaved; audio/x-raw, format=(string){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved INFO audioaggregator gstaudioaggregator.c:675:gst_audio_aggregator_sink_getcaps:<audiomixer0:sink_0> returned sink caps : EMPTY I guess the mixer now fixates its internal format before considering the sink caps?
Did this work before 1.14 or why did you mark it as blocker? When was it last known to work?
Yes; this regressed after an update from 1.12.4 to 1.14.0.
Did one of you bisect this already?
gst-plugins-bad 536cb125773f36ecc46815e72ffa7ae2bba783d7 is the first bad commit commit 536cb125773f36ecc46815e72ffa7ae2bba783d7 Author: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> Date: Sat Jul 22 20:32:20 2017 +0200 audioaggregator: implement input conversion https://bugzilla.gnome.org/show_bug.cgi?id=786344
Created attachment 371277 [details] [review] audioaggregator: fix filtered getcaps In the situation described in https://bugzilla.gnome.org/show_bug.cgi?id=795397, downstream_caps consists of two structures, the first with the preferred rate, if at all possible (44100), the second containing the full range of allowed rates, as audioresample correctly tries to negotiate passthrough caps. As audioaggregator cannot perform rate conversion, it wants to return a fixated rate in its getcaps implementation, however it previously directly used the first structure in the caps allowed downstream, without taking the filter into consideration, to determine the rate to fixate to. With this, we first intersect our downstream caps with the filter, in order not to fixate to an unsupported rate.
Comment on attachment 371277 [details] [review] audioaggregator: fix filtered getcaps This gets the order of the filter caps mixed up. You should use GST_CAPS_INTERSECT_FIRST Otherwise good to go
Attachment 371277 [details] pushed as 83939c8 - audioaggregator: fix filtered getcaps
*** Bug 777915 has been marked as a duplicate of this bug. ***