Reply
Thread Tools
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#1
Hi,

I try to use python to make dbus calls to the multimedia framework mafw. (all this is n900 related, dont know if other devices use this framework).

All dbus calls are working from the commandline with dbus-send command.
For example
com.nokia.mafw.playlist.list_playlists returns a list of playlists
com.nokia.mafw.playlist.get_name returns the name of a playlist
com.nokia.mafw.playlist.get_items returns a list of items of a playlist.
(these are only the interface methods, you have to use proper destination,objects-path and arguments like
dbus-send --session --print-reply --typer=method_call --dest=com.nokia.mafw.playlist /com/nokia/mafw/playlist com.nokia.mafw.playlist.list_playlists
)

Now the problem:
All the method calls are working from within python, too and return the right values except the last one. The errormessage:
org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

Does anyone knows why I cannot use this method or why I dont receive a reply. I m wondering about the message "timeout by message bus", as the python call returns immeditly without any delay, what is meant with timeout?

regards nicolai
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#2
Another idea might be to directly use the python-mafw library, could perhaps save going through d-bus
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following 2 Users Say Thank You to twaelti For This Useful Post:
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#3
Originally Posted by twaelti View Post
Another idea might be to directly use the python-mafw library, could perhaps save going through d-bus
+1

please don't use the dbus methods directly, but the bindings for the mafw instead. This API is meant to be stable, the dbus API not necessarily. Further you can break things by not using the dbus API correctly. So please try to use the framework, with a stable API and further descriptions.

Daniel

Last edited by danielwilms; 2010-03-04 at 06:06. Reason: typo
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#4
Originally Posted by twaelti View Post
Another idea might be to directly use the python-mafw library, could perhaps save going through d-bus
Are you working with this? Do you have an application as an example.
It seems the mafw python bindings are in an early development status. And Im not sure which functions are actually useable.

nicolai
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#5
Originally Posted by danielwilms View Post
+1

please don't use the dbus methods directly, but the bindings for the mafw instead. This API is meant to be stable, the dbus API not necessarily. Further you can break things by not using the dbus API correctly. So please try to use the framework, with a stable API and further descriptions.

Daniel
Thank you for those links, I already know this API and how to use it from within c-code.
But my question is more technical, which relates to python - dbus.

It is possible to make method calls with the dbus-send command, but some calls doesn't work from within python. (like the above example com.nokia.mafw.playlist.get_items)


nicolai
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#6
Originally Posted by nicolai View Post
Are you working with this? Do you have an application as an example.
It seems the mafw python bindings are in an early development status. And Im not sure which functions are actually useable.
I began working on it after your first post, out if interest and because I have a little pet project I would like to do sometime anyway ("CarMode" widget that enables Bluetooth and FM transmitter first, then starts playing a certain playlist).
Unfortunately, I've come to the same conclusion as you
Best thing would be to contact Andrea Grandi who did the initial python-mafw version (or download it and take a look at the source)
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:25.