[mythtv] Myth calls external channel change script for two inputs simultaneously

Jim Paris jim at jtan.com
Wed Nov 12 17:40:14 EST 2003


> I was wondering why Myth occasionally recorded the wrong channel,
> until I noticed that if you schedule two recordings for the exact same
> time, then "exact same time" really means that and you end up with two
> copies of the change-channel script running at the same time.

Even with one tuner, Myth may invoke the script multiple times; for
example, if you change the channel rapidly while watching live TV.

> I can provide a patch for the contributed channel change examples, or
> alternatively Myth itself could use a lock to avoid two channel
> changes running at the same time?

The hard part about doing it within Myth is that you don't want to
always wait for the external program to complete (since it can be
slow), and doing any more than that gets complicated (have to wait()
on the child, do some IPC, etc).  I decided it wasn't worth the
effort, and so CVS versions of dct-channel do a flock() on the serial
port instead.

-jim


More information about the mythtv-dev mailing list