def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceReference(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ): aspect = _("4:3") else: aspect = _("16:9") width = self.info and self.info.getInfo(iServiceInformation.sVideoWidth) or -1 height = self.info and self.info.getInfo(iServiceInformation.sVideoHeight) or -1 if width != -1 and height != -1: Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Aspect ratio"), aspect, TYPE_TEXT), (_("Resolution"), "%dx%d" %(width, height), TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) else: Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Aspect ratio"), aspect, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Code rate LP"), "code_rate_hp" : _("Code rate HP"), "constellation" : _("Constellation"), "transmission_mode" : _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information" : _("Hierarchy info"), "plp_id" : _("Stream Id"), "is_id" : _("Stream Id"), "pls_mode" : _("PLS Mode"), "pls_code" : _("PLS Code")} Labels = [(conv[i], tp_info[i], TYPE_VALUE_DEC) for i in tp_info.keys()] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceReference(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ): aspect = _("4:3") else: aspect = _("16:9") width = self.info and self.info.getInfo(iServiceInformation.sVideoWidth) or -1 height = self.info and self.info.getInfo(iServiceInformation.sVideoHeight) or -1 if width != -1 and height != -1: Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Aspect ratio"), aspect, TYPE_TEXT), (_("Resolution"), "%dx%d" %(width, height), TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) else: Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Aspect ratio"), aspect, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Code rate LP"), "code_rate_hp" : _("Code rate HP"), "constellation" : _("Constellation"), "transmission_mode" : _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information" : _("Hierarchy info"), "is_id" : _("Stream Id"), "pls_mode" : _("PLS Mode"), "pls_code" : _("PLS Code")} Labels = [(conv[i], tp_info[i], TYPE_VALUE_DEC) for i in tp_info.keys()] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" resolution = "-" if self.info: videocodec = ("MPEG2", "MPEG4", "MPEG1", "MPEG4-II", "VC1", "VC1-SM", "-" )[self.info and self.info.getInfo(iServiceInformation.sVideoType)] width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width,height) resolution += ("i", "p", "")[self.info.getInfo(iServiceInformation.sProgressive)] resolution += str((self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ): aspect = "4:3" else: aspect = "16:9" Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Transponder type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Coderate LP"), "code_rate_hp" : _("Coderate HP"), "constellation" : _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference( self.session.nav.getCurrentlyPlayingServiceReference( )).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference( ).toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" resolution = "-" if self.info: videocodec = ( "MPEG2", "MPEG4", "MPEG1", "MPEG4-II", "VC1", "VC1-SM", "-")[self.info and self.info.getInfo(iServiceInformation.sVideoType)] width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width, height) resolution += ("i", "p", "")[self.info.getInfo( iServiceInformation.sProgressive)] resolution += str( (self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue( iServiceInformation.sAspect) if aspect in (1, 2, 5, 6, 9, 0xA, 0xD, 0xE): aspect = "4:3" else: aspect = "16:9" Labels = ((_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue( iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type": _("Transponder type"), "system": _("System"), "modulation": _("Modulation"), "orbital_position": _("Orbital position"), "frequency": _("Frequency"), "symbol_rate": _("Symbol rate"), "bandwidth": _("Bandwidth"), "polarization": _("Polarization"), "inversion": _("Inversion"), "pilot": _("Pilot"), "rolloff": _("Roll-off"), "fec_inner": _("FEC"), "code_rate_lp": _("Coderate LP"), "code_rate_hp": _("Coderate HP"), "constellation": _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval": _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" videomode = "-" resolution = "-" if self.info: from Components.Converter.PliExtraInfo import codec_data videocodec = codec_data.get(self.info.getInfo(iServiceInformation.sVideoType), "N/A") width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width, height) resolution += ("i", "p", "-")[self.info.getInfo(iServiceInformation.sProgressive)] resolution += str((self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue(iServiceInformation.sAspect) aspect = aspect in (1, 2, 5, 6, 9, 0xA, 0xD, 0xE) and "4:3" or "16:9" resolution += " - [" + aspect + "]" gammas = ("SDR", "HDR", "HDR10", "HLG", "") if self.info.getInfo(iServiceInformation.sGamma) < len(gammas): gamma = gammas[self.info.getInfo(iServiceInformation.sGamma)] if gamma: resolution += " - " + gamma f = open("/proc/stb/video/videomode") videomode = f.read()[:-1].replace('\n', '') f.close() Labels = [(_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videomode"), videomode, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), ":".join(refstr.split(":")[:10]), TYPE_TEXT)] if "%3a//" in refstr: Labels.append((_("URL"), refstr.split(":")[10].replace("%3a", ":"), TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = {"tuner_type" : _("Transponder type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "is_id" : _("Input Stream ID"), "pls_mode" : _("PLS Mode"), "pls_code" : _("PLS Code"), "t2mi_plp_id" : _("T2MI PLP ID"), "t2mi_pip" : _("T2MI PID"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Coderate LP"), "code_rate_hp" : _("Coderate HP"), "constellation" : _("Constellation"), "transmission_mode" : _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information" : _("Hierarchy information")} Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" videomode = "-" resolution = "-" if self.info: videocodec = ("MPEG2", "MPEG4 H.264", "MPEG1", "MPEG4-VC", "VC1", "VC1-SM", "HEVC H.265", "-")[self.info.getInfo(iServiceInformation.sVideoType)] video_height = 0 video_width = 0 video_pol = " " video_rate = 0 if path.exists("/proc/stb/vmpeg/0/yres"): f = open("/proc/stb/vmpeg/0/yres", "r") try: video_height = int(f.read(),16) except: pass f.close() if path.exists("/proc/stb/vmpeg/0/xres"): f = open("/proc/stb/vmpeg/0/xres", "r") try: video_width = int(f.read(),16) except: pass f.close() if path.exists("/proc/stb/vmpeg/0/progressive"): f = open("/proc/stb/vmpeg/0/progressive", "r") try: video_pol = "p" if int(f.read(),16) else "i" except: pass f.close() if path.exists("/proc/stb/vmpeg/0/framerate"): f = open("/proc/stb/vmpeg/0/framerate", "r") try: video_rate = int(f.read()) except: pass f.close() fps = str((video_rate + 500) / 1000) resolution = str(video_width) + "x" + str(video_height) + video_pol + fps aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ): aspect = "4:3" else: aspect = "16:9" f = open("/proc/stb/video/videomode") videomode = f.read()[:-1].replace('\n','') f.close() Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videomode"), videomode, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Transponder type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Coderate LP"), "code_rate_hp" : _("Coderate HP"), "constellation" : _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" videomode = "-" resolution = "-" if self.info: videocodec = ("MPEG2", "MPEG4", "MPEG1", "MPEG4-II", "VC1", "VC1-SM", "-" )[self.info and self.info.getInfo(iServiceInformation.sVideoType)] video_height = 0 video_width = 0 video_pol = " " video_rate = 0 if path.exists("/proc/stb/vmpeg/0/yres"): f = open("/proc/stb/vmpeg/0/yres", "r") try: video_height = int(f.read(),16) except: pass f.close() if path.exists("/proc/stb/vmpeg/0/xres"): f = open("/proc/stb/vmpeg/0/xres", "r") try: video_width = int(f.read(),16) except: pass f.close() if path.exists("/proc/stb/vmpeg/0/progressive"): f = open("/proc/stb/vmpeg/0/progressive", "r") try: video_pol = "p" if int(f.read(),16) else "i" except: pass f.close() if path.exists("/proc/stb/vmpeg/0/framerate"): f = open("/proc/stb/vmpeg/0/framerate", "r") try: video_rate = int(f.read()) except: pass f.close() fps = str((video_rate + 500) / 1000) resolution = str(video_width) + "x" + str(video_height) + video_pol + fps aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ): aspect = "4:3" else: aspect = "16:9" f = open("/proc/stb/video/videomode") videomode = f.read()[:-1].replace('\n','') f.close() Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videomode"), videomode, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Transponder type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Coderate LP"), "code_rate_hp" : _("Coderate HP"), "constellation" : _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" videomode = "-" resolution = "-" if self.info: videocodec = ("MPEG2", "MPEG4", "MPEG1", "MPEG4-VC", "VC1", "VC1-SM", "HEVC", "-")[self.info.getInfo(iServiceInformation.sVideoType)] width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width,height) resolution += ("i", "p", "")[self.info.getInfo(iServiceInformation.sProgressive)] resolution += str((self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ): aspect = "4:3" else: aspect = "16:9" f = open("/proc/stb/video/videomode") videomode = f.read()[:-1].replace('\n','') f.close() codenumbers = subprocess.check_output(['timeout -t 2 -s kill dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F "=" "{print $2}" | awk -F "]" "{print $1}" | wc -l'], shell=True) codesystem = subprocess.check_output(["timeout -t 2 -s kill dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F '=' '{print $2}' | awk -F ']' '{print $1}'"], shell=True) caidssyst = subprocess.check_output(["timeout -t 2 -s kill dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F '(' '{print $2}' | awk -F ')' '{print $1}'"], shell=True) Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videomode"), videomode, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT), (_("Coding Systems"), codenumbers, TYPE_TEXT)) if codenumbers > 0: i = 0 caidssyst1 = caidssyst.splitlines() codesystem1 = codesystem.splitlines() while i < int(codenumbers): caidsystem = caidssyst1[i] + " " + codesystem1[i] i += 1 newlabel = ( (_("%s " %i), caidsystem, TYPE_TEXT)) Labels = Labels + (newlabel,) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Transponder type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "is_id" : _("Input Stream ID"), "pls_mode" : _("PLS Mode"), "pls_code" : _("PLS Code"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Coderate LP"), "code_rate_hp" : _("Coderate HP"), "constellation" : _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information": _("Hierarchy information")} Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _('N/A') refstr = _('N/A') aspect = '-' videocodec = '-' videomode = '-' resolution = '-' if self.info: videocodec = ('MPEG2', 'MPEG4', 'MPEG1', 'MPEG4-II', 'VC1', 'VC1-SM', '-')[self.info and self.info.getInfo(iServiceInformation.sVideoType)] video_height = 0 video_width = 0 video_pol = ' ' video_rate = 0 if path.exists('/proc/stb/vmpeg/0/yres'): f = open('/proc/stb/vmpeg/0/yres', 'r') try: video_height = int(f.read(), 16) except: pass f.close() if path.exists('/proc/stb/vmpeg/0/xres'): f = open('/proc/stb/vmpeg/0/xres', 'r') try: video_width = int(f.read(), 16) except: pass f.close() if path.exists('/proc/stb/vmpeg/0/progressive'): f = open('/proc/stb/vmpeg/0/progressive', 'r') try: video_pol = 'p' if int(f.read(), 16) else 'i' except: pass f.close() if path.exists('/proc/stb/vmpeg/0/framerate'): f = open('/proc/stb/vmpeg/0/framerate', 'r') try: video_rate = int(f.read()) except: pass f.close() fps = str((video_rate + 500) / 1000) resolution = str(video_width) + 'x' + str(video_height) + video_pol + fps aspect = self.getServiceInfoValue(iServiceInformation.sAspect) if aspect in (1, 2, 5, 6, 9, 10, 13, 14): aspect = '4:3' else: aspect = '16:9' f = open('/proc/stb/video/videomode') videomode = f.read()[:-1].replace('\n', '') f.close() Labels = ((_('Name'), name, TYPE_TEXT), (_('Provider'), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_('Videoformat'), aspect, TYPE_TEXT), (_('Videomode'), videomode, TYPE_TEXT), (_('Videosize'), resolution, TYPE_TEXT), (_('Videocodec'), videocodec, TYPE_TEXT), (_('Namespace'), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_('Service reference'), refstr, TYPE_TEXT)) self.fillList(Labels) elif self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = {'tuner_type': _('Transponder type'), 'system': _('System'), 'modulation': _('Modulation'), 'orbital_position': _('Orbital position'), 'frequency': _('Frequency'), 'symbol_rate': _('Symbol rate'), 'bandwidth': _('Bandwidth'), 'polarization': _('Polarization'), 'inversion': _('Inversion'), 'pilot': _('Pilot'), 'rolloff': _('Roll-off'), 'fec_inner': _('FEC'), 'code_rate_lp': _('Coderate LP'), 'code_rate_hp': _('Coderate HP'), 'constellation': _('Constellation'), 'transmission_mode': _('Transmission mode'), 'guard_interval': _('Guard interval'), 'hierarchy_information': _('Hierarchy information')} Labels = [ (conv[i], tp_info[i], i == 'orbital_position' and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv ] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference( self.session.nav.getCurrentlyPlayingServiceReference( )).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference( ).toString() else: name = _('N/A') refstr = _('N/A') aspect = '-' videocodec = '-' videomode = '-' resolution = '-' if self.info: from Components.Converter.PliExtraInfo import codec_data videocodec = codec_data.get( self.info.getInfo(iServiceInformation.sVideoType), 'N/A') width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = '%dx%d' % (width, height) resolution += ('i', 'p', '-')[self.info.getInfo( iServiceInformation.sProgressive)] resolution += str( (self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue( iServiceInformation.sAspect) aspect = aspect in (1, 2, 5, 6, 9, 10, 13, 14) and '4:3' or '16:9' resolution += ' - [' + aspect + ']' gammas = ('SDR', 'HDR', 'HDR10', 'HLG', '') if self.info.getInfo( iServiceInformation.sGamma) < len(gammas): gamma = gammas[self.info.getInfo( iServiceInformation.sGamma)] if gamma: resolution += ' - ' + gamma f = open('/proc/stb/video/videomode') videomode = f.read()[:-1].replace('\n', '') f.close() Labels = ((_('Name'), name, TYPE_TEXT), (_('Provider'), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_('Videoformat'), aspect, TYPE_TEXT), (_('Videomode'), videomode, TYPE_TEXT), (_('Videosize'), resolution, TYPE_TEXT), (_('Videocodec'), videocodec, TYPE_TEXT), (_('Namespace'), self.getServiceInfoValue( iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_('Service reference'), ':'.join(refstr.split(':')[:10]), TYPE_TEXT), (_('URL'), refstr.split(':')[10].replace('%3a', ':'), TYPE_TEXT)) self.fillList(Labels) elif self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { 'tuner_type': _('Transponder type'), 'system': _('System'), 'modulation': _('Modulation'), 'orbital_position': _('Orbital position'), 'frequency': _('Frequency'), 'symbol_rate': _('Symbol rate'), 'bandwidth': _('Bandwidth'), 'polarization': _('Polarization'), 'inversion': _('Inversion'), 'pilot': _('Pilot'), 'rolloff': _('Roll-off'), 'is_id': _('Input Stream ID'), 'pls_mode': _('PLS Mode'), 'pls_code': _('PLS Code'), 't2mi_plp_id': _('T2MI PLP ID'), 't2mi_pip': _('T2MI PID'), 'fec_inner': _('FEC'), 'code_rate_lp': _('Coderate LP'), 'code_rate_hp': _('Coderate HP'), 'constellation': _('Constellation'), 'transmission_mode': _('Transmission mode'), 'guard_interval': _('Guard interval'), 'hierarchy_information': _('Hierarchy information') } Labels = [(conv[i], tp_info[i], i == 'orbital_position' and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference( self.session.nav.getCurrentlyPlayingServiceReference( )).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference( ).toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" resolution = "-" if self.info: videocodec = ( "MPEG2", "MPEG4", "MPEG1", "MPEG4-II", "VC1", "VC1-SM", "HEVC", "H265", "CAVS", "-")[self.info and self.info.getInfo(iServiceInformation.sVideoType)] width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width, height) resolution += ("i", "p", "-")[self.info.getInfo( iServiceInformation.sProgressive)] resolution += str( (self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue( iServiceInformation.sAspect) if aspect in (1, 2, 5, 6, 9, 0xA, 0xD, 0xE): aspect = "4:3" else: aspect = "16:9" codenumbers = subprocess.check_output([ 'timeout -t 2 -s kill dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F "=" "{print $2}" | awk -F "]" "{print $1}" | wc -l' ], shell=True) codesystem = subprocess.check_output([ "timeout -t 2 -s kill dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F '=' '{print $2}' | awk -F ']' '{print $1}'" ], shell=True) caidssyst = subprocess.check_output([ "timeout -t 2 -s kill dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F '(' '{print $2}' | awk -F ')' '{print $1}'" ], shell=True) Labels = ((_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue( iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT), (_("Coding Systems"), codenumbers, TYPE_TEXT)) if codenumbers > 0: i = 0 caidssyst1 = caidssyst.splitlines() codesystem1 = codesystem.splitlines() while i < int(codenumbers): caidsystem = caidssyst1[i] + " " + codesystem1[i] i += 1 newlabel = ((_("%s " % i), caidsystem, TYPE_TEXT)) Labels = Labels + (newlabel, ) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type": _("Transponder type"), "system": _("System"), "modulation": _("Modulation"), "orbital_position": _("Orbital position"), "frequency": _("Frequency"), "symbol_rate": _("Symbol rate"), "bandwidth": _("Bandwidth"), "polarization": _("Polarization"), "inversion": _("Inversion"), "pilot": _("Pilot"), "rolloff": _("Roll-off"), "is_id": _("Input Stream ID"), "pls_mode": _("PLS Mode"), "pls_code": _("PLS Code"), "fec_inner": _("FEC"), "code_rate_lp": _("Coderate LP"), "code_rate_hp": _("Coderate HP"), "constellation": _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval": _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" videomode = "-" resolution = "-" if self.info: from Components.Converter.PliExtraInfo import codec_data videocodec = codec_data.get(self.info.getInfo(iServiceInformation.sVideoType), "N/A") width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width,height) resolution += ("i", "p", "-")[self.info.getInfo(iServiceInformation.sProgressive)] resolution += str((self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue(iServiceInformation.sAspect) aspect = aspect in ( 1, 2, 5, 6, 9, 0xA, 0xD, 0xE ) and "4:3" or "16:9" resolution += " - ["+aspect+"]" gammas = ("SDR", "HDR", "HDR10", "HLG", "") if self.info.getInfo(iServiceInformation.sGamma) < len(gammas): gamma = gammas[self.info.getInfo(iServiceInformation.sGamma)] if gamma: resolution += " - " + gamma f = open("/proc/stb/video/videomode") videomode = f.read()[:-1].replace('\n','') f.close() Labels = ( (_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videomode"), videomode, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type" : _("Transponder type"), "system" : _("System"), "modulation" : _("Modulation"), "orbital_position" : _("Orbital position"), "frequency" : _("Frequency"), "symbol_rate" : _("Symbol rate"), "bandwidth" : _("Bandwidth"), "polarization" : _("Polarization"), "inversion" : _("Inversion"), "pilot" : _("Pilot"), "rolloff" : _("Roll-off"), "is_id" : _("Input Stream ID"), "pls_mode" : _("PLS Mode"), "pls_code" : _("PLS Code"), "t2mi_plp_id" : _("T2MI PLP ID"), "t2mi_pip" : _("T2MI PID"), "fec_inner" : _("FEC"), "code_rate_lp" : _("Coderate LP"), "code_rate_hp" : _("Coderate HP"), "constellation" : _("Constellation"), "transmission_mode" : _("Transmission mode"), "guard_interval" : _("Guard interval"), "hierarchy_information" : _("Hierarchy information")} Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference( self.session.nav.getCurrentlyPlayingServiceReference( )).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference( ).toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" videomode = "-" resolution = "-" if self.info: from Components.Converter.PliExtraInfo import codec_data videocodec = codec_data.get( self.info.getInfo(iServiceInformation.sVideoType), "N/A") width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = "%dx%d" % (width, height) resolution += ("i", "p", "-")[self.info.getInfo( iServiceInformation.sProgressive)] resolution += str( (self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue( iServiceInformation.sAspect) aspect = aspect in (1, 2, 5, 6, 9, 0xA, 0xD, 0xE) and "4:3" or "16:9" resolution += " - [" + aspect + "]" gammas = ("SDR", "HDR", "HDR10", "HLG", "") if self.info.getInfo( iServiceInformation.sGamma) < len(gammas): gamma = gammas[self.info.getInfo( iServiceInformation.sGamma)] if gamma: resolution += " - " + gamma f = open("/proc/stb/video/videomode") videomode = f.read()[:-1].replace('\n', '') f.close() codenumbers = subprocess.check_output([ 'dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F "=" "{print $2}" | awk -F "]" "{print $1}" | wc -l' ], shell=True) codesystem = subprocess.check_output([ "dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F '=' '{print $2}' | awk -F ']' '{print $1}'" ], shell=True) caidssyst = subprocess.check_output([ "dvbsnoop -n 1 -nph 1 | grep CA_system_ID | awk -F '(' '{print $2}' | awk -F ')' '{print $1}'" ], shell=True) Labels = ((_("Name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videoformat"), aspect, TYPE_TEXT), (_("Videomode"), videomode, TYPE_TEXT), (_("Videosize"), resolution, TYPE_TEXT), (_("Videocodec"), videocodec, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue( iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_("Service reference"), refstr, TYPE_TEXT), (_("Coding Systems"), codenumbers, TYPE_TEXT)) if codenumbers > 0: i = 0 caidssyst1 = caidssyst.splitlines() codesystem1 = codesystem.splitlines() while i < int(codenumbers): caidsystem = caidssyst1[i] + " " + codesystem1[i] i += 1 newlabel = ((_("%s " % i), caidsystem, TYPE_TEXT)) Labels = Labels + (newlabel, ) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type": _("Transponder type"), "system": _("System"), "modulation": _("Modulation"), "orbital_position": _("Orbital position"), "frequency": _("Frequency"), "symbol_rate": _("Symbol rate"), "bandwidth": _("Bandwidth"), "polarization": _("Polarization"), "inversion": _("Inversion"), "pilot": _("Pilot"), "rolloff": _("Roll-off"), "is_id": _("Input Stream ID"), "pls_mode": _("PLS Mode"), "pls_code": _("PLS Code"), "t2mi_plp_id": _("T2MI PID-PLP ID"), "fec_inner": _("FEC"), "code_rate_lp": _("Coderate LP"), "code_rate_hp": _("Coderate HP"), "constellation": _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval": _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def ShowServiceInformation(self): self.setTitle(_("Service info - service & PIDs")) self["key_blue"].text = self["blue"].text = _("Tuner setting values") if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference( self.session.nav.getCurrentlyPlayingServiceReference( )).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference( ).toString() else: name = _("N/A") refstr = _("N/A") aspect = "-" videocodec = "-" resolution = "-" if self.info: videocodec = ("MPEG2", "AVC", "MPEG1", "MPEG4-VC", "VC1", "VC1-SM", "HEVC", "-")[self.info.getInfo( iServiceInformation.sVideoType)] width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = videocodec + " - " resolution += "%dx%d - " % (width, height) resolution += str( (self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) resolution += (" i", " p", "")[self.info.getInfo( iServiceInformation.sProgressive)] aspect = self.getServiceInfoValue( iServiceInformation.sAspect) aspect = aspect in (1, 2, 5, 6, 9, 0xA, 0xD, 0xE) and "4:3" or "16:9" resolution += " - [" + aspect + "]" Labels = ((_("Service name"), name, TYPE_TEXT), (_("Provider"), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_("Videocodec, size & format"), resolution, TYPE_TEXT), (_("Service reference"), refstr, TYPE_TEXT), (_("Namespace"), self.getServiceInfoValue( iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8)) Labels += ((_("Service ID"), self.getServiceInfoValue(iServiceInformation.sSID), TYPE_VALUE_HEX_DEC, 4), (_("Video PID"), self.getServiceInfoValue( iServiceInformation.sVideoPID), TYPE_VALUE_HEX_DEC, 4), (_("Audio PID"), self.getServiceInfoValue( iServiceInformation.sAudioPID), TYPE_VALUE_HEX_DEC, 4), (_("PCR PID"), self.getServiceInfoValue(iServiceInformation.sPCRPID), TYPE_VALUE_HEX_DEC, 4), (_("PMT PID"), self.getServiceInfoValue(iServiceInformation.sPMTPID), TYPE_VALUE_HEX_DEC, 4), (_("TXT PID"), self.getServiceInfoValue(iServiceInformation.sTXTPID), TYPE_VALUE_HEX_DEC, 4), (_("TSID"), self.getServiceInfoValue(iServiceInformation.sTSID), TYPE_VALUE_HEX_DEC, 4), (_("ONID"), self.getServiceInfoValue(iServiceInformation.sONID), TYPE_VALUE_HEX_DEC, 4)) self.fillList(Labels) else: if self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { "tuner_type": _("Transponder type"), "system": _("System"), "modulation": _("Modulation"), "orbital_position": _("Orbital position"), "frequency": _("Frequency"), "symbol_rate": _("Symbol rate"), "bandwidth": _("Bandwidth"), "polarization": _("Polarization"), "inversion": _("Inversion"), "pilot": _("Pilot"), "rolloff": _("Roll-off"), "is_id": _("Input Stream ID"), "pls_mode": _("PLS Mode"), "pls_code": _("PLS Code"), "fec_inner": _("FEC"), "code_rate_lp": _("Coderate LP"), "code_rate_hp": _("Coderate HP"), "constellation": _("Constellation"), "transmission_mode": _("Transmission mode"), "guard_interval": _("Guard interval"), "hierarchy_information": _("Hierarchy information") } Labels = [(conv[i], tp_info[i], i == "orbital_position" and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)
def information(self): if self.type == TYPE_SERVICE_INFO: if self.session.nav.getCurrentlyPlayingServiceOrGroup(): name = ServiceReference( self.session.nav.getCurrentlyPlayingServiceReference( )).getServiceName() refstr = self.session.nav.getCurrentlyPlayingServiceReference( ).toString() else: name = _('N/A') refstr = _('N/A') aspect = '-' videocodec = '-' videomode = '-' resolution = '-' if self.info: videocodec = ( 'MPEG2', 'MPEG4', 'MPEG1', 'MPEG4-II', 'VC1', 'VC1-SM', '-')[self.info and self.info.getInfo(iServiceInformation.sVideoType)] width = self.info.getInfo(iServiceInformation.sVideoWidth) height = self.info.getInfo(iServiceInformation.sVideoHeight) if width > 0 and height > 0: resolution = '%dx%d' % (width, height) resolution += ('i', 'p', '')[self.info.getInfo( iServiceInformation.sProgressive)] resolution += str( (self.info.getInfo(iServiceInformation.sFrameRate) + 500) / 1000) aspect = self.getServiceInfoValue( iServiceInformation.sAspect) if aspect in (1, 2, 5, 6, 9, 10, 13, 14): aspect = '4:3' else: aspect = '16:9' f = open('/proc/stb/video/videomode') videomode = f.read()[:-1].replace('\n', '') f.close() Labels = ((_('Name'), name, TYPE_TEXT), (_('Provider'), self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), (_('Videoformat'), aspect, TYPE_TEXT), (_('Videomode'), videomode, TYPE_TEXT), (_('Videosize'), resolution, TYPE_TEXT), (_('Videocodec'), videocodec, TYPE_TEXT), (_('Namespace'), self.getServiceInfoValue( iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8), (_('Service reference'), refstr, TYPE_TEXT)) self.fillList(Labels) elif self.transponder_info: tp_info = ConvertToHumanReadable(self.transponder_info) conv = { 'tuner_type': _('Transponder type'), 'system': _('System'), 'modulation': _('Modulation'), 'orbital_position': _('Orbital position'), 'frequency': _('Frequency'), 'symbol_rate': _('Symbol rate'), 'bandwidth': _('Bandwidth'), 'polarization': _('Polarization'), 'inversion': _('Inversion'), 'pilot': _('Pilot'), 'rolloff': _('Roll-off'), 'fec_inner': _('FEC'), 'code_rate_lp': _('Coderate LP'), 'code_rate_hp': _('Coderate HP'), 'constellation': _('Constellation'), 'transmission_mode': _('Transmission mode'), 'guard_interval': _('Guard interval'), 'hierarchy_information': _('Hierarchy information') } Labels = [(conv[i], tp_info[i], i == 'orbital_position' and TYPE_VALUE_ORBIT_DEC or TYPE_VALUE_DEC) for i in tp_info.keys() if i in conv] self.fillList(Labels)