2006/09/26

Bindata API in Gonzo

New exciting (can you feel it) releases from us! XMMS2 - Dr. Gonzo was released today. It's a feature addition release which contains DAAP streaming plugin and Monkeys Audio decoder and more.

Of course the cool things happens under the hood. We have added a framework for storing binary data on the server (primary for use of cover art). This is called bindata. The API can be used by plugins and by clients, currently only id3v2 and faad plugins have added support for coverart extraction. Plugins use the xmms_bindata_plugin_add() call that returns the md5 hash for the data. The hash can later be used to extract the covertart from a client. The hash is stored in the medialib as "picture_front".

The clients can easily show coverart with this method, a simple example with python-like-code:

if mediadata.has_key("picture_front"):
pic = xmms.bindata_retreive(mediadata["picture_front"])
show_image(pic)
Clients can also add coverart by calling bindata_add() with the data and the length, this will return the hash that is suitable to save in the picture_front property. This is already done by xmms2-covers that will fetch coverart from several different sources for your collection.

Clients can also of course remove bindata by calling bindata_remove() with the hash as argument.

We hope that the addition of this API will be giving coverart prettyniess to all clients.

No comments: