vdr 2.8.3
sections.h
Go to the documentation of this file.
1/*
2 * sections.h: Section data handling
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: sections.h 5.2 2025/03/02 11:03:35 kls Exp $
8 */
9
10#ifndef __SECTIONS_H
11#define __SECTIONS_H
12
13#include <time.h>
14#include "filter.h"
15#include "thread.h"
16#include "tools.h"
17
18class cDevice;
19class cChannel;
20class cFilterHandle;
22
23class cSectionHandler : public cThread {
24 friend class cFilter;
25private:
29 // SetStatus() changes these under the thread lock, Action() also uses them outside of it:
30 std::atomic<bool> on, waitForLock;
31 std::atomic<bool> flush;
36 void Add(const cFilterData *FilterData);
37 void Del(const cFilterData *FilterData);
38 virtual void Action(void) override;
39public:
40 cSectionHandler(cDevice *Device);
41 virtual ~cSectionHandler() override;
42 int Source(void);
43 int Transponder(void);
44 const cChannel *Channel(void);
45 void Attach(cFilter *Filter);
46 void Detach(cFilter *Filter);
47 void SetChannel(const cChannel *Channel);
48 void SetStatus(bool On);
49 };
50
51#endif //__SECTIONS_H
Definition tools.h:650
int Transponder(void)
Definition sections.c:70
friend class cFilter
Definition sections.h:24
void SetChannel(const cChannel *Channel)
Definition sections.c:140
std::atomic< bool > flush
Definition sections.h:31
cList< cFilterHandle > filterHandles
Definition sections.h:35
int Source(void)
Definition sections.c:65
cSectionHandlerPrivate * shp
Definition sections.h:26
const cChannel * Channel(void)
Definition sections.c:75
cTimeMs flushTimer
Definition sections.h:33
cSectionHandler(cDevice *Device)
Definition sections.c:42
virtual void Action(void) override
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
Definition sections.c:172
void Del(const cFilterData *FilterData)
Definition sections.c:102
void Add(const cFilterData *FilterData)
Definition sections.c:80
void SetStatus(bool On)
Definition sections.c:147
bool startFilters
Definition sections.h:32
void Attach(cFilter *Filter)
Definition sections.c:119
cList< cFilter > filters
Definition sections.h:34
std::atomic< bool > waitForLock
Definition sections.h:30
cDevice * device
Definition sections.h:27
std::atomic< bool > on
Definition sections.h:30
void Detach(cFilter *Filter)
Definition sections.c:130
cThread(const char *Description=NULL, bool LowPriority=false)
Creates a new thread.
Definition thread.c:264