4 #include <lib/dvb/idvb.h>
5 #include <lib/dvb/idemux.h>
7 class eDVBDemux: public iDVBDemux
9 DECLARE_REF(eDVBDemux);
14 eDVBDemux(int adapter, int demux);
17 RESULT setSourceFrontend(int fenum);
18 RESULT setSourcePVR(int pvrnum);
20 RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
21 RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder);
22 RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader);
23 RESULT getSTC(pts_t &pts, int num);
24 RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; }
26 RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
31 friend class eDVBSectionReader;
32 friend class eDVBAudio;
33 friend class eDVBVideo;
35 friend class eDVBTSRecorder;
36 friend class eDVBCAService;
37 Signal1<void, int> m_event;
42 class eDVBSectionReader: public iDVBSectionReader, public Object
44 DECLARE_REF(eDVBSectionReader);
47 Signal1<void, const __u8*> read;
48 ePtr<eDVBDemux> demux;
52 eSocketNotifier *notifier;
55 eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
56 virtual ~eDVBSectionReader();
57 RESULT start(const eDVBSectionFilterMask &mask);
59 RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
62 class eFilePushThread;
64 class eDVBTSRecorder: public iDVBTSRecorder, public Object
66 DECLARE_REF(eDVBTSRecorder);
68 eDVBTSRecorder(eDVBDemux *demux);
72 RESULT addPID(int pid);
73 RESULT removePID(int pid);
75 RESULT setFormat(int pid);
77 RESULT setTargetFD(int fd);
78 RESULT setBoundary(off_t max);
82 RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
84 RESULT startPID(int pid);
85 void stopPID(int pid);
87 eFilePushThread *m_thread;
89 std::map<int,int> m_pids;
90 Signal1<void,int> m_event;
92 ePtr<eDVBDemux> m_demux;
94 int m_running, m_format, m_target_fd, m_source_fd;