4 #include <lib/service/iservice.h>
5 #include <lib/dvb/idvb.h>
7 #include <lib/dvb/pmt.h>
8 #include <lib/dvb/eit.h>
10 class eServiceFactoryDVB: public iServiceHandler
12 DECLARE_REF(eServiceFactoryDVB);
15 virtual ~eServiceFactoryDVB();
19 RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
20 RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
21 RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
22 RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
24 RESULT lookupService(ePtr<eDVBService> &ptr, const eServiceReference &ref);
27 class eDVBServiceList: public iListableService
29 DECLARE_REF(eDVBServiceList);
31 eServiceReference m_parent;
32 friend class eServiceFactoryDVB;
33 eDVBServiceList(const eServiceReference &parent);
35 virtual ~eDVBServiceList();
36 RESULT getContent(std::list<eServiceReference> &list);
37 RESULT getNext(eServiceReference &ptr);
40 class eDVBServicePlay: public iPlayableService, iSeekableService, public Object, public iServiceInformation
42 DECLARE_REF(eDVBServicePlay);
44 friend class eServiceFactoryDVB;
45 eServiceReference m_reference;
47 ePtr<eDVBService> m_dvb_service;
49 ePtr<iTSMPEGDecoder> m_decoder;
51 eDVBServicePMTHandler m_service_handler;
52 eDVBServiceEITHandler m_event_handler;
54 eDVBServicePlay(const eServiceReference &ref, eDVBService *service);
58 void serviceEvent(int event);
59 Signal2<void,iPlayableService*,int> m_event;
63 virtual ~eDVBServicePlay();
66 RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
69 RESULT seek(ePtr<iSeekableService> &ptr);
70 RESULT pause(ePtr<iPauseableService> &ptr);
71 RESULT info(ePtr<iServiceInformation> &ptr);
74 RESULT getLength(pts_t &len);
75 RESULT seekTo(pts_t to);
76 RESULT getPlayPosition(pts_t &pos);
78 // iServiceInformation
79 RESULT getName(std::string &name);
80 RESULT getEvent(ePtr<eServiceEvent> &evt, int nownext);