+ eServiceReferenceDVB &service = (eServiceReferenceDVB&)m_reference;
+ r = m_service_handler.tune(service, m_is_pvr, m_cue);
+
+ /* inject EIT if there is a stored one */
+ if (m_is_pvr)
+ {
+ std::string filename = service.path;
+ filename.erase(filename.length()-2, 2);
+ filename+="eit";
+ int fd = ::open( filename.c_str(), O_RDONLY );
+ if ( fd > -1 )
+ {
+ __u8 buf[4096];
+ int rd = ::read(fd, buf, 4096);
+ ::close(fd);
+ if ( rd > 12 /*EIT_LOOP_SIZE*/ )
+ {
+ Event ev(buf);
+ ePtr<eServiceEvent> event = new eServiceEvent;
+ ePtr<eServiceEvent> empty;
+ event->parseFrom(&ev, (service.getTransportStreamID().get()<<16)|service.getOriginalNetworkID().get());
+ m_event_handler.inject(event, 0);
+ m_event_handler.inject(empty, 1);
+ eDebug("injected");
+ }
+ }
+ }
+
+ if (m_is_pvr)
+ loadCuesheet();
+