![]() |
Re: Stopping music/media player when headset unplugged
I take it this package doesn't work for fremantle? Been looking for something like this.
|
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
Ok, I got a first working version packaged up. The autobuilder liked the source, so headphoned should be in Extras-Devel "real soon now", and I'll promote it to Extras-Testing so you can give it some QA love to get it into Extras :)
|
Re: Stopping music/media player when headset unplugged
Perfect timing :-) I just got fed up enough with the current way that I started to google for "maemo unplug pause" - and here I am, ready to go. Thanks Thomas!
PS: It hasn't yet showed up in extras-devel, autobuilder never pushed it. Guess the repository distribution mechanism is 2nd in line while Nokia distributes the new firmware... |
Re: Stopping music/media player when headset unplugged
Does this script restart a paused player, too? This would be useful for me, too.
|
Re: Stopping music/media player when headset unplugged
Quote:
One example: Assume you have Media Player and Panucci open. It's okay to send a "pause" signal to both. You probably don't want to send a "resume" signal to both, however. Which one to choose then? It's not really obvious. The code is open, so if you want to give it a shot, feel free to do so :) |
Re: Stopping music/media player when headset unplugged
thp: any chance we could just download the .deb form of it?
Not a programmer or anything but just trying to help. Couldn't you just resume the last opened program? Thanks for making this app btw. |
Re: Stopping music/media player when headset unplugged
Quote:
(Usual disclaimer applies. No warranty whatsoever on this binary package. If you don't trust me, please rebuild from source after you have read the code. Downloading random .debs from Teh Internets can really hurt your device.) |
Re: Stopping music/media player when headset unplugged
This is a great program and thank you for your job, but I have a one wish for it: Can you track 'headphones disconnect' if I talk by phone? I mean the next scenario:
1) I listen some music by headphones 2) I receive a phone call -> the player is paused automatically. 3) I pull off the headphones and answer the call 4) If I just hang off now, the player will automatically continue playing whenever phones is plugged or no. Can you change this behavior for "permanent pause" in this case or this is technically hard to do? P.S. Sorry, my English is terrible ;-) |
Re: Stopping music/media player when headset unplugged
it works perfectly. :)
|
Re: Stopping music/media player when headset unplugged
just found it in extras
thanks! btw. this should be included in firmware release with an option in settings to switch off if needed to |
Re: Stopping music/media player when headset unplugged
exactly what ive needed - thanks!
|
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
About the resume play when the headphone is re-connected:
I started on developing an application where this should be possible. As user of this application you are able to select what should be done (play/pause) when the headphone is connected or disconnected. Eventualy I want it to be capable of doing more than react on connected headphones. See also: https://garage.maemo.org/projects/actionmanager/ Currently it does pause the mediaplayer when disconnecting the headphone and start playing again when connected, but this is fixed. No UserInterface is made yet for changing settings. Unfortunatly I havent been able to upload this to the repository yet. So be patient... |
Re: Stopping music/media player when headset unplugged
I have a question...if headphoned is kept running in the background, won't it eat up CPU cycles? If it does eat a noticeable amount, is it possible to code it in such a way that it will only run when it detects the headphone is connected and also end the task after pausing when headphones are removed.
Edit: I also agree that this should be included in the next firmware (as a setting)...maybe someone should make a bugzilla report asking for an enhancement. |
Re: Stopping music/media player when headset unplugged
Quote:
The only thing that headphoned uses constantly is a bit of your main memory. See http://git.maemo.org/git/headphoned/...c/headphoned.c |
Re: Stopping music/media player when headset unplugged
Quote:
The case that I have in mind is the wired remotes that Nokia has available. Those have for example volume buttons and play/pause/forward etc. This subject is also discussed here: http://talk.maemo.org/showthread.php?t=21182 (see the pages 3 and 4). I already mentioned your app there. |
Re: Stopping music/media player when headset unplugged
Quote:
Quote:
If you find a way to have separate volume levels for speaker, headphones, and A2DP, you'll make me happy on my train commutes. :-) |
Re: Stopping music/media player when headset unplugged
Quote:
For replay I started thinking.. if the supported players are more or less known, it is possible to check which ones are running. If there is only one program running, there is no problem in choosing. If there is more than one program running, a dialog could be show listing the programs i.e. "Headphones reconnected, continue playing with [panucci] [media player] [none]?" |
Re: Stopping music/media player when headset unplugged
I think only one player is actively playing something at the same time so is it possible to detect it and then resume it when the headphones are being reconnected?
|
Re: Stopping music/media player when headset unplugged
Could soneone test this.
- phone rangs -- disconnect headphones and answer - end call - music plays from speakers? Maybe this just user error but happened me once. |
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
Quote:
Code:
signal sender=:1.3 -> dest=(null destination) serial=220 path=/org/maemo/Playback/Manager; interface=org.maemo.Playback.Manager; member=BluetoothOverride |
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
Yes, you can listen for D-Bus signals saying that the headphones have been removed (mike2k4, sniff the system bus, instead), but there's an easier way: Don't use GIOChannels to monitor the state file, but use libhal to listen for computer_logicaldev_input_1 being removed. This way, you kill two birds with one stone: Removing a wired or a bluetooth headset causes the same event to be broadcast by HAL - "computer_logicaldev_input_1 removed".
|
Re: Stopping music/media player when headset unplugged
Quote:
headphoned would really need a bugtracker.... |
Re: Stopping music/media player when headset unplugged
Quote:
Quote:
|
Re: Stopping music/media player when headset unplugged
1 Attachment(s)
Quote:
I'm incompetent, tired, and working with a 15" monitor so I ended up removing the parts of the code that make no sense under Fremantle just so that I could read the code without giving myself a headache (not in the sense that thp's code is awful but, rather, in the sense that I couldn't be arsed to keep scrolling up). Not to mention that I much prefer using the GLib bindings to D-Bus (I was sorely tempted to do so until I saw thp was already using libdbus and that I could get a DBusConnection from the osso_context_t)... This works for me using the wired headset that came with my N810 and with an el-cheapo, £11 iTech Bluetooth headset I got from eBay. A compiled binary is attached. I'd be curious to know if it works for anyone else. "It" being having the Media Player paused when a Bluetooth headset is disconnected. |
Re: Stopping music/media player when headset unplugged
Quote:
Edit: one more vote and it'll be in extras |
Re: Stopping music/media player when headset unplugged
hello all
What's the command to pause the mediaplayer not the Gstreamer renderer?it is linked to the playback library I think this is the solution to this Quote:
|
Re: Stopping music/media player when headset unplugged
Does the headphone daemon affect power or memory use? Just installed it, and it works great :)
|
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
Thank you for the quick reply! =)
|
Re: Stopping music/media player when headset unplugged
i was wondering..... is it posible to have a "switch" to enable/disable a Headphone deamon???? it would be good thing.... for example... say you are in some form of activitty, and your phone slips somevhere... you can't find him... it would be a god thing if you can hear him where is it...
or you are in a public transportation... someone slips a hand into your pocket... and a way he go!!! :P i say... when you are in some siituations when is good thing to hear your phone when the earphones are not jacked, the deamon is disabled... but also there is a situations that is good to just unplug earphones to pouse a MP... what do you think about that??? O_o |
Re: Stopping music/media player when headset unplugged
Quote:
The same goes for losing your phone - simply let someone else call you, that's what you would do when you lose a "normal" phone, too. I personally simply SSH into my phone if I don't know where it is in my apartment and use: Code:
panucci /path/to/some/mp3file.mp3 Quote:
Code:
killall headphoned Code:
/usr/sbin/headphoned & |
Re: Stopping music/media player when headset unplugged
Quote:
|
Re: Stopping music/media player when headset unplugged
ok... so these are just scripts that i put in xterm.... and that's it??? wright?
thnks! anyway.... all i want is to controll thigs on my phone... i am not a programer, and not an advanced user,... so it would allways be halpfull to developers make there apps more controlable... i know i ask to much... but hey! :D |
Re: Stopping music/media player when headset unplugged
I've received my Bluetooth headset today (thanks to Alan Peery!), and thanks to the work done by Faheem, it was easy to integrate support for Bluetooth headset disconnects to headphoned and also test it thoroughly. It also seems that for headphones *without* microphone, Hal does not detect a device disconnect, so I had to leave the state file-based code in there. I did some clean-ups, re-added support for Diablo, but removed the volume control code (which didn't really work on Diablo and is unnecessary on Fremantle).
In short: headphoned 1.6 with Bluetooth support is currently going through the autobuilder, and should be landing in Extras-Devel soon. Again, credits for this release go to Alan and Faheem - thanks guys! (A side effect is that disconnecting a wired headset with microphone now causes two signals - one from the state file and one from Hal - to be emitted, but for Media Player and Panucci, this does not matter, as they don't unpause when the second "pause" signal is sent.) |
Re: Stopping music/media player when headset unplugged
I had a strange issue a few days ago but I don't know if it is related to headphoned: I unplugged my headset while playing music, the music stopped as expected. After a few days and a few restarts I plugged in my headset again and it began to play from the last active source in the default media player which was not what I wanted (maybe this behaviour could be useful for a short time after unplugging but not after a few days + restarts).
Can it be related to headphoned? |
All times are GMT. The time now is 02:45. |
vBulletin® Version 3.8.8