Locking or not locking (CD drives)?

James "Doc" Livingston doclivingston at gmail.com
Fri May 26 20:44:01 PDT 2006


On Thu, 2006-05-25 at 23:17 +0100, Bastien Nocera wrote:
> Should Totem lock the CD/DVD drive when playing back data from it?
> http://bugzilla.gnome.org/show_bug.cgi?id=339754
> or should it not lock it and handle the eject gracefully?
> http://bugzilla.gnome.org/show_bug.cgi?id=340159

If you're using anything cdparanoia-based, the second option won't work
for audio cds. Libcdparanoia will block in the thread that is accessing
the cd if it is ejected without stopping cd-access first.

AIUI this is a design flaw, which can't really be fixed without chaning
the API. Libcdio is better, and won't hang the thread like libcdparanoia
will. However I don't think libcdio has been ported to non-Linux
systems, and many linux systems use libcdparanoia by default.


In the case of Totem using GStreamer 0.10, I think it means the playback
pipeline can't get shut down properly and the sounds device might not
get released, but you'd want to check that. I'm not sure what Xine would
do, but I imagine it isn't good either.


Cheers,

James "Doc" Livingston
-- 
September 25th: Discovered lots of things about Dynamic HTML. Notably
that almost every site attempting to use it is crap. -- Alan Cox's Diary



More information about the hal mailing list