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;
15 friend class eDVBTSRecorder;
17 DECLARE_REF(eDVBDemux);
18 eDVBDemux(int adapter, int demux);
20 RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
21 RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder);
22 RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader);
25 class eDVBSectionReader: public iDVBSectionReader, public Object
27 DECLARE_REF(eDVBSectionReader);
30 Signal1<void, const __u8*> read;
31 ePtr<eDVBDemux> demux;
35 eSocketNotifier *notifier;
38 eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
39 virtual ~eDVBSectionReader();
40 RESULT start(const eDVBSectionFilterMask &mask);
42 RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
45 class eDVBTSRecorderThread;
47 class eDVBTSRecorder: public iDVBTSRecorder, public Object
49 DECLARE_REF(eDVBTSRecorder);
51 eDVBTSRecorder(eDVBDemux *demux);
55 RESULT addPID(int pid);
56 RESULT removePID(int pid);
58 RESULT setFormat(int pid);
60 RESULT setTargetFD(int fd);
61 RESULT setBoundary(off_t max);
65 RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn);
67 RESULT startPID(int pid);
68 void stopPID(int pid);
70 eDVBTSRecorderThread *m_thread;
72 std::map<int,int> m_pids;
73 Signal1<void,int> m_event;
75 ePtr<eDVBDemux> m_demux;
77 int m_running, m_format, m_target_fd, m_source_fd;