[mythtv-users] external channel changing script lag problems

Joe Auty joe at netmusician.org
Sat Oct 6 19:37:49 UTC 2007


Hello,

My external channel change script (pasted below) takes so long to
execute with a sleep set to 1.25 that when I select "Watch TV" there
seems to be a timeout. I see in my logs:

2007-10-06 15:31:42.175 TVRec(1): Changing from None to WatchingLiveTV
2007-10-06 15:31:42.182 TVRec(1): HW Tuner: 1->1
2007-10-06 15:31:46.520 ret_pid(0) child(15111) status(0x0)
2007-10-06 15:31:47.528 ret_pid(0) child(15111) status(0x0)
2007-10-06 15:31:48.536 ret_pid(0) child(15111) status(0x0)
2007-10-06 15:31:49.770 ret_pid(0) child(15111) status(0x0)
2007-10-06 15:31:50.776 ret_pid(0) child(15111) status(0x0)
2007-10-06 15:31:52.184 ret_pid(15111) child(15111) status(0x0)
2007-10-06 15:31:52.187 External Tuning program exited with no error


When I decrease the sleep time, I can watch TV. However, with a
decreased sleep time my channel changing script doesn't change channels
properly - it needs that long sleep time.

Is it possible to not set any starting channel at startup and to just
leave the channel set at whatever it was set at last? Is it possible to
increase the timeout values upon invoking a Watch TV? Is it possible to
use a separate channel changing script for presetting the initial channel?






> $remote_name = "dish";
> 
> sub change_channel {
>         my($channel_digit) = @_;
>         system ("irsend --device=/dev/lircd1 SEND_ONCE $remote_name $channel_digit");
>         sleep 1.25;
> }
> 
> $channel=$ARGV[0];
> sleep 1;
> if (length($channel) > 2) {
>         change_channel(substr($channel,0,1));
>         change_channel(substr($channel,1,1));
>         change_channel(substr($channel,2,1));
> } elsif (length($channel) > 1) {
>         change_channel(substr($channel,0,1));
>         change_channel(substr($channel,1,1));
> } else {
>         change_channel(substr($channel,0,1));
> }
> system ("irsend --device=/dev/lircd1 SEND_ONCE $remote_name select");




-- 
Joe Auty
NetMusician: web publishing software for musicians
http://www.netmusician.org
joe at netmusician.org


More information about the mythtv-users mailing list