[mythtv-users] Updated dct-channel for controlling DCT-2000via serial port

Jim Paris jim at jtan.com
Wed Oct 22 01:10:33 EDT 2003


> In the mythtvsetup under the input card (?) section where it has the change
> channel option I have /usr/local/bin/channel.  And for the default tv
> channel I have 3.

Same here.

> What happens is that the last channel I changed to becomes the first channel
> when ever I reload mythbackend (after rebooting the system or some such).
> In addition, within the mythtvsetup, that last option (default channel)
> changes from 3 to whatever the number was

That sounds like something weird with Myth.  I don't see that problem
with 0.12; the PVR tuner always stays on 3.  dct-channel certainly
doesn't touch the PVR tuner.

On the other hand, there may be a little bit of weirdness when
mythbackend starts, currently, because sometimes Myth tries to change
channels twice quickly at startup, and it ends up running two copies
of channel concurrently, which breaks.  I suppose the same thing may
happen if you try to manually change channels too quicky.  I can try
to detect and work around that in the next version, although I'm not
sure that this is really the right way to fix it; it really shouldn't
be called twice concurrently in the first place. 

Myth should probably set a SIGCHLD handler, not add the "&" to the "sh
-c" line in channelbase.cpp, use a flag to indicate that the channel
changing child is still running, and wait (up to a timeout) for that
flag to clear when a new channel change is requested.  I'm a bit busy
for the next few days but if anyone's bored, have fun :)

Or even an easier solution of making the '&' optional (by making the
external command look something like "program %1 &" so the user can
decide whether to add the '&' or not) would work.

(BTW there's also a bug that causes dct-channel to sometimes not
clear the OSD properly; that'll also be fixed in the next version)

-jim


More information about the mythtv-users mailing list