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