6 INPUT = { "ENCODER": 0, "SCART": 1, "AUX": 2 }
10 def setColorFormat(self, value):
11 eAVSwitch.getInstance().setColorFormat(value)
13 def setAspectRatio(self, value):
14 eAVSwitch.getInstance().setAspectRatio(value)
16 def setSystem(self, value):
17 eAVSwitch.getInstance().setVideomode(value)
19 def setWSS(self, value):
20 #print "wss:" + str(value)
23 def setInput(self, input):
24 eAVSwitch.getInstance().setInput(self.INPUT[input])
25 # FIXME why do we have to reset the colorformat? bug in avs-driver?
26 eAVSwitch.getInstance().setColorFormat(config.av.colorformat.value)
29 config.av = ConfigSubsection();
30 config.av.colorformat = configElement("config.av.colorformat", configSelection, 1, (("cvbs", _("CVBS")), ("rgb", _("RGB")), ("svideo", _("S-Video")) ));
31 config.av.aspectratio = configElement("config.av.aspectratio", configSelection, 0, (("4_3_letterbox", _("4:3 Letterbox")), ("4_3_panscan", _("4:3 PanScan")), ("16_9", _("16:9")), ("16_9_always", _("16:9 always"))) );
32 #config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
33 config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, (("pal", _("PAL")), ("ntsc", _("NTSC"))) );
34 config.av.wss = configElement("config.av.wss", configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))) );
35 config.av.defaultac3 = configElement("config.av.defaultac3", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))));
36 config.av.vcrswitch = configElement("config.av.vcrswitch", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))));
38 iAVSwitch = AVSwitch()
40 def setColorFormat(configElement):
41 iAVSwitch.setColorFormat(configElement.value);
42 def setAspectRatio(configElement):
43 iAVSwitch.setAspectRatio(configElement.value);
44 def setSystem(configElement):
45 iAVSwitch.setSystem(configElement.value);
46 def setWSS(configElement):
47 iAVSwitch.setWSS(configElement.value);
49 # this will call the "setup-val" initial
50 config.av.colorformat.addNotifier(setColorFormat);
51 config.av.aspectratio.addNotifier(setAspectRatio);
52 config.av.tvsystem.addNotifier(setSystem);
53 config.av.wss.addNotifier(setWSS);
55 iAVSwitch.setInput("ENCODER") # init on startup