Support turbo2.
[vuplus_dvbapp] / lib / dvb / idemux.h
1 #ifndef __dvb_idemux_h
2 #define __dvb_idemux_h
3
4 #include <lib/dvb/idvb.h>
5
6 class iDVBSectionReader: public iObject
7 {
8 public:
9         virtual RESULT setBufferSize(int size)=0;
10         virtual RESULT start(const eDVBSectionFilterMask &mask)=0;
11         virtual RESULT stop()=0;
12         virtual RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn)=0;
13         virtual ~iDVBSectionReader() { };
14 };
15
16 class iDVBPESReader: public iObject
17 {
18 public:
19         virtual RESULT setBufferSize(int size)=0;
20         virtual RESULT start(int pid)=0;
21         virtual RESULT stop()=0;
22         virtual RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
23         virtual ~iDVBPESReader() { };
24 };
25
26         /* records a given set of pids into a file descriptor. */
27         /* the FD must not be modified between start() and stop() ! */
28 class iDVBTSRecorder: public iObject
29 {
30 public:
31         virtual RESULT setBufferSize(int size) = 0;
32         virtual RESULT start() = 0;
33         virtual RESULT addPID(int pid) = 0;
34         virtual RESULT removePID(int pid) = 0;
35         
36         virtual RESULT setTimingPID(int pid, int type) = 0;
37         
38         virtual RESULT setTargetFD(int fd) = 0;
39                 /* for saving additional meta data. */
40         virtual RESULT setTargetFilename(const char *filename) = 0;
41         virtual RESULT enableAccessPoints(bool enable) = 0;
42         virtual RESULT setBoundary(off_t max) = 0;
43         virtual RESULT setTimeshift(bool enable) = 0;
44         
45         virtual RESULT stop() = 0;
46
47         virtual RESULT getCurrentPCR(pts_t &pcr) = 0;
48         
49         enum {
50                 eventWriteError,
51                                 /* a write error has occured. data won't get lost if fd is writable after return. */
52                                 /* you MUST respond with either stop() or fixing the problems, else you get the error */
53                                 /* again. */
54                 eventReachedBoundary,
55                                 /* the programmed boundary was reached. you might set a new target fd. you can close the */
56                                 /* old one. */
57         };
58         virtual RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn)=0;
59 };
60
61 #endif