much faster service change on same transponder (just FTA)
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 2 Apr 2006 16:00:29 +0000 (16:00 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 2 Apr 2006 16:00:29 +0000 (16:00 +0000)
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)

lib/dvb/db.cpp
lib/dvb/idvb.h
lib/dvb/pmt.cpp

index 63e163eb28ffc2918da47589bd9e7bf4e7d45869..13b43ffe6f5f0a00a2cdf993b053ca3c912b5be6 100644 (file)
@@ -476,6 +476,7 @@ void eDVBDB::saveServicelist()
                                0);
 
                fprintf(f, "%s\n", i->second->m_service_name.c_str());
                                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
                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);
 
                        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++;
        }
                fprintf(f, "\n");
                services++;
        }
index dbc24a5f7c17369775a22b8748a8a916d3731a9c..319a9c0b914037fab6411d7e86c0919f81d52269 100644 (file)
@@ -236,8 +236,21 @@ public:
        std::string m_provider_name;
        
        void genSortName();
        std::string m_provider_name;
        
        void genSortName();
-       
+
        int m_flags;
        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<int> m_ca;
        std::map<int,int> m_cache;
        virtual ~eDVBService();
        std::set<int> m_ca;
        std::map<int,int> m_cache;
        virtual ~eDVBService();
index f23696b05ba0858fd51c7e41c36a061dd85f2348..679d7a8f09dcd3235d2355c4b4442a98245b9da8 100644 (file)
@@ -145,7 +145,7 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
        program.pmtPid = -1;
        program.textPid = -1;
 
        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;
        {
                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;
        }
                        eDebug("allocatePVRChannel failed!\n");
                m_channel = m_pvr_channel;
        }
-       
+
+       ePtr<iDVBChannelList> db;
+       if (!m_resourceManager->getChannelList(db))
+               db->getService((eServiceReferenceDVB&)m_reference, m_service);
+
        if (m_channel)
        {
                m_channel->connectStateChange(
        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());
        }
 
                m_pvr_channel->playFile(ref.path.c_str());
        }
 
-       ePtr<iDVBChannelList> db;
-       if (!m_resourceManager->getChannelList(db))
-               db->getService((eServiceReferenceDVB&)m_reference, m_service);
-
        return res;
 }
 
        return res;
 }