8 def setColorFormat(self, value):
9 print "colorformat:" + str(value)
10 os.system("scart " + str(value))
12 def setAspectRatio(self, value):
13 print "aspectratio:" + str(value)
15 def setSystem(self, value):
16 print "system:" + str(value)
18 def setWSS(self, value):
19 print "wss:" + str(value)
22 config.av = ConfigSubsection();
23 config.av.colorformat = configElement("config.av.colorformat", configBoolean, 1, ("CVBS", "RGB", "S-Video") );
24 config.av.aspectratio = configElement("config.av.aspectratio", configBoolean, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
25 config.av.tvsystem = configElement("config.av.tvsystem", configBoolean, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
26 config.av.wss = configElement("config.av.wss", configBoolean, 0, ("Enable", "Disable") );
27 config.av.defaultac3 = configElement("config.av.defaultac3", configBoolean, 1, ("Enable", "Disable") );
28 config.av.vcrswitch = configElement("config.av.vcrswitch", configBoolean, 0, ("Enable", "Disable") );
30 iAVSwitch = AVSwitch()
32 def setColorFormat(configElement):
33 iAVSwitch.setColorFormat(configElement.value);
34 def setAspectRatio(configElement):
35 iAVSwitch.setAspectRatio(configElement.value);
36 def setSystem(configElement):
37 iAVSwitch.setSystem(configElement.value);
38 def setWSS(configElement):
39 iAVSwitch.setWSS(configElement.value);
41 # this will call the "setup-val" initial
42 config.av.colorformat.addNotifier(setColorFormat);
43 config.av.aspectratio.addNotifier(setAspectRatio);
44 config.av.tvsystem.addNotifier(setSystem);
45 config.av.wss.addNotifier(setWSS);