views:

163

answers:

1

I want to find the exact time where a media file is currently paused at (or playing) in a running Totem instance using D-Bus. To be precise, what I want is available from the Totem python console (if the plugin exists and is enabled) by the following command:

>>> print totem_object.props.current_time
732616

which I understand is milliseconds.

So far: I've never used D-Bus before, so I'm in the process of going through D-Bus and python-dbus documentation. I've also fired up D-Feet and found that the org.gnome.Totem bus name and the /Factory object I can use the org.freedesktop.DBus.Properties interface methods.

I'm currently at this point:

>>> import dbus
>>> seb= dbus.SessionBus()
>>> t= seb.get_object('org.gnome.Totem', '/Factory')
>>> tif= dbus.Interface(t, 'org.freedesktop.DBus.Properties')
>>> tif.GetAll('')
dbus.Dictionary({}, signature=dbus.Signature('sv'))

I can't find even a proper how-to, so any help will be greatly appreciated.

A: 

I happened to come upon this piece of information: DBus Tutorial (from Dan Williams). I will update with further info if this results to any success.

ΤΖΩΤΖΙΟΥ