4 #include <lib/dvb/idvb.h>
6 class iDVBSectionReader: public iObject
9 virtual RESULT setBufferSize(int size)=0;
10 virtual RESULT start(const eDVBSectionFilterMask &mask)=0;
11 virtual RESULT startWithExternalBufferFunc(const eDVBSectionFilterMask &mask, const Slot0<__u8*> &buffer_func)=0;
12 virtual RESULT stop()=0;
13 virtual RESULT connectRead(const sigc::slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
14 virtual ~iDVBSectionReader() { };
17 class iDVBTSReader: public iObject
29 virtual RESULT setBufferSize(int size)=0;
30 virtual RESULT configure(int pid, int type) = 0;
31 virtual RESULT start()=0;
32 virtual RESULT start(int pid, int type)=0;
33 virtual RESULT stop()=0;
35 virtual bool paused()=0;
36 virtual void pause()=0;
37 virtual void resume()=0;
39 virtual bool active()=0;
40 virtual RESULT connectRead(const sigc::slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
41 virtual ~iDVBTSReader() { };
43 virtual void close() { }; // workaround to close a fd to interrupt a pending read for faster stop response... default a NOP
44 virtual bool closePending() { return false; }
47 class iDVBPESReader: public iObject
50 virtual RESULT setBufferSize(int size)=0;
51 virtual RESULT start(int pid)=0;
52 virtual RESULT stop()=0;
53 virtual RESULT connectRead(const sigc::slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
54 virtual ~iDVBPESReader() { };
57 /* records a given set of pids into a file descriptor. */
58 /* the FD must not be modified between start() and stop() ! */
59 class iDVBTSRecorder: public iObject
62 virtual RESULT setBufferSize(int size) = 0;
63 virtual RESULT start() = 0;
64 virtual RESULT addPID(int pid) = 0;
65 virtual RESULT removePID(int pid) = 0;
67 virtual RESULT setTimingPID(int pid, int type) = 0;
69 virtual RESULT setTargetFD(int fd) = 0;
70 /* for saving additional meta data. */
71 virtual RESULT setTargetFilename(const char *filename) = 0;
72 virtual RESULT setAccessPoints(bool on) = 0;
74 virtual RESULT stop() = 0;
76 virtual RESULT getCurrentPCR(pts_t &pcr) = 0;
80 /* a write error has occured. data won't get lost if fd is writable after return. */
81 /* you MUST respond with either stop() or fixing the problems, else you get the error */
84 /* the programmed boundary was reached. you might set a new target fd. you can close the */
87 virtual RESULT connectEvent(const sigc::slot1<void,int> &event, ePtr<eConnection> &conn)=0;
90 class iDVBTSWriter: public iObject
93 virtual ssize_t processData(const unsigned char *data, size_t bytes) = 0;
94 virtual void flush() = 0;
95 virtual int waitEOF() = 0;