def confirm(self, confirmed): if not confirmed: config.av.videoport.setValue(self.last_good[0]) config.av.videomode[self.last_good[0]].setValue(self.last_good[1]) config.av.videorate[self.last_good[1]].setValue(self.last_good[2]) iAV.setMode(*self.last_good) else: self.keySave()
def modeSelect(self, mode): ratesList = self.listRates(mode) print("[VideoWizard] ratesList:", ratesList) if self.port == "HDMI" and mode in ("720p", "1080i", "1080p", "2160p"): self.rate = "multi" iAV.setMode(port=self.port, mode=mode, rate="multi") else: iAV.setMode(port=self.port, mode=mode, rate=ratesList[0][0])
def inputSelect(self, port): print("[VideoWizard] inputSelect:", port) modeList = iAV.getModeList(self.selection) print("[VideoWizard] modeList:", modeList) self.port = port if len(modeList) > 0: ratesList = self.listRates(modeList[0][0]) iAV.setMode(port=port, mode=modeList[0][0], rate=ratesList[0][0])
def setMode(self, newpos, auto=False): self.pos = max(min(newpos, len(self.choices) - 1), 0) self.showChoice() choice = self.choices[self.pos] if (iAVSwitch.current_port, iAVSwitch.current_mode, iAVSwitch.current_rate) != choice[1:]: iAVSwitch.setMode(*choice[1:]) config.av.autores.value = auto self.Timer.start(self.timeout, True)
def setMode(self, mode, set=True): rate = config.av.videorate[mode].value resolutionlabel["restxt"].setText("Videomode: %s %s %s" % (port, mode, rate)) if set: print "[AutoRes] switching to %s %s %s" % (port, mode, rate) if config.plugins.autoresolution.showinfo.value: resolutionlabel.show() video_hw.setMode(port, mode, rate) self.lastmode = mode
def setMode(self, mode, set=True): rate = config.av.videorate[mode].value resolutionlabel["restxt"].setText("Videomode: %s %s %s" % (port, mode, rate)) if set: print "[AutoRes] switching to %s %s %s" % (port, mode, rate) if config.plugins.autoresolution.showinfo.value: resolutionlabel.show() video_hw.setMode(port, mode, rate) self.lastmode = mode
def apply(self): port = config.av.videoport.value mode = config.av.videomode[port].value rate = config.av.videorate[mode].value if (port, mode, rate) != self.last_good: iAV.setMode(port, mode, rate) from Screens.MessageBox import MessageBox self.session.openWithCallback(self.confirm, MessageBox, _("Is this video mode ok?"), MessageBox.TYPE_YESNO, timeout=20, default=False) else: self.keySave()
def setMode(self, mode, set=True): if config.plugins.autoresolution.mode.value != "manual": return rate = config.av.videorate[mode].value resolutionlabel["restxt"].setText(_("Videomode: %s %s %s") % (port, mode, rate)) if set: print "[AutoRes] switching to %s %s %s" % (port, mode, rate) if config.plugins.autoresolution.showinfo.value: resolutionlabel.show() try: video_hw.setMode(port, mode, rate) except: print "[AutoRes] Videomode: failed switching to", mode return self.lastmode = mode
def setMode(self, mode, set=True): if config.plugins.autoresolution.mode.value != "manual": return rate = config.av.videorate[mode].value port_txt = "HDMI" if port == "DVI" else port resolutionlabel["restxt"].setText(_("Videomode: %s %s %s") % (port_txt, mode, rate)) if set: print "[AutoRes] switching to %s %s %s" % (port_txt, mode, rate) if config.plugins.autoresolution.showinfo.value: resolutionlabel.show() try: video_hw.setMode(port, mode, rate) except: print "[AutoRes] Videomode: failed switching to", mode return self.lastmode = mode
def rateSelect(self, rate): iAV.setMode(port=self.port, mode=self.mode, rate=rate)