60 while ((fi =
filters.First()) != NULL)
67 return shp->channel.Source();
72 return shp->channel.Transponder();
90 int handle =
device->OpenFilter(FilterData->
pid, FilterData->
tid, FilterData->
mask);
109 if (--fh->
used <= 0) {
154 fi->SetStatus(
false);
170#define FLUSH_TIME 100
183 if (NumFilters == 0) {
188 pollfd pfd[NumFilters];
191 pfd[i].fd = fh->handle;
192 pfd[i].events = POLLIN;
198 if (poll(pfd, NumFilters, (!
on ||
waitForLock) ? 100 : 1000) > 0) {
199 for (
int i = 0; i < NumFilters; i++) {
200 if (pfd[i].revents & POLLIN) {
206 if (pfd[i].fd == fh->
handle)
211 unsigned char buf[4096];
212 int r =
device->ReadFilter(fh->
handle, buf,
sizeof(buf));
216 int len = (((buf[1] & 0x0F) << 8) | (buf[2] & 0xFF)) + 3;
222 if (fi->Matches(pid, tid))
223 fi->Process(pid, tid, buf, len);
static void SleepMs(int TimeoutMs)
Creates a cCondWait object and uses it to sleep for TimeoutMs milliseconds, immediately giving up the...
bool Is(u_short Pid, u_char Tid, u_char Mask)
cFilterHandle(const cFilterData &FilterData)
cSectionHandler * sectionHandler
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
cListObject(const cListObject &ListObject)
void SetChannel(const cChannel *Channel)
cList< cFilterHandle > filterHandles
cSectionHandlerPrivate * shp
const cChannel * Channel(void)
virtual ~cSectionHandler() override
cSectionHandler(cDevice *Device)
virtual void Action(void) override
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
void Del(const cFilterData *FilterData)
void Add(const cFilterData *FilterData)
void Attach(cFilter *Filter)
void Detach(cFilter *Filter)
void bool Start(void)
Sets the description of this thread, which will be used when logging starting or stopping of the thre...
void SetDescription(const char *Description,...) __attribute__((format(printf
bool Running(void)
Returns false if a derived cThread object shall leave its Action() function.
cThread(const char *Description=NULL, bool LowPriority=false)
Creates a new thread.
void Cancel(int WaitSeconds=0)
Cancels the thread by first setting 'running' to false, so that the Action() loop can finish in an or...