[mythtv-users] 4-digit channel change on a Comcast firewire STB (DCT-6200)

Michael T. Dean mtdean at thirdcontact.com
Tue Mar 20 18:17:07 UTC 2012


On 03/20/2012 01:48 PM, Gary Buhrmaster wrote:
> On Tue, Mar 20, 2012 at 17:07, lists.md301 wrote:
> .....
>>    I was thinking of the case where<chanid>  would
>> NOT be unique:  because as I understand it (and
>> maybe I'm wrong), it's a composite of the<sourceid>
>> and channel number.
> chanid is always unique (it is a primary unique key).
>
> And while the various tools may attempt to create the
> chanid from the (sourceid*1000 + channel_number),
> if there is a conflict (a duplicate key error would be
> received by the app), the next available chanid will
> be used (an auto increment key, as I recall).  That
> is why the chanid *often* looks to be helpful, and
> why it does not have to be at all (the actually channum,
> freqid, etc. is stored in the row and is what it used
> for tuning).  That the chanid looks helpful much
> of the time can cause confusion when it turns out
> that it does not mean what you think it means.
> It is just a number.  Treat it as no more than a
> number.
>
> Just for the record, editing the tables outside of
> the supported apps voids the limited warranty
> (much of the business logic is in the code(s),
> and not the database, so one can really confuse
> MythTV with even a few "minor" edits).

Right.  Channel ID is always unique (and /must/ be), and the code that 
adds new channels will always ensure that channel ID is unique.  The one 
tiny exception to the description above is that the algorithm used to 
create the "starting point" for the channel ID is different depending on 
the type of channel.  And, in the event the algorithm chooses a channel 
ID that's already in use, it will just begin incrementing values until 
it finds a unique ID.

So, the most important point is...  "Don't expect channel IDs to mean 
anything to anyone except your own MythTV applications."  :)

> I think Mike stated that a goal of some future logging
> enhancement (not resourced at this time?) would be
> to insure the logging was useful to "the rest of us"
> (and not just the developers), until then, I think you
> are going to have to do what you suggest and look
> around.

Yeah.  I /think/ you should see some info from the code that calls the 
external channel change script with default logging (if nothing else, 
the actual command line executed), but if not, you can use -v system or 
-v channel or something to find more information on what's happening.

Mike


More information about the mythtv-users mailing list