changed output
[vuplus_dvbapp] / lib / python / Components / AVSwitch.py
1 from config import *
2
3 class AVSwitch:
4         def __init__(self):
5                 pass
6
7         def setColorFormat(self, value):
8                 print "colorformat:" + str(value)
9                 
10         def setAspectRatio(self, value):
11                 print "aspectratio:" + str(value)
12
13         def setSystem(self, value):
14                 print "system:" + str(value)
15
16         def setWSS(self, value):
17                 print "wss:" + str(value)
18
19 def InitAVSwitch():
20         config.av = ConfigSubsection();
21         config.av.colorformat = configElement("1", configBoolean, 1, ("CVBS", "RGB", "S-Video") );
22         config.av.aspectratio = configElement("2", configBoolean, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
23         config.av.tvsystem = configElement("3", configBoolean, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
24         config.av.wss = configElement("4", configBoolean, 0, ("Enable", "Disable") );
25         config.av.defaultac3 = configElement("5", configBoolean, 1, ("Enable", "Disable") );
26         config.av.vcrswitch = configElement("6", configBoolean, 0, ("Enable", "Disable") );
27
28         iAVSwitch = AVSwitch()
29
30         def setColorFormat(configElement):
31                 iAVSwitch.setColorFormat(configElement.value);
32         def setAspectRatio(configElement):
33                 iAVSwitch.setAspectRatio(configElement.value);
34         def setSystem(configElement):
35                 iAVSwitch.setSystem(configElement.value);
36         def setWSS(configElement):
37                 iAVSwitch.setWSS(configElement.value);
38
39         # this will call the "setup-val" initial
40         config.av.colorformat.addNotifier(setColorFormat);
41         config.av.aspectratio.addNotifier(setAspectRatio);
42         config.av.tvsystem.addNotifier(setSystem);
43         config.av.wss.addNotifier(setWSS);
44
45