interleave ! pulsesink link doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gst-plugins-good0.10 (Ubuntu) |
Expired
|
Low
|
Unassigned |
Bug Description
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:
gst-launch-0.10 \
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:
pulsesink.c(826): gst_pulseringbu
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.
OK, I discovered that NULLing out the channel map in the pa_stream_new() call seems to fix the problem, so therefore the problem must be with bad generation of the channel-positions in interleave source or bad handling of (valid) channel-positions in pulsesink.
I haven't yet worked out how to give custom channel-positions arrays on the gst-launch command line. Should be an array of integers, and in this case probably {1, 2}, but I haven't found the syntax to express those arrays in yet.