Switching bluetooth sinks

Thomas Green TGreen2 at Sorenson.com
Thu Oct 9 15:02:06 PDT 2014


All,



I have a pipeline that starts like this (this is just a representation, it is in c++):



gst-launch-0.10 filesrc location=Audio.raw ! audio/x-mulaw, rate=8000, channels=1 ! mulawdec ! queue ! audiorate ! output-selector



and have two alsa sinks connected to the output selector.



My program detects when a Bluetooth audio device comes online, and when it does, it adds another sink to the bin, connects it to the output selector, switches to that, and it continues to play along.



The issue is when the Bluetooth device drops the connection.  I catch the Bluetooth signal that the audiosink has disconnected, and I set the output selector back to the original sink.  I no longer get any output and the following error message (copious repetitions) when debug level is set to 3:



0:00:42.006047931 10218    0xd04f0 WARN                    alsa audio/pcm_bluetooth.c:835:bluetooth_playback_poll_revents: alsalib error: read error: Resource temporarily unavailable (11): Resource temporarily unavailable



If I try to set the pipeline state to NULL before I try to switch back the sink, the state change hangs, and I still get the error messages.



Is there something basic that I’m missing in switching back?  How can I mitigate this, and reconnect to the original sink, and carry on playing?



Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141009/e4c36268/attachment.html>


More information about the gstreamer-devel mailing list