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 eDVBServiceEITHandler::eDVBServiceEITHandler()
37 CONNECT(m_EIT.tableReady, eDVBServiceEITHandler::EITready);
40 void eDVBServiceEITHandler::start(iDVBDemux *demux, int sid)
42 m_EIT.begin(eApp, eDVBEITSpec(sid), demux);
45 void eDVBServiceEITHandler::startOther(iDVBDemux *demux, int sid)
47 m_EIT.begin(eApp, eDVBEITSpecOther(sid), demux);
50 RESULT eDVBServiceEITHandler::getEvent(ePtr<eServiceEvent> &event, int nownext)
52 event = nownext ? m_event_next : m_event_now;