9 def setColorFormat(self, value):
10 eAVSwitch.getInstance().setColorFormat(value)
12 def setAspectRatio(self, value):
13 eAVSwitch.getInstance().setAspectRatio(value)
15 def setSystem(self, value):
16 print "system:" + str(value)
17 eAVSwitch.getInstance().setVideomode(value)
19 def setWSS(self, value):
20 #print "wss:" + str(value)
24 config.av = ConfigSubsection();
25 config.av.colorformat = configElement("config.av.colorformat", configSelection, 1, ("CVBS", "RGB", "S-Video") );
26 config.av.aspectratio = configElement("config.av.aspectratio", configSelection, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
27 #config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
28 config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, ("PAL", "NTSC") );
29 config.av.wss = configElement("config.av.wss", configSelection, 0, ("Enable", "Disable") );
30 config.av.defaultac3 = configElement("config.av.defaultac3", configSelection, 1, ("Enable", "Disable") );
31 config.av.vcrswitch = configElement("config.av.vcrswitch", configSelection, 1, ("Enable", "Disable") );
33 iAVSwitch = AVSwitch()
35 def setColorFormat(configElement):
36 iAVSwitch.setColorFormat(configElement.value);
37 def setAspectRatio(configElement):
38 iAVSwitch.setAspectRatio(configElement.value);
39 def setSystem(configElement):
40 iAVSwitch.setSystem(configElement.value);
41 def setWSS(configElement):
42 iAVSwitch.setWSS(configElement.value);
44 # this will call the "setup-val" initial
45 config.av.colorformat.addNotifier(setColorFormat);
46 config.av.aspectratio.addNotifier(setAspectRatio);
47 config.av.tvsystem.addNotifier(setSystem);
48 config.av.wss.addNotifier(setWSS);