X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/721f838966ed31bde07d08792154e0750d6dd9ae..55f6a93959c05873d204af92f7a381b624de2860:/lib/dvb/pmt.cpp diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index 2455b95f..a5e9be46 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -138,17 +139,20 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) program.pcrPid = -1; program.isCrypted = false; program.pmtPid = -1; + program.textPid = -1; if (!m_PMT.getCurrent(ptr)) { int cached_apid_ac3 = -1; int cached_apid_mpeg = -1; int cached_vpid = -1; + int cached_tpid = -1; if ( m_service && !m_service->cacheEmpty() ) { cached_vpid = m_service->getCachePID(eDVBService::cVPID); cached_apid_mpeg = m_service->getCachePID(eDVBService::cAC3PID); cached_apid_ac3 = m_service->getCachePID(eDVBService::cAPID); + cached_tpid = m_service->getCachePID(eDVBService::cTPID); } eDVBTableSpec table_spec; ptr->getSpec(table_spec); @@ -193,6 +197,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) { switch ((*desc)->getTag()) { + case TELETEXT_DESCRIPTOR: + if ( program.textPid == -1 || (*es)->getPid() == cached_tpid ) + program.textPid = (*es)->getPid(); + break; case AC3_DESCRIPTOR: if (!isvideo) { @@ -269,6 +277,7 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) apid_ac3 = m_service->getCachePID(eDVBService::cAC3PID), apid_mpeg = m_service->getCachePID(eDVBService::cAPID), pcrpid = m_service->getCachePID(eDVBService::cPCRPID), + tpid = m_service->getCachePID(eDVBService::cTPID), cnt=0; if ( vpid != -1 ) { @@ -298,6 +307,11 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) ++cnt; program.pcrPid = pcrpid; } + if ( tpid != -1 ) + { + ++cnt; + program.textPid = tpid; + } if ( cnt ) return 0; }