support: update for some changes in configuration
This commit is contained in:
parent
2242abbd90
commit
fe5f548fac
1 changed files with 18 additions and 4 deletions
|
@ -120,7 +120,8 @@ for a in adps:
|
||||||
x = set(n['muxs'].keys())
|
x = set(n['muxs'].keys())
|
||||||
y = set(m.keys())
|
y = set(m.keys())
|
||||||
i = x.intersection(x, y)
|
i = x.intersection(x, y)
|
||||||
c = (2 * len(i)) / (len(x) + len(y))
|
c = (2.0 * len(i)) / (len(x) + len(y))
|
||||||
|
#print 'comp %d %d %d %f' % (len(x), len(y), len(i), c)
|
||||||
if c > 0.5:
|
if c > 0.5:
|
||||||
f = True
|
f = True
|
||||||
for k in m:
|
for k in m:
|
||||||
|
@ -141,6 +142,7 @@ if not os.path.exists(p):
|
||||||
os.makedirs(p)
|
os.makedirs(p)
|
||||||
i = 0
|
i = 0
|
||||||
for n in nets:
|
for n in nets:
|
||||||
|
i = i + 1
|
||||||
|
|
||||||
# Network config
|
# Network config
|
||||||
if n['type'] == 'A':
|
if n['type'] == 'A':
|
||||||
|
@ -169,10 +171,12 @@ for n in nets:
|
||||||
'tsid' : m['tsid']
|
'tsid' : m['tsid']
|
||||||
}
|
}
|
||||||
if m['type'] == 'C':
|
if m['type'] == 'C':
|
||||||
|
d['delsys'] = 'DVBC_ANNEX_AC'
|
||||||
d['symbolrate'] = m['symr']
|
d['symbolrate'] = m['symr']
|
||||||
d['fec'] = m['fec']
|
d['fec'] = m['fec']
|
||||||
d['constellation'] = m['cons']
|
d['constellation'] = m['cons']
|
||||||
elif m['type'] == 'T':
|
elif m['type'] == 'T':
|
||||||
|
d['delsys'] = 'DVBT'
|
||||||
d['bandwidth'] = m['bw']
|
d['bandwidth'] = m['bw']
|
||||||
d['constellation'] = m['cons']
|
d['constellation'] = m['cons']
|
||||||
d['tranmission_mode'] = m['txm']
|
d['tranmission_mode'] = m['txm']
|
||||||
|
@ -183,10 +187,20 @@ for n in nets:
|
||||||
elif m['type'] == 'S':
|
elif m['type'] == 'S':
|
||||||
d['symbolrate'] = m['symr']
|
d['symbolrate'] = m['symr']
|
||||||
d['fec'] = m['fec']
|
d['fec'] = m['fec']
|
||||||
d['polarisation'] = m['pol']
|
d['polarisation'] = m['pol'][0]
|
||||||
d['modulation'] = m['mod']
|
d['modulation'] = m['mod']
|
||||||
d['delsys'] = m['del']
|
d['delsys'] = m['del'][4:]
|
||||||
|
d['inversion'] = 'AUTO'
|
||||||
|
if 'rolloff' in m:
|
||||||
|
d['rolloff'] = m['rolloff'][8:]
|
||||||
|
elif d['delsys'] == 'DVBS':
|
||||||
|
d['rolloff'] = '35'
|
||||||
else:
|
else:
|
||||||
|
d['rolloff'] = 'AUTO'
|
||||||
|
if d['modulation'] == 'PSK_8':
|
||||||
|
d['modulation'] = '8PSK'
|
||||||
|
else:
|
||||||
|
d['delsys'] = 'ATSC'
|
||||||
d['constellation'] = m['cons']
|
d['constellation'] = m['cons']
|
||||||
u = uuid()
|
u = uuid()
|
||||||
p3 = os.path.join(p2, 'muxes', u)
|
p3 = os.path.join(p2, 'muxes', u)
|
||||||
|
@ -210,7 +224,7 @@ for n in nets:
|
||||||
|
|
||||||
# Find channel
|
# Find channel
|
||||||
c = s['channelname'] if 'channelname' in s else None
|
c = s['channelname'] if 'channelname' in s else None
|
||||||
print 'SVC %s CHN %s' % (str(s), str(c))
|
#print 'SVC %s CHN %s' % (str(s), str(c))
|
||||||
if not c or c not in chns:
|
if not c or c not in chns:
|
||||||
continue
|
continue
|
||||||
c = chns[c]
|
c = chns[c]
|
||||||
|
|
Loading…
Add table
Reference in a new issue