4 #include <lib/dvb/idvb.h>
5 #include <lib/dvb/idemux.h>
7 class eDVBDemux: public iDVBDemux
12 friend class eDVBSectionReader;
13 friend class eDVBAudio;
14 friend class eDVBVideo;
16 friend class eDVBTSRecorder;
17 friend class eDVBCAService;
19 DECLARE_REF(eDVBDemux);
20 eDVBDemux(int adapter, int demux);
22 RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
23 RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder);
24 RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader);
25 RESULT getSTC(pts_t &pts);
26 RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; }
29 class eDVBSectionReader: public iDVBSectionReader, public Object
31 DECLARE_REF(eDVBSectionReader);
34 Signal1<void, const __u8*> read;
35 ePtr<eDVBDemux> demux;
39 eSocketNotifier *notifier;
42 eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
43 virtual ~eDVBSectionReader();
44 RESULT start(const eDVBSectionFilterMask &mask);
46 RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
49 class eFilePushThread;
51 class eDVBTSRecorder: public iDVBTSRecorder, public Object
53 DECLARE_REF(eDVBTSRecorder);
55 eDVBTSRecorder(eDVBDemux *demux);
59 RESULT addPID(int pid);
60 RESULT removePID(int pid);
62 RESULT setFormat(int pid);
64 RESULT setTargetFD(int fd);
65 RESULT setBoundary(off_t max);
69 RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
71 RESULT startPID(int pid);
72 void stopPID(int pid);
74 eFilePushThread *m_thread;
76 std::map<int,int> m_pids;
77 Signal1<void,int> m_event;
79 ePtr<eDVBDemux> m_demux;
81 int m_running, m_format, m_target_fd, m_source_fd;