Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Stopping music/media player when headset unplugged

    Reply
    Page 13 of 13 | Prev | 3   11     12   13 |
    qwerty12 | # 121 | 2010-07-16, 20:44 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to qwerty12 For This Useful Post:
    Flandry, thp

     
    thp | # 122 | 2010-07-16, 21:13 | Report

    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?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to thp For This Useful Post:
    Flandry, qwerty12

     
    qwerty12 | # 123 | 2010-07-16, 21:24 | Report

    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 :\)

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to qwerty12 For This Useful Post:
    thp

     
    thp | # 124 | 2010-07-16, 21:40 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    thp | # 125 | 2010-07-20, 13:48 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to thp For This Useful Post:
    Flandry, qwerty12

     
    Milhouse | # 126 | 2010-07-20, 14:08 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    thp | # 127 | 2010-07-30, 17:27 | Report

    headphoned 1.9 will soon be available in Extras-Testing. Please test and vote for it:

    http://maemo.org/packages/view/headphoned/

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jacktanner | # 128 | 2010-08-03, 16:59 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    thp | # 129 | 2010-08-05, 13:37 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jacktanner | # 130 | 2010-08-05, 13:47 | Report

    If not headphoned, do you know of a different existing application where this would be a better fit?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 13 of 13 | Prev | 3   11     12   13 |
vBulletin® Version 3.8.8
Normal Logout