music player database

Martin Pitt martin.pitt at
Tue Jun 16 00:17:11 PDT 2009

Hello all,

CC'ing the list.

Kay Sievers [2009-06-11 21:12 +0200]:
> Maybe we should merge only the basic classification in udev rules, and
> then put all other properties in one or more .ini files per device,
> stored them in a single directory at a well known location. And udev
> merges only the names of the one or more .ini files into to device as
> the details?

I have the first version ready for commenting on, which addresses
Kay's and Christophe's comments.

Good thing is that 10-usb-music-players.fdi is very regular and does
not use any weird fdi constructs, thus it's possible to convert it to
udev rules and ini files fully automatically (unlike the keymap
stuff). Thus we can do a "live migration" from newer hal-infos for a

I put the current stuff on

including the generated output from current hal-info trunk. If you
want to hack on it, this is how to call it:

  mkdir media-players
  python ~/fdo/hal-info/trunk/fdi/*/*/10-usb-music-players.fdi > 40-usb-music-players.rules


  * DONE: complete parsing of .fdi
  * DONE: creation of .ini files
  * DONE: creation of udev rules
  * TODO: nicer names for .ini files

As you see, the generated 40-usb-music-players.rules is pretty small
and just serves to identify a device as a media player.
ENV{ID_MEDIA_PLAYER} gives you the file name to look for (which should
be somewhere in /usr/share/libmediaplayerid/media-players/<filename>.ini):

The .ini files currently have sections 'Device', 'Media', 'Playlist',
and 'storage'.

This is a pretty comprehensive example of a "normal" USB player:

Different drive type, and special case (no usb vendor/product):

Please have a look and see whether the structure suits you. As I said,
I'll strive to generate nicer ini name files, probably by looking up
at least the vendor in usb.ids.

A big question now is finding a place where this data should live. As
a fallback we could dump it into udev-extras, but since we also have
stuff like, and
perhaps some code to infer a proper icon from a device, it would
perhaps make sense to create a libmediaplayerid project and add this
and future code there. I wouldn't like to be the primary developer on
this, since this should be driven by the
Rhythmbox/Banshee/Amarok/GStreamer/etc.  developers, but I'm fine to
continue to maintain the actual player DB, from bug reports (just as
I'm doing with hal-info nowadays).

Thanks in advance for any ideas,

Martin Pitt                        |
Ubuntu Developer (  | Debian Developer  (
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : 

More information about the devkit-devel mailing list