music player database
Martin Pitt
martin.pitt at ubuntu.com
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
while.
I put the current stuff on
http://people.ubuntu.com/~pitti/tmp/hal-udev-music-players/
including the generated output from current hal-info trunk. If you
want to hack on it, this is how to call it:
wget http://people.ubuntu.com/~pitti/tmp/hal-udev-music-players/fdi2rules.py
mkdir media-players
python fdi2rules.py ~/fdo/hal-info/trunk/fdi/*/*/10-usb-music-players.fdi > 40-usb-music-players.rules
Status:
* 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):
http://people.ubuntu.com/~pitti/tmp/hal-udev-music-players/40-usb-music-players.rules
The .ini files currently have sections 'Device', 'Media', 'Playlist',
and 'storage'.
This is a pretty comprehensive example of a "normal" USB player:
http://people.ubuntu.com/~pitti/tmp/hal-udev-music-players/media-players/781-7432_7433_7434_7435_74c0_74c1_74c2_74c3.ini
Different drive type, and special case (no usb vendor/product):
http://people.ubuntu.com/~pitti/tmp/hal-udev-music-players/media-players/sony-psp.ini
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 http://bugzilla.gnome.org/show_bug.cgi?id=551403, 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
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/devkit-devel/attachments/20090616/2a410e17/attachment.pgp
More information about the devkit-devel
mailing list