7 def setColorFormat(self, value):
8 print "colorformat:" + str(value)
10 def setAspectRatio(self, value):
11 print "aspectratio:" + str(value)
13 def setSystem(self, value):
14 print "system:" + str(value)
16 def setWSS(self, value):
17 print "wss:" + str(value)
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") );
28 iAVSwitch = AVSwitch()
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);
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);