[mythtv] channels.conf-import

Brian May bam at snoopy.apana.org.au
Fri Jul 9 00:59:29 EDT 2004

>>>>> "Malcolm" == Malcolm Smith <malc at porsche.demon.co.uk> writes:

    Malcolm> Attached is a perl script that does what you are looking
    Malcolm> to do. You are more than welcome to steal anycode .. I'd
    Malcolm> rather it was built into core than a script.. so good
    Malcolm> ahead.

I tried this script, for my DVB-T setup, Australia, but encountered
several problems.

The main ones:

1. My table doesn't have a hp_code_rate column. I gather the fec
column is the same thing?

2. It seems to misinterpret at least some fields in my channels.conf.

3. A number of fields were set to defaults, which seemed to mess things

As a result of 2 and 3 the following fields were incorrect:

serviceid=0         (was NULL)
networkid=0         (was NULL)
transportid=0       (was NULL)
inversion=a         (was 0)
bandwidth=NULL      (was 7)
transmission_mode=8 (was a)

providerid stayed NULL.

polarity was H now V (I suspect this isn't used).

The fact inversion was translated to 'a' seem curious, as far I can tell,
it was detected correctly.

The fact the bandwidth was null produced these messages:

DVB#0 WARNING - Invalid bandwidth parameter '

So I corrected this issue, and found nothing worked. I tried changing
the inversion and transmission_mode, but it didn't seem to help. Then
I replaced the *id columns to NULL, and it now works again.

The debug output for this channel was:

using row 9
fec_1: 2/3
fec_2: 2/3
inversion: 0
transmissionmode: 8
guardinterval: 1/8
hierarchy: n
chanid: 12001
frequency: 177500000
polarity: V
symbolrate: 69000
modulation: qam_64
VPID: 769
APID: 770
TPID: 1328

serviceid: 0
transportid: 0
networkid: 0
channel typetzap
REPLACE INTO dvb_channel (chanid, serviceid, networkid, transportid, frequency, inversion, symbolrate, fec, polarity,  modulation, hp_code_rate , lp_code_rate, transmission_mode, guard_interval, hierarchy) VALUES (12001, 0, 0, 0, 177500000, 'a', '69000', '2/3', 'V',  'qam_64' , '2/3', '2/3', '8', '1/8', 'n');

And the channels.conf entry, row 9, is:


As a side note, is there any reason why REPLACE INTO is used instead
of UPDATE? REPLACE INTO resets any fields not specified to default
values (eg. bandwidth). UPDATE would keep any values not already
specified unaltered, and uncorrupted.
Brian May <bam at snoopy.apana.org.au>

More information about the mythtv-dev mailing list