rewrite ServiceEventTracker and PerServiceBase service event handle code
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 27 Jun 2008 20:11:13 +0000 (20:11 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 27 Jun 2008 20:11:13 +0000 (20:11 +0000)
lib/dvb/decoder.cpp
lib/python/Components/Makefile.am
lib/python/Screens/ChannelSelection.py
lib/python/Screens/InfoBarGenerics.py
lib/service/servicedvb.cpp

index 7ad1a25..4403172 100644 (file)
@@ -1007,7 +1007,12 @@ RESULT eTSMPEGDecoder::setSyncMaster(int who)
 
 RESULT eTSMPEGDecoder::start()
 {
+       timespec now, tmp;
+       extern timespec service_start;
        RESULT r;
+       clock_gettime(CLOCK_MONOTONIC, &now);
+       tmp = now - service_start;
+       eDebug("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %d:%d", tmp.tv_sec, tmp.tv_nsec);
        r = setState();
        if (r)
                return r;
index d3c51ab..df8cf9f 100644 (file)
@@ -18,4 +18,4 @@ install_PYTHON = \
        MultiContent.py MediaPlayer.py TunerInfo.py VideoWindow.py ChoiceList.py \
        Element.py Playlist.py ParentalControl.py ParentalControlList.py \
        Ipkg.py SelectionList.py Scanner.py SystemInfo.py DreamInfoHandler.py \
-       Task.py
+       Task.py Thread.py
index 64ae549..5787021 100644 (file)
@@ -1086,7 +1086,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect
                                "keyTV": self.setModeTv,
                        })
 
-               self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+               self.__event_tracker = ServiceEventTracker(screen=self, in_thread=True, eventmap=
                        {
                                iPlayableService.evStart: self.__evServiceStart,
                                iPlayableService.evEnd: self.__evServiceEnd
@@ -1356,7 +1356,7 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS
                                "ok": self.channelSelected,
                        })
 
-               self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+               self.__event_tracker = ServiceEventTracker(screen=self, in_thread=True, eventmap=
                        {
                                iPlayableService.evStart: self.__evServiceStart,
                                iPlayableService.evEnd: self.__evServiceEnd
index 2227f8b..9d25785 100644 (file)
@@ -62,7 +62,7 @@ class InfoBarShowHide:
                                "hide": self.hide,
                        }, 1) # lower prio to make it possible to override ok and cancel..
 
-               self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+               self.__event_tracker = ServiceEventTracker(screen=self, in_thread=True, eventmap=
                        {
                                iPlayableService.evStart: self.serviceStarted,
                        })
index 307c317..f13ae50 100644 (file)
@@ -939,6 +939,8 @@ RESULT eDVBServiceList::setListName(const std::string &name)
        return m_bouquet->setListName(name);
 }
 
+timespec service_start;
+
 RESULT eServiceFactoryDVB::play(const eServiceReference &ref, ePtr<iPlayableService> &ptr)
 {
        ePtr<eDVBService> service;
@@ -946,6 +948,7 @@ RESULT eServiceFactoryDVB::play(const eServiceReference &ref, ePtr<iPlayableServ
        if (r)
                service = 0;
                // check resources...
+       clock_gettime(CLOCK_MONOTONIC, &service_start);
        ptr = new eDVBServicePlay(ref, service);
        return 0;
 }