diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2008-02-11 12:58:36 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2008-02-11 12:58:36 +0000 |
| commit | fbc79da5c84135c8a8e46060d3edc157ec85d006 (patch) | |
| tree | abb3d8408c10dc04173c460f50fe3ae9011cd37b /lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py | |
| parent | f400ad7ad435bbf2e968ec7f95adebf1f134a7fa (diff) | |
| download | enigma2-fbc79da5c84135c8a8e46060d3edc157ec85d006.tar.gz enigma2-fbc79da5c84135c8a8e46060d3edc157ec85d006.zip | |
arm the video wizard
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py')
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py index 8fffa5a9..32052e28 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -55,9 +55,17 @@ class VideoWizard(Wizard): def inputSelectionMade(self, index): print "inputSelectionMade:", index self.port = index + self.inputSelect(index) def inputSelectionMoved(self): - print "selection moved:", self.selection + print "input selection moved:", self.selection + self.inputSelect(self.selection) + + def inputSelect(self, port): + print "inputSelect:", port + modeList = self.hw.getModeList(self.selection) + print "modeList:", modeList + self.hw.setMode(port = port, mode = modeList[0][0], rate = modeList[0][1][0]) def listModes(self): list = [] @@ -69,22 +77,37 @@ class VideoWizard(Wizard): def modeSelectionMade(self, index): print "modeSelectionMade:", index self.mode = index + self.modeSelect(index) def modeSelectionMoved(self): - print "selection moved:", self.selection + print "mode selection moved:", self.selection + self.modeSelect(self.selection) + + def modeSelect(self, mode): + ratesList = self.listRates(mode) + print "ratesList:", ratesList + self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) - def listRates(self): + def listRates(self, querymode = None): + if querymode is None: + querymode = self.mode list = [] - print "modes for port", self.port + print "modes for port", self.port, "and mode", querymode for mode in self.hw.getModeList(self.port): print mode - if mode[0] == self.mode: + if mode[0] == querymode: for rate in mode[1]: list.append((rate, rate)) return list def rateSelectionMade(self, index): print "rateSelectionMade:", index + self.rateSelect(index) def rateSelectionMoved(self): - print "selection moved:", self.selection + print "rate selection moved:", self.selection + self.rateSelect(self.selection) + + def rateSelect(self, rate): + self.hw.setMode(port = self.port, mode = self.mode, rate = rate) + |
