[mythtv] [mythtv-commits] Ticket #4963: External channel changer is only passed frequency not channum

Andrew M. Bishop amb at gedanken.demon.co.uk
Fri Mar 28 19:47:52 UTC 2008


Since this was my patch I thought that I should take my chance to
reply although I am a bit late finding the message here.

"Michael T. Dean" <mtdean at thirdcontact.com> writes:

> On 03/15/2008 11:00 AM, MythTV wrote:
> > #4963: External channel changer is only passed frequency not channum
> >  The external channel changer program is only passed the "freqid" parameter
> >  and not the "channum".  This means that it cannot be used to tune anything
> >  that outputs multiple channels on the same frequency.  For example a cable
> >  TV box that has only a UHF output and no composite.
> 
> The frequency is a user-configurable value meant to be the /identifier/
> used by the external channel-change script that's used to change the
> channel.  It is /not/ required to be a frequency.

This means that freqid has different meanings for different things.
We already have "channum", "chanid" and "callsign" that are
identifiers for the channel (for various definitions of the word
"identifier").  Obviously "chanid" can only be a number and must be
unique but "channum" already seems free to act as a random identifier
like you are suggesting that "freqid" should be used as.

Don't forget that "freqid" does have a specific meaning as a frequency
and existed as such a long time before external channel change scripts
were added as a feature.

> As a matter of fact,
> if you're using an external channel change script, storing a frequency
> in this field is a waste as Myth has no need for a frequency.

It does if you look at the last part of the patch description below.

> So, if you need to pass a frequency and a channel number, you can
> "encode" them both into the value.  You may even be able to put them
> into the freqid column as space-separated values that will be parsed by
> the shell the same as occurs after your patch.  (The existing code looks
> like that will happen fine.)  If so, fix your DB with a simple:
> UPDATE channel SET freqid = CONCAT(freqid, ' ', channum);

That sounds like a nasty hack to me rather than a real solution.


> >  The attached patch passes both the "freqid" and "channum" to the program
> >  so that it can select whichever is appropriate (the first parameter is
> >  unchanged so that existing scripts still work).
> 
> This change may still require that users who currently use the freqid
> properly have to change their channel change scripts (depending on the
> actual construction of the channel change scripts).  If nothing else,
> those who have simple argument number checks (i.e. if [ $# -eq 1 ])
> would have to change their checks.

So we can never change the way that the channel change script works
for fear of breaking some scripts?


> >  The patch also tunes to
> >  the specified frequency if the input matches "*television*".
> 
> If you're using an external channel change script, it, IMHO, should do
> /all/ of the channel changing.

MythTV can make the change for me with this patch.  The external
channel change script is for /external/ channel changing, not
/internal/ channel changing of the device that MythTV controls.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb at gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/


More information about the mythtv-dev mailing list