Unable to PAUSE/STOP when using filesink and a FIFO pipe
I'm using GStreamer to play audio on a FIFO pipe created with the pipe source module of pulseaudio:
pactl load-module module-pipe-source file=$HOME/mypipe.fifo source_properties=device.description=MyPipeSrc rate=48000 channels=2
If I try to set the state to PAUSE the process hangs. From the debugger it seems that the mainloop is blocked on gst_element_set_state that is blocked in a mutex.
The issue can be reproduced with gst-launch-1.0:
gst-launch-1.0 audiotestsrc ! audioconvert ! filesink location=$HOME/mypipe.fifo
If you press CTRL+C to stop the pipeline, the process doesn't stop.
> gst-launch-1.0 -v audiotestsrc ! audioconvert ! filesink location=mypipe.fifo
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)44100, format=(string)S8, channels=(int)1
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)44100, format=(string)S8, channels=(int)1
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = audio/x-raw, layout=(string)interleaved, rate=(int)44100, format=(string)S8, channels=(int)1
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw, layout=(string)interleaved, rate=(int)44100, format=(string)S8, channels=(int)1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.992588105
Setting pipeline to PAUSED ...
See back_trace.txt