fixes for old api.. not all tested..
[enigma2.git] / lib / dvb / demux.h
1 #ifndef __dvb_demux_h
2 #define __dvb_demux_h
3
4 #include <lib/dvb/idvb.h>
5 #include <lib/dvb/isection.h>
6
7 class eDVBDemux: public iDVBDemux
8 {
9         int adapter, demux;
10         friend class eDVBSectionReader;
11         friend class eDVBAudio;
12         friend class eDVBVideo;
13 public:
14         DECLARE_REF
15         eDVBDemux(int adapter, int demux);
16         virtual ~eDVBDemux();
17         RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
18         RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader);
19 };
20
21 class eDVBSectionReader: public iDVBSectionReader, public Object
22 {
23         DECLARE_REF
24 private:
25         int fd;
26         Signal1<void, const __u8*> read;
27         ePtr<eDVBDemux> demux;
28         int active;
29         int checkcrc;
30         void data(int);
31         eSocketNotifier *notifier;
32 public:
33         
34         eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
35         virtual ~eDVBSectionReader();
36         RESULT start(const eDVBSectionFilterMask &mask);
37         RESULT stop();
38         RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
39 };
40
41 #endif