After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 570841 - Support the MPRIS D-Bus interface
Support the MPRIS D-Bus interface
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-07 05:05 UTC by John Millikin
Modified: 2010-08-31 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MPRIS extension (11.55 KB, patch)
2009-02-27 02:25 UTC, John Millikin
needs-work Details | Review
MPRIS extension (v2) (19.53 KB, patch)
2009-02-28 04:46 UTC, John Millikin
reviewed Details | Review
MPRIS extension (v3) (19.53 KB, patch)
2009-03-01 22:04 UTC, John Millikin
reviewed Details | Review
Add support for the MPRIS v2 draft spec (36.83 KB, patch)
2010-07-20 17:55 UTC, Bertrand Lorentz
none Details | Review

Description John Millikin 2009-02-07 05:05:18 UTC
Banshee's support for retrieving metadata about tracks over D-Bus is effectively non-existent. Rather than write our own interface, we can implement the MPRIS standard.

http://wiki.xmms2.xmms.se/wiki/MPRIS
http://wiki.xmms2.xmms.se/wiki/Media_Player_Interfaces
Comment 1 John Millikin 2009-02-27 02:25:53 UTC
Created attachment 129624 [details] [review]
MPRIS extension

Adds a new extension, Banshee.Mpris, which implements the MPRIS interface.

MPRIS seems oriented more towards single-source players, such as VLC or XMMS, rather than multi-source players like Banshee. This extension implements controlling playback and retrieving information about the current track, but does not implement the TrackList interface.

Unfortunately, MPRIS seems to have been designed by people unfamiliar with D-BUS in general. Some of the design decisions, such as requiring that the registered bus name begin with "org.mpris.", are insane. This extension tries to conform as best possible, but I advise against using MPRIS as the sole or even preferred D-BUS interface for Banshee.
Comment 2 Gabriel Burt 2009-02-28 01:01:07 UTC
Hey John, looks pretty good to me.  Change tabs for 4 spaces, and don't forget your copyright headers.

Does Bus.Session not work?  Is there something in Banshee.ServiceStack (DBus*) that would help?
Comment 3 John Millikin 2009-02-28 04:46:59 UTC
Created attachment 129707 [details] [review]
MPRIS extension (v2)

> Hey John, looks pretty good to me.  Change tabs for 4 spaces, and don't forget
> your copyright headers.
Oops, developed this as a standalone and forgot to change to Banshee style. Fixed.

> Does Bus.Session not work?  Is there something in Banshee.ServiceStack (DBus*)
> that would help?
See the comment in `Service.find_bus()`. MPRIS *requires* that service names start with `org.mpris.`, which is frankly somewhat insane. Bus.Session will reuse the existing session, and will use the name "org.bansheeproject.Banshee".

In addition, MPRIS assumes that it's the only interface on the connection and seizes object paths like / and /Player. It's not well designed, from a D-BUS standpoint, and I don't want it getting mixed up with the real Banshee interfaces. If at some future point a new version of MPRIS is released that fixes these shortcomings, the extension can be amended to use the shared bus connection.
Comment 4 Gabriel Burt 2009-03-01 21:56:29 UTC
Ok, rename find_bus to FindBus and it looks fine to me.

Aaron, are you ok w/ this going in/being on by default?
Comment 5 John Millikin 2009-03-01 22:04:20 UTC
Created attachment 129807 [details] [review]
MPRIS extension (v3)

> rename find_bus to FindBus
done
Comment 6 Gabriel Burt 2009-06-02 17:07:01 UTC
John, is this patch ready to be enabled and shipped in a stable release?  Any reservations?
Comment 7 Bertrand Lorentz 2010-05-20 20:59:06 UTC
FYI, I've started working on this, starting from the patch here.

There's ongoing work to update the MPRIS spec, fixing the issues outlined by John :
http://gitorious.org/~mirsal/mpris/mirsal

My plan is to only support that new version of spec, removing all the dbus-related crazyness.
Comment 8 Bertrand Lorentz 2010-07-20 17:55:26 UTC
Created attachment 166227 [details] [review]
Add support for the MPRIS v2 draft spec

This patch adds support for the MPRIS v2 spec draft available at http://www.mpris.org/mirsal/2.0-draft/spec.html

The git branch is available in my gitorious clone :
http://gitorious.org/~bl8/banshee/bl8-clone/commits/mpris

This will be used by the new sound menu in Ubuntu Maverick :
https://wiki.ubuntu.com/SoundMenu
Comment 9 Bertrand Lorentz 2010-08-31 21:04:09 UTC
I've just committed support for MPRIS v2.
Version 2 of the spec was released a few weeks ago at http://www.mpris.org/

I've committed a patch instead of merging my gitorious branch, as most of the changes are about running after changes in the spec drafts, and the rest is me being not so smart.
Comment 10 Gabriel Burt 2010-08-31 22:24:52 UTC
Great work Bertrand!  Thanks for getting this started so long ago, John!