speedups
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 18 Aug 2006 12:38:27 +0000 (12:38 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 18 Aug 2006 12:38:27 +0000 (12:38 +0000)
lib/service/servicedvb.cpp
lib/service/servicedvb.h

index 4942324b58d034727e31eded3fbddab95695a8d6..f175b07e8cc34051a8e76d66787b5c3dd563acf1 100644 (file)
@@ -312,6 +312,9 @@ eServiceFactoryDVB::eServiceFactoryDVB()
        eServiceCenter::getPrivInstance(sc);
        if (sc)
                sc->addServiceFactory(eServiceFactoryDVB::id, this);
+
+       m_StaticServiceDVBInfo = new eStaticServiceDVBInformation;
+       m_StaticServiceDVBBouquetInfo = new eStaticServiceDVBBouquetInformation;
 }
 
 eServiceFactoryDVB::~eServiceFactoryDVB()
@@ -584,9 +587,9 @@ RESULT eServiceFactoryDVB::info(const eServiceReference &ref, ePtr<iStaticServic
        if ((ref.flags & eServiceReference::flagDirectory) == eServiceReference::flagDirectory) // bouquet
        {
                if ( !ref.name.empty() )  // satellites or providers list
-                       ptr = new eStaticServiceDVBInformation;
+                       ptr = m_StaticServiceDVBInfo;
                else // a dvb bouquet
-                       ptr = new eStaticServiceDVBBouquetInformation;
+                       ptr = m_StaticServiceDVBBouquetInfo;
        }
        else if (!ref.path.empty()) /* do we have a PVR service? */
                ptr = new eStaticServiceDVBPVRInformation(ref);
@@ -594,7 +597,7 @@ RESULT eServiceFactoryDVB::info(const eServiceReference &ref, ePtr<iStaticServic
        {
                ePtr<eDVBService> service;
                if (lookupService(service, ref)) // no eDVBService avail for this reference ( Linkage Services... )
-                       ptr = new eStaticServiceDVBInformation;
+                       ptr = m_StaticServiceDVBInfo;
                else
                        /* eDVBService has the iStaticServiceInformation interface, so we pass it here. */
                        ptr = service;
index 0be174e28c22af5d834e49a3aeade9d8f9ea8ec5..b2306e10b1ac671e9d85b83f32169297b037bc09 100644 (file)
 #include <lib/dvb/radiotext.h>
 #include <lib/base/filepush.h>
 
+class eStaticServiceDVBInformation;
+class eStaticServiceDVBBouquetInformation;
+
 class eServiceFactoryDVB: public iServiceHandler
 {
-DECLARE_REF(eServiceFactoryDVB);
+       DECLARE_REF(eServiceFactoryDVB);
+       ePtr<eStaticServiceDVBInformation> m_StaticServiceDVBInfo;
+       ePtr<eStaticServiceDVBBouquetInformation> m_StaticServiceDVBBouquetInfo;
 public:
        eServiceFactoryDVB();
        virtual ~eServiceFactoryDVB();