Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
I think that the problem of the error message is not killing mplayer, but the outer script gets reported to stop unexpectly. Propably there should be implemented a signal handler. Lothar Chris Samuel wrote: On Sun, 4 Jan 2009 11:17:56 am Daniel Nöthen wrote: What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. It depends on what the programmer has specified signal handlers for, so if they'd coded something just to deal with a user getting disconnected (SIGHUP) but not for ^C (SIGTERM) then you're better off sending that program SIGHUP rather than SIGTERM. Not to mention submitting a patch make it handle SIGTERM too.. ;-) Fortunately mplayer does the right thing in this case. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streaming-stations-and-wlan-%3A-%29-tp2107090p2108651.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
Hi Guys I am using a shell script on Ubuntu which uses mplayer to play internet (streaming) radio stations. I attached the script in this email. I haven't yet tried it on the freerunner, but I should probably work. It has been written by french people, so the radio are french ones, but it can be adapted. Happy new year 2009/1/4 lollisoft lothar.behr...@lollisoft.de I think that the problem of the error message is not killing mplayer, but the outer script gets reported to stop unexpectly. Propably there should be implemented a signal handler. Lothar Chris Samuel wrote: On Sun, 4 Jan 2009 11:17:56 am Daniel Nöthen wrote: What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. It depends on what the programmer has specified signal handlers for, so if they'd coded something just to deal with a user getting disconnected (SIGHUP) but not for ^C (SIGTERM) then you're better off sending that program SIGHUP rather than SIGTERM. Not to mention submitting a patch make it handle SIGTERM too.. ;-) Fortunately mplayer does the right thing in this case. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streaming-stations-and-wlan-%3A-%29-tp2107090p2108651.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community radios_073d.sh Description: Bourne shell script ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
I've seen one in the angstom-distribution's repo. depeje On Sunday 04 January 2009 15:30:13 lollisoft wrote: Hi, I am sad. The new version in testing from today does not contain an installable mplayer. Where must I go to download one for my FR ? Thanks Lothar kimaidou wrote: Hi Guys I am using a shell script on Ubuntu which uses mplayer to play internet (streaming) radio stations. I attached the script in this email. I haven't yet tried it on the freerunner, but I should probably work. It has been written by french people, so the radio are french ones, but it can be adapted. Happy new year 2009/1/4 lollisoft lothar.behr...@lollisoft.de I think that the problem of the error message is not killing mplayer, but the outer script gets reported to stop unexpectly. Propably there should be implemented a signal handler. Lothar Chris Samuel wrote: On Sun, 4 Jan 2009 11:17:56 am Daniel Nöthen wrote: What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. It depends on what the programmer has specified signal handlers for, so if they'd coded something just to deal with a user getting disconnected (SIGHUP) but not for ^C (SIGTERM) then you're better off sending that program SIGHUP rather than SIGTERM. Not to mention submitting a patch make it handle SIGTERM too.. ;-) Fortunately mplayer does the right thing in this case. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streami ng-stations-and-wlan-%3A-%29-tp2107090p2108651.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
This is not required. It seems that the feeds are set up a little bit later. Now I am listening again :-) Lothar Peter Nijs wrote: I've seen one in the angstom-distribution's repo. depeje On Sunday 04 January 2009 15:30:13 lollisoft wrote: Hi, I am sad. The new version in testing from today does not contain an installable mplayer. Where must I go to download one for my FR ? Thanks Lothar kimaidou wrote: Hi Guys I am using a shell script on Ubuntu which uses mplayer to play internet (streaming) radio stations. I attached the script in this email. I haven't yet tried it on the freerunner, but I should probably work. It has been written by french people, so the radio are french ones, but it can be adapted. Happy new year 2009/1/4 lollisoft lothar.behr...@lollisoft.de I think that the problem of the error message is not killing mplayer, but the outer script gets reported to stop unexpectly. Propably there should be implemented a signal handler. Lothar Chris Samuel wrote: On Sun, 4 Jan 2009 11:17:56 am Daniel Nöthen wrote: What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. It depends on what the programmer has specified signal handlers for, so if they'd coded something just to deal with a user getting disconnected (SIGHUP) but not for ^C (SIGTERM) then you're better off sending that program SIGHUP rather than SIGTERM. Not to mention submitting a patch make it handle SIGTERM too.. ;-) Fortunately mplayer does the right thing in this case. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streami ng-stations-and-wlan-%3A-%29-tp2107090p2108651.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streaming-stations-and-wlan-%3A-%29-tp2107090p2109631.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
Hi, I am sad. The new version in testing from today does not contain an installable mplayer. Where must I go to download one for my FR ? Thanks Lothar kimaidou wrote: Hi Guys I am using a shell script on Ubuntu which uses mplayer to play internet (streaming) radio stations. I attached the script in this email. I haven't yet tried it on the freerunner, but I should probably work. It has been written by french people, so the radio are french ones, but it can be adapted. Happy new year 2009/1/4 lollisoft lothar.behr...@lollisoft.de I think that the problem of the error message is not killing mplayer, but the outer script gets reported to stop unexpectly. Propably there should be implemented a signal handler. Lothar Chris Samuel wrote: On Sun, 4 Jan 2009 11:17:56 am Daniel Nöthen wrote: What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. It depends on what the programmer has specified signal handlers for, so if they'd coded something just to deal with a user getting disconnected (SIGHUP) but not for ^C (SIGTERM) then you're better off sending that program SIGHUP rather than SIGTERM. Not to mention submitting a patch make it handle SIGTERM too.. ;-) Fortunately mplayer does the right thing in this case. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streaming-stations-and-wlan-%3A-%29-tp2107090p2108651.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streaming-stations-and-wlan-%3A-%29-tp2107090p2109195.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
I've just found out that you can control mplayer via a fifo file. So to quit mplayer in a good way you could do the following: 1. Create a fifo somewhere: mkfifo mplayer_fifo 2. Start mplayer within your script like this: mplayer -quiet myradiostation -input file=mplayer_fifo 3. Write this into your stop script: echo quit mplayer_fifo ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Using mplayer with seme desktop symbols for streaming stations and wlan :-)
Hi, has anyone used the combination of desktop symbols starting mplayer to play shoutcast radio stations ? Also using cron jobs to wake me up in the morning with a radio station will be an option :-) Also an idea: Does someone know, if streamripper (http://sourceforge.net/projects/streamripper/) is ported to FreeRunner ? With that you would probably record for offline listening :-) I have tried that with a script like this (killall let the GUI bring up an error message I haven't yet got rid): Play a radio station #!/bin/sh killall mplayer mplayer http://yp.shoutcast.com/sbin/tunein-station.pls?id=7429 Stop playing #!/bin/sh killall mplayer Desktop file to start playing. [Desktop Entry] Name=Technobase FM Comment=Switch off mplayer Note=Stops all mplayers Exec=/home/root/play-technobase-fm.sh Icon=star.png Type=Application Categories=Games Categories=Office; Desktop file to stop playing. [Desktop Entry] Name=Stop MP3 Comment=Switch off mplayer Note=Stops all mplayers Exec=/home/root/stop-mplayer.sh Icon=star.png Type=Application Categories=Games Categories=Office; Regards Lothar -- View this message in context: http://n2.nabble.com/Using-mplayer-with-seme-desktop-symbols-for-streaming-stations-and-wlan-%3A-%29-tp2107090p2107090.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
2009/1/4 lollisoft lothar.behr...@lollisoft.de: I have tried that with a script like this (killall let the GUI bring up an error message I haven't yet got rid): Play a radio station #!/bin/sh killall mplayer mplayer http://yp.shoutcast.com/sbin/tunein-station.pls?id=7429 Stop playing #!/bin/sh killall mplayer killall isn't the cleanest way to stop an app running - iirc you only want to use that when an app is misbehaving one of the SIG signals might be better - have a look at SIGTERM and SIGHUP and some of their brethren; i can't remember which is best here. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
Robin Paulson wrote: killall isn't the cleanest way to stop an app running - iirc you only want to use that when an app is misbehaving one of the SIG signals might be better - have a look at SIGTERM and SIGHUP and some of their brethren; i can't remember which is best here. killall is almost the same as kill. But instead of sending the signal to the given PID it sends the signal to all processes with the given name. Both send the SIGTERM signal when no other is specified. SIGTERM allows the process to run a cleanup routine before closing. What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
On Sun, 4 Jan 2009 10:41:27 am Robin Paulson wrote: one of the SIG signals might be better - have a look at SIGTERM and SIGHUP and some of their brethren; i can't remember which is best here. Use the source, Luke.. ;-) ch...@quad:/tmp/mplayer/mplayer-1.0~rc2$ grep exit_sighandler mplayer.c static void exit_sighandler(int x){ signal(SIGTERM,exit_sighandler); // kill signal(SIGHUP,exit_sighandler); // kill -HUP / xterm closed signal(SIGINT,exit_sighandler); // Interrupt from keyboard signal(SIGQUIT,exit_sighandler); // Quit from keyboard signal(SIGPIPE,exit_sighandler); // Some window managers cause this signal(SIGBUS,exit_sighandler); // bus error signal(SIGSEGV,exit_sighandler); // segfault signal(SIGILL,exit_sighandler); // illegal instruction signal(SIGFPE,exit_sighandler); // floating point exc. signal(SIGABRT,exit_sighandler); // abort() signal(SIGTRAP,exit_sighandler); Looking at the handler: switch(x){ case SIGINT: case SIGQUIT: case SIGTERM: case SIGKILL: break; // killed from keyboard (^C) or killed [-9] So there you go. Quite how they expect to be able to handle SIGKILL given you can't catch it (or ignore it) I don't know.. ;-) cheers, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP signature.asc Description: This is a digitally signed message part. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Using mplayer with seme desktop symbols for streaming stations and wlan :-)
On Sun, 4 Jan 2009 11:17:56 am Daniel Nöthen wrote: What you probably mean is the killall -SIGKILL command which kills the process without giving it the chance for run any cleanup routines. It depends on what the programmer has specified signal handlers for, so if they'd coded something just to deal with a user getting disconnected (SIGHUP) but not for ^C (SIGTERM) then you're better off sending that program SIGHUP rather than SIGTERM. Not to mention submitting a patch make it handle SIGTERM too.. ;-) Fortunately mplayer does the right thing in this case. -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP signature.asc Description: This is a digitally signed message part. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community