From: Andreas Monzner Date: Sun, 2 Apr 2006 16:00:29 +0000 (+0000) Subject: much faster service change on same transponder (just FTA) X-Git-Tag: 2.6.0~3750 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/0b30e9845b60aae63e6d7e5b8e3a80bdfe4e4ad5 much faster service change on same transponder (just FTA) add ability to "zapto" and "record" services and use just cached pids (no use of PMT) ( no playback yet !!!! ) this is implemented likewise to enigma1 Example entry in lamedb: 6dca:00c00000:044d:0001:1:0 Das Erste p:ARD,c:000065,c:010066,c:020068,c:030065,f:4 p: is the provider name c:XXPPPP: are cached pids 00 is the video pid 01 is the audio pid 02 is the text pid 03 is the pcr pid f: is a flag bitmask bit 3 (decimal 4) is used for disable use of the pmt (just use cached pids) --- diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 63e163eb..13b43ffe 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -476,6 +476,7 @@ void eDVBDB::saveServicelist() 0); fprintf(f, "%s\n", i->second->m_service_name.c_str()); + fprintf(f, "p:%s", i->second->m_provider_name.c_str()); // write cached pids @@ -488,6 +489,9 @@ void eDVBDB::saveServicelist() ca != i->second->m_ca.end(); ++ca) fprintf(f, ",C:%04x", *ca); + if (it->second->m_flags) + fprintf(f, ",f:%x", it->second->m_flags); + fprintf(f, "\n"); services++; } diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h index dbc24a5f..319a9c0b 100644 --- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -236,8 +236,21 @@ public: std::string m_provider_name; void genSortName(); - + int m_flags; + enum + { +#if 0 // not yet implemented + dxNoSDT=1, // don't get SDT + dxDontshow=2, + dxHoldName=8, + dxNewFound=64, // found in prev scan +#endif + dxNoDVB=4 // dont use PMT for this service ( use cached pids ) + }; + + bool usePMT() const { return !(m_flags & dxNoDVB); } + std::set m_ca; std::map m_cache; virtual ~eDVBService(); diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index f23696b0..679d7a8f 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -145,7 +145,7 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) program.pmtPid = -1; program.textPid = -1; - if (!m_PMT.getCurrent(ptr)) + if ( ((m_service && m_service->usePMT()) || !m_service) && !m_PMT.getCurrent(ptr)) { int cached_apid_ac3 = -1; int cached_apid_mpeg = -1; @@ -413,7 +413,11 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux, eDebug("allocatePVRChannel failed!\n"); m_channel = m_pvr_channel; } - + + ePtr db; + if (!m_resourceManager->getChannelList(db)) + db->getService((eServiceReferenceDVB&)m_reference, m_service); + if (m_channel) { m_channel->connectStateChange( @@ -437,10 +441,6 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux, m_pvr_channel->playFile(ref.path.c_str()); } - ePtr db; - if (!m_resourceManager->getChannelList(db)) - db->getService((eServiceReferenceDVB&)m_reference, m_service); - return res; }