1 #include <lib/dvb/eit.h>
2 #include <lib/dvb/specs.h>
3 #include <lib/base/eerror.h>
4 #include <lib/service/event.h>
6 void eDVBServiceEITHandler::EITready(int error)
10 ePtr<eTable<EventInformationSection> > ptr;
11 if (!m_EIT.getCurrent(ptr))
14 for (std::vector<EventInformationSection*>::const_iterator i = ptr->getSections().begin();
15 i != ptr->getSections().end(); ++i)
17 const EventInformationSection *eit = *i;
18 for (EventConstIterator ev = eit->getEvents()->begin(); ev != eit->getEvents()->end(); ++ev)
20 ePtr<eServiceEvent> evt = new eServiceEvent();
21 evt->parseFrom(*ev,(eit->getTransportStreamId()<<16)|eit->getOriginalNetworkId());
35 void eDVBServiceEITHandler::inject(ePtr<eServiceEvent> &event, int nownext)
44 eDVBServiceEITHandler::eDVBServiceEITHandler()
46 CONNECT(m_EIT.tableReady, eDVBServiceEITHandler::EITready);
49 void eDVBServiceEITHandler::start(iDVBDemux *demux, int sid)
51 m_EIT.begin(eApp, eDVBEITSpec(sid), demux);
54 void eDVBServiceEITHandler::startOther(iDVBDemux *demux, int sid)
56 m_EIT.begin(eApp, eDVBEITSpecOther(sid), demux);
59 RESULT eDVBServiceEITHandler::getEvent(ePtr<eServiceEvent> &event, int nownext)
61 event = nownext ? m_event_next : m_event_now;