Notices


Reply
Thread Tools
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#121
Originally Posted by thp View Post
This might be possible - if the call state can be queried via D-Bus or if at least something like "call started" and "call ended" is sent as D-Bus signal.
Both are possible.
 

The Following 2 Users Say Thank You to qwerty12 For This Useful Post:
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#122
Originally Posted by qwerty12 View Post
Both are possible.
Code:
#!/usr/bin/python

import dbus
import gtk
import sys

from dbus.mainloop.glib import DBusGMainLoop

DBusGMainLoop(set_as_default=True)

def callback(state, emergency_state):
    print 'new state is', state
    print '-'*30
    sys.stdout.flush()

bus = dbus.SystemBus()
bus.add_signal_receiver(callback, 'sig_call_state_ind', \
                        'com.nokia.mce.signal', None, \
                        '/com/nokia/mce/signal')

gtk.main()
PoC script to check for the call state (still has to be translated to C and integrated into headphone, with state tracking). I suppose we can enable this by default in headphoned without bad consequences?
 

The Following 2 Users Say Thank You to thp For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#123
Originally Posted by thp View Post
PoC script to check for the call state (still has to be translated to C and integrated into headphone, with state tracking). I suppose we can enable this by default in headphoned without bad consequences?
Sounds good

Though the real test would be if the player pauses whilst Media Player is open - if it's closed, the state changing via libplayback is enough for the applet...

Shame you didn't use DBus-GLib, you could've taken the stuff from here instead of the nasty D-Bus signal rule you have to make (mind, I lose points on glib-genmarshal :\)
 

The Following User Says Thank You to qwerty12 For This Useful Post:
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#124
Originally Posted by qwerty12 View Post
Sounds good

Though the real test would be if the player pauses whilst Media Player is open - if it's closed, the state changing via libplayback is enough for the applet...

Shame you didn't use DBus-GLib, you could've taken the stuff from here instead of the nasty D-Bus signal rule you have to make (mind, I lose points on glib-genmarshal :\)
Well, I implemented it now with another rule. The patch is here locally, and I don't have access to my Maemo SDK VM, so I can't test it. If anybody wants to build it from source and try it out, I can send you the patch.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#125
Now that I have access to my SDK VM and the N900, I've fixed up the patch and merged it into the repository:

http://repo.or.cz/w/headphoned.git/c...ff/3077ae9b0fc

It works fine for me during testing with Skype's echo123 lady, and I assume it works also for incoming ("ringing") calls. It did not work when I sent the "pause" signal immediately when the call was disconnected, so I now send it 500ms after the call has been disconnected. It works reliable now for me, but you can hear ~ 400ms worth of your music between the time the call is disconnected and the time the signal is sent by headphoned and processed by the media player. Still better than pausing it manually in my opinion (although I can anticipate some bug reports complaining about this behaviour.. hehe).

This feature will be part of the upcoming headphoned release. Thanks for your valuable input, Surstroemming and Faheem
 

The Following 2 Users Say Thank You to thp For This Useful Post:
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#126
I loved headphoned but can't use it as it triggers the bug in the audio subsystem which disables system sounds (new text/email/IM notification etc.)... Does anyone know if there has been any progress on this bug or is it being ignored (seems so)?

It's a shame, as it's not headphoned's fault.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#127
headphoned 1.9 will soon be available in Extras-Testing. Please test and vote for it:

http://maemo.org/packages/view/headphoned/
 
Posts: 228 | Thanked: 145 times | Joined on Dec 2009
#128
A feature request - sorry if this is out of scope

It'd be nice if headphoned could detect an audio cable being plugged in, and then to run a user-configurable application, e.g., media player.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#129
Originally Posted by jacktanner View Post
It'd be nice if headphoned could detect an audio cable being plugged in, and then to run a user-configurable application, e.g., media player.
Theoretically yes, although I believe that this belongs to a different application. If you send a patch with that feature (headphoned is open source and the repository is openly available for anyone to look), I might consider adding this.
 
Posts: 228 | Thanked: 145 times | Joined on Dec 2009
#130
If not headphoned, do you know of a different existing application where this would be a better fit?
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:12.