List supported burn speeds for CD writers

Ryan Lortie desrt at desrt.ca
Thu Jan 12 22:16:06 PST 2006


Hello.

I've written a patch that publishes the list of burn speeds that a drive
supports as the 'write_speeds' property attached to CD burners.  It
lists the (unique) supported speeds as a descending comma-separated
list.  For example:

  storage.cdrom.write_speeds = '7056,5645,4234,2822,2117'  (string)

I had to do it this way since hal doesn't support the concept of lists
of integers and the libhal interface doesn't even allow you to use lists
of strings (in any case, I believe a comma-separated string to be better
than a list of strings - far less overhead).

The reason I'm adding this is to support a feature that I've written for
nautilus-cd-burner.  The patch for that is attached to this bug:

http://bugzilla.gnome.org/show_bug.cgi?id=157899

I learnt how to fetch the burn speed information out of the MMC packet
by reading cdrecord source code.  The code tries to be extremely
paranoid and in the case that anything at all inconsistent is found it
falls back to the old behaviour (ie: get_write_speeds() returns NULL and
the new property isn't set).

Of course, more testing of this patch is appreciated and it would be
nice if people could look it over to spot any errors.  That said, I'd
like this to go in as soon as possible so we can get some end-user
testing done of the new feature in nautilus-cd-burner.

Thanks + Cheers.

((this message is not signed since the last patch sent to this list that
was signed got messed up by the web interface))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write-speed.patch
Type: text/x-patch
Size: 6187 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20060113/df42c0e7/write-speed-0001.bin


More information about the hal mailing list