Playbin2 not surrendering hardware after play

Sebastian Dröge sebastian at centricular.com
Fri Nov 22 11:17:47 PST 2013


On So, 2013-11-17 at 13:10 -0700, Jeffrey Barish wrote:
> My app uses playbin2 to play sound files.  Occasionally, after playing one 
> sound file, I am not able to play another sound file because the device is still 
> in use.  I used lsof to find out which app was using it.  It turned out to be 
> my app.  I guess that something is not letting go of the hardware when it 
> should.  If I wait a while, it seems as if the hardware eventually becomes 
> available.  Most of the time, my app works perfectly.  Any thoughts about who 
> the culprit might be?
> 
> I am using ALSA, but I let playbin2 use the default audio sink.  Might it make 
> a difference if I were to specify alsasink as the sink?
> 
> I am using 0.10.36 on Lubuntu 12.04.

What are you doing with playbin after you finished playing a file? If
you set it back to the NULL state, the audio device should be released.
In READY state alsasink will have the device open.

It might also make sense for you to use PulseAudio instead of using ALSA
directly, this should also be the default on Ubuntu since a few years.

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131122/c8d24392/attachment-0001.pgp>


More information about the gstreamer-devel mailing list