[mpris] Playlist extension observations

Alex Merry kde at randomguy3.me.uk
Fri Dec 10 20:17:03 CET 2010


On Friday 10 December 2010 12:41:23 Ian Monroe wrote:
> On Fri, Dec 10, 2010 at 12:12, Conor Curran 
<conor.curran at canonical.com>wrote:
> >  I just did some research on the vala dbus async api. It looks as if
> >  the
> > 
> > good vala people have taken care of the async behaviour. Therefore the
> > GetPlaylists can pretty much stay the same.
> 
> How can vala people take care of the async behavior? A d-bus api that is
> sync is sync, nothing a dbus binding can change about that. Your initial
> reasons for needing async are unclear to me, perhaps this is why I'm
> confused.

No, D-Bus is inherently asynchronous.  I think the issue Conor was having was 
purely with the bindings he was using, which were making the calls 
synchronous.  Talking about "pointers" in the context of a D-Bus spec is a 
sure sign of confusion between D-Bus interfaces and bindings.

I think we should have a CurrentPlaylist property, rather than a method, and 
then PropertyChanged can be used to notify of changes.

Also, note this comment in the ActivatePlaylist documentation:
> It is up to the media player whether this completely replaces the current
> tracklist, or whether it is merely inserted into the tracklist and the first
> track starts. For example, if the media player is operating in a "jukebox"
> mode, it may just append the playlist to the list of upcoming tracks, and
> skip to the first track in the playlist. 

So there's no guarantee that CurrentPlaylist will change when ActivatePlaylist 
is called, or that it will even be set to a sensible value.  Speaking of 
which, CurrentPlaylist needs to have a way of indicating "no current 
playlist".  That could either be returning a playlist strict with empty fields, 
or (and I think this is cleaner), returning an error message.

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.videolan.org/pipermail/mpris/attachments/20101210/ca12a337/attachment.pgp>


More information about the mpris mailing list