[Banshee-List] Getting values from Banshee-player's "EventChanged" signal.
- From: Osmo Maatta <osmoma online no>
- To: banshee-list gnome org
- Subject: [Banshee-List] Getting values from Banshee-player's "EventChanged" signal.
- Date: Thu, 23 Sep 2010 15:04:09 +0200
I have a small GTK-application that needs to react to various
DBus-events sent by media-players.
I have some 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
state)
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.
$ dbus-monitor
...
signal sender=:1.125 -> dest=(null destination) serial=1549
path=/org/bansheeproject/Banshee/PlayerEngine;
interface=org.bansheeproject.Banshee.PlayerEngine; member=EventChanged
string "startofstream"
string ""
double 0
-----------------------
The "StateChanged" message/signal works just fine.
The problem is in the "EventChanged" signal.
Here is a complete test code:
http://www.futuredesktop.com/tmp/banshee_test.c
Of course, you will need to run Banshee-media player for this test.
Compile it:
$ gcc $(pkg-config --cflags --libs dbus-1 dbus-glib-1 gtk+-2.0)
banshee_test.c -o banshee_test
Run it:
$ ./banshee_test
It outputs this at start:
** (banshee_test:22386): WARNING **: No marshaller for signature of
signal 'EventChanged'
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'
failed
--
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);
---
My system is:
$ lsb_release -a
Ubuntu Linux 10.04.1 LTS, Lucid
$ banshee --version
Banshee 1.6.1 (1.6.1) http://banshee-project.org
Copyright 2005-2010 Novell, Inc. and Contributors.
---
Please help if you can.
Kindly
Osmo Antero M (Moma)
Oslo, Norway
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]