add sat.xml to get all satellites
[enigma2.git] / lib / python / Components / AVSwitch.py
1 from config import *
2 import os
3 from enigma import *
4
5 class AVSwitch:
6         def __init__(self):
7                 pass
8
9         def setColorFormat(self, value):
10                 #print "colorformat:" + str(value)
11                 eAVSwitch.getInstance().setColorFormat(value)
12                 
13         def setAspectRatio(self, value):
14                 print "aspectratio:" + str(value)
15
16         def setSystem(self, value):
17                 print "system:" + str(value)
18
19         def setWSS(self, value):
20                 print "wss:" + str(value)
21
22 def InitAVSwitch():
23         config.av = ConfigSubsection();
24         config.av.colorformat = configElement("config.av.colorformat", configSelection, 1, ("CVBS", "RGB", "S-Video") );
25         config.av.aspectratio = configElement("config.av.aspectratio", configSelection, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
26         config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
27         config.av.wss = configElement("config.av.wss", configSelection, 0, ("Enable", "Disable") );
28         config.av.defaultac3 = configElement("config.av.defaultac3", configSelection, 1, ("Enable", "Disable") );
29         config.av.vcrswitch = configElement("config.av.vcrswitch", configSelection, 0, ("Enable", "Disable") );
30
31         iAVSwitch = AVSwitch()
32
33         def setColorFormat(configElement):
34                 iAVSwitch.setColorFormat(configElement.value);
35         def setAspectRatio(configElement):
36                 iAVSwitch.setAspectRatio(configElement.value);
37         def setSystem(configElement):
38                 iAVSwitch.setSystem(configElement.value);
39         def setWSS(configElement):
40                 iAVSwitch.setWSS(configElement.value);
41
42         # this will call the "setup-val" initial
43         config.av.colorformat.addNotifier(setColorFormat);
44         config.av.aspectratio.addNotifier(setAspectRatio);
45         config.av.tvsystem.addNotifier(setSystem);
46         config.av.wss.addNotifier(setWSS);
47