def get_autostart_application(self): if self._applicationList is None: service = self.session.nav.getCurrentService() info = service and service.info() if info is not None: sid = info.getInfo(iServiceInformation.sSID) onid = info.getInfo(iServiceInformation.sONID) tsid = info.getInfo(iServiceInformation.sTSID) name = info.getName() vbcfg.g_channel_info = (sid, onid, tsid, name) pmtid = info.getInfo(iServiceInformation.sPMTPID) demux = info.getInfoString( iServiceInformation.sLiveStreamDemuxId) vbcfg.DEBUG("demux = %s, pmtid = 0x%x, sid = 0x%x" % (demux, pmtid, sid)) from aitreader import eAITSectionReader reader = eAITSectionReader(demux, pmtid, sid) if reader.doOpen(info, self.m_vuplus): reader.doParseApplications() #reader.doDump() else: vbcfg.ERR("no AIT") try: self._applicationList = reader.getApplicationList() except: pass if self._applicationList is not None: for app in self._applicationList: if app["control"] in (1, -1): return app return None
def get_autostart_application(self): if self._applicationList is None: service = self.session.nav.getCurrentService() info = service and service.info() if info is not None: sid = info.getInfo(iServiceInformation.sSID) onid = info.getInfo(iServiceInformation.sONID) tsid = info.getInfo(iServiceInformation.sTSID) name = info.getName() vbcfg.g_channel_info = (sid, onid, tsid, name) pmtid = info.getInfo(iServiceInformation.sPMTPID) demux = info.getInfoString(iServiceInformation.sLiveStreamDemuxId) vbcfg.DEBUG("demux = %s, pmtid = 0x%x, sid = 0x%x" % (demux, pmtid, sid)) from aitreader import eAITSectionReader reader = eAITSectionReader(demux, pmtid, sid) if reader.doOpen(info, self.m_vuplus): reader.doParseApplications() reader.doDump() else: vbcfg.ERR("no AIT") try: self._applicationList = reader.getApplicationList() except: pass if self._applicationList is not None: for app in self._applicationList: if app["control"] in (1, -1): return app return None