List supported burn speeds for CD writers

Richard Hughes hughsient at gmail.com
Fri Jan 13 00:42:57 PST 2006


On Fri, 2006-01-13 at 01:16 -0500, Ryan Lortie wrote:
> 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.

Sounds cool!

I'll give this patch a go tonight in my daily build -- on a related
note, shouldn't we just implement integer lists and do this properly?

I guess parsing one comma delimited string isn't the end of the world.

Richard.



More information about the hal mailing list