1 #include <lib/service/event.h>
2 #include <lib/base/estring.h>
3 #include <lib/dvb_si/eit.h>
4 #include <lib/dvb_si/short_event_descriptor.h>
5 #include <lib/dvb_si/descriptor_tag.h>
7 DEFINE_REF(eServiceEvent);
9 RESULT eServiceEvent::parseFrom(Event *evt)
11 m_begin = 0; // ich bin FAUL
12 m_duration = (evt->getDuration() & 0xFF) + ((evt->getDuration() >> 8) & 0xFF) * 60 + ((evt->getDuration() >> 16) & 0xFF) * 24 * 60;
14 for (DescriptorConstIterator desc = evt->getDescriptors()->begin(); desc != evt->getDescriptors()->end(); ++desc)
16 switch ((*desc)->getTag())
18 case SHORT_EVENT_DESCRIPTOR:
20 const ShortEventDescriptor *sed = (ShortEventDescriptor*)*desc;
21 m_event_name = convertDVBUTF8(sed->getEventName());
22 m_description = convertDVBUTF8(sed->getText());
30 DEFINE_REF(eDebugClass);