- def hideSubServiceIndication(self):
- self["ButtonGreen"].hide()
- self["ButtonGreenText"].hide()
-
- def showSubServiceIndication(self):
- self["ButtonGreen"].show()
- self["ButtonGreenText"].show()
-
- def checkFormat(self, service):
- info = service.info()
- if info:
- aspect = info.getInfo(iServiceInformation.sAspect)
- if aspect in [ 3, 4, 7, 8, 0xB, 0xC, 0xF, 0x10 ]:
- self["FormatActive"].show()
- return
- self["FormatActive"].hide()
-
- def checkText(self, service):
- info = service.info()
- if info:
- tpid = info.getInfo(iServiceInformation.sTXTPID)
- if tpid != -1:
- self["TextActive"].show()
- return
- self["TextActive"].hide()
-
- def checkSubservices(self, service):
- subservices = service.subServices()
- if subservices and subservices.getNumberOfSubservices() > 0:
- self.showSubServiceIndication()
- else:
- self.hideSubServiceIndication()
-
- def checkDolby(self, service):
- # FIXME
- dolby = False
- audio = service.audioTracks()
- if audio:
- n = audio.getNumberOfTracks()
- for x in range(n):
- i = audio.getTrackInfo(x)
- description = i.getDescription();
- if description.find("AC3") != -1 or description.find("DTS") != -1:
- dolby = True
- break
- if dolby:
- self["DolbyActive"].show()
- else:
- self["DolbyActive"].hide()
-
- def checkCrypted(self, service):
- info = service.info()
- if info and info.getInfo(iServiceInformation.sIsCrypted) > 0:
- self["CryptActive"].show()
- else:
- self["CryptActive"].hide()
-