interleave ! pulsesink link doesn't work
I have a stereo LADSPA plugin I want to use to filter my audio using gstreamer. Unfortunately, I discovered that gstreamer's gstladspa plugin can't be naturally used with stereo sound sources. However, I realized that the interleave and deinterleave plugins can be used to split a 2-channel stream to 2 separate streams, which can be routed to the LADSPA plugin, and the result can then be reassembled back to 2-channel audio.
However, there is a bug between the interleave and pulsesink. Given a suitable 2-channel file, one should be able to reproduce the problem on a 10.10 installation:
de.src0 '!' queue '!' in.sink0 \
de.src1 '!' queue '!' in.sink1 \
filesrc location="$1" '!' decodebin '!' deinterleave name=de \
interleave name=in '!' audioconvert '!' pulsesink
To parse this out, the fragment is copypasted from shell script. The filename to play is specified in $1, and is decoded and split to two channels (it is a stereo file), which are then piped through queue (which seems to be necessary for some reason) to the interleave sink, which assembles them together and sends the result to pulsesink. However, pulsesink rejects this command, saying:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:
Additional debug info:
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
The failure to create stream arises from pa_stream_new() call in ext/pulse/
interleave name=il '!' audioconvert '!' flacenc '!' decodebin '!' pulsesink
also workarounds the problem, for some unfathomable reason.