4 #include <lib/dvb/idvb.h>
6 #ifndef DMX_FILTER_SIZE
7 #define DMX_FILTER_SIZE 16
10 struct eDVBSectionFilterMask
13 /* mode is 0 for positive, 1 for negative filtering */
14 __u8 data[DMX_FILTER_SIZE], mask[DMX_FILTER_SIZE], mode[DMX_FILTER_SIZE];
24 int pid, tid, tidext, tid_mask, tidext_mask;
26 int timeout; /* timeout in ms */
31 tfAnyVersion filter ANY version
32 0 filter all EXCEPT given version (negative filtering)
33 tfThisVersion filter only THIS version
47 class iDVBSectionReader: public iObject
50 virtual RESULT start(const eDVBSectionFilterMask &mask)=0;
51 virtual RESULT stop()=0;
52 virtual RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn)=0;
53 virtual ~iDVBSectionReader() { };
56 class iDVBPESReader: public iObject
59 virtual RESULT start(int pid)=0;
60 virtual RESULT stop()=0;
61 virtual RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
62 virtual ~iDVBPESReader() { };
65 /* records a given set of pids into a file descriptor. */
66 /* the FD must not be modified between start() and stop() ! */
67 class iDVBTSRecorder: public iObject
70 virtual RESULT start() = 0;
71 virtual RESULT addPID(int pid) = 0;
72 virtual RESULT removePID(int pid) = 0;
74 virtual RESULT setTimingPID(int pid) = 0;
76 virtual RESULT setTargetFD(int fd) = 0;
77 /* for saving additional meta data. */
78 virtual RESULT setTargetFilename(const char *filename) = 0;
79 virtual RESULT setBoundary(off_t max) = 0;
81 virtual RESULT stop() = 0;
85 /* a write error has occured. data won't get lost if fd is writable after return. */
86 /* you MUST respond with either stop() or fixing the problems, else you get the error */
89 /* the programmed boundary was reached. you might set a new target fd. you can close the */
92 virtual RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &conn)=0;