Re: [Rhythmbox-devel] Storage based mp3 players

On Fri, 2005-06-17 at 18:04 +1000, Nicholas Gill (mythagel) wrote:
> The way that i had written my original (standalone) program is that it
> queries HAL (and acts on it via gnome-volume-manager) for when a device
> is plugged in.

<snip HAL xml>

> So i can query hal for all devices having category portable_audio_player
> and determine the mount point from that.
> A generic directory of mp3's i suppose could be handled in g-v-m akin to
> how a camera is distinct from a directory containing photos, yet they
> are both loaded with gPhoto. A problem being that there is no standard
> directory for mp3 music like there is for digital camera media. And i
> think scanning for all gstreamer compatible media on a device would be
> too slow.

I'm currently (in my audiocd branch) working on stuff that should make
create removable media sources easier. It still needs a fair bit of
work, and there are quite a few bugs in it. Basically what it does is
monitor for GnomeVfsVolume mounts and pass them off to whatever can
handle them.

If you wanted to take a look this it might make it easier for you, and
it would be good for me to get some feedback on whether it help to make
RB handle more devices (which is the plan).

If you do take a stab at trying it there are a couple of things you need
to do:

a) write a *_is_whatever function which checks whether it can handle a
particular device (passed as a GnomeVFSVolume). If you need to do any
HAL stuff, you can use gnome_vfs_volume_get_hal_udi.

b) write a *_new() function to create your source.

c) write *_device_plugged and *_device_unplugged methods to handle the
plug/unplug events; by loading the songs off the device, and removing
them from the database respectively.

Looking at the source of rb-ipod-source would be a good start.


James "Doc" Livingston 
"can't go mucking with a `void *'" -- MPW C error message

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]