Getting values from Banshee-player's "EventChanged" signal.
osmoma at gmail.com
Thu Sep 23 05:48:22 PDT 2010
I have a small GTK-application that needs to react to various
DBus-events sent by media-players.
I have some problems connecting a DBus-signal for the Banshee
media-player. I have used dbus-monitor and qdbus tools to debug the
messages and their arguments.
$ qdbus org.bansheeproject.Banshee /org/bansheeproject/Banshee/PlayerEngine
The signals and arguments are:
signal void org.bansheeproject.Banshee.PlayerEngine.StateChanged(QString
signal void org.bansheeproject.Banshee.PlayerEngine.EventChanged(QString
evnt, QString message, double bufferingPercent)
Output from dbus-monitor (when Banshee player changes track/song) shows
that the arguments are; string, string, double.
signal sender=:1.125 -> dest=(null destination) serial=1549
The "StateChanged" message/signal works just fine.
The problem is in the "EventChanged" signal.
Here is a complete test code:
Of course, you will need to have Banshee-media player for this test.
$ gcc $(pkg-config --cflags --libs dbus-1 dbus-glib-1 gtk+-2.0)
banshee_test.c -o banshee_test
It outputs this at start:
** (banshee_test:22386): WARNING **: No marshaller for signature of
It outputs this when Banshee changes to a new song/track.
** (banshee_test:22386): CRITICAL **:
marshal_dbus_message_to_g_marshaller: assertion `c_marshaller != NULL'
The add-signal setting for "EventChanged" should be this, but it fails:
dbus_g_proxy_add_signal(proxy, "EventChanged", G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_DOUBLE, G_TYPE_INVALID);
Please help if you can.
Osmo Antero M (Moma)
More information about the dbus