how to add player support?

Asked by Luis Montiel

Hello,

I want to ask, if Im making a new music player, and would like to get a plugin for covergloobus, what are the steps to accomplish this? My player with have a dbus interface.

Any examples? Ideas?
thanks

Question information

Language:
English Edit question
Status:
Solved
For:
CoverGloobus Edit question
Assignee:
No assignee Edit question
Solved by:
Luis Montiel
Solved:
Last query:
Last reply:
Revision history for this message
Alexandr Grigorcea (cahr-gr) said :
#1

dbus is the best way

your dbus interface should have a method(s) to retrieve tracks metadata like title, album, artist, ( also it will be nice to have year, genre, tracknumber), rating if the player supports ratings,
it should have a way to check players state: playing, paused, stopped
it is also usefull to know track files location (path)
path to cover is not required (CG has its own ways to find cover from filesystem and web) but it us better to have this also

it will be very usefull if your player will emit some signals when something happens, like StatusChanged when status changes (playing, paused, stoped etc.) and TrackChanged when trach changes.

new CG versions will support setting rating and seekbar so it will be nice to have something like SetRating method and SetPosition/GetPosition

after that you have to create a CG plugin (just look other plugins inside src/players/ folder, they are pretty simple) or just report your player to us and we'll help to make the plugin

that's all

here is and example of a good dbus interface, though it has no SetRating, but you are free to add it
http://wiki.xmms2.xmms.se/wiki/MPRIS

another examples:
Rhythmbox has a very powerfull and complete dbus interface
also latest git and bazzar versions of Banshee and Exaile 3.x have nice interfaces

I hope it will help you

cheers

Revision history for this message
Luis Montiel (luismmontielg) said :
#2

Thanks man, I'll check that out!