vdr 2.8.4
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 <atomic>
14#include <time.h>
15#include "filter.h"
16#include "thread.h"
17#include "tools.h"
18
19class cDevice;
20class cChannel;
21class cFilterHandle;
23
24class cSectionHandler : public cThread {
25 friend class cFilter;
26private:
30 // SetStatus() changes these under the thread lock, Action() also uses them outside of it:
31 std::atomic<bool> on, waitForLock;
32 std::atomic<bool> flush;
37 void Add(const cFilterData *FilterData);
38 void Del(const cFilterData *FilterData);
39 virtual void Action(void) override;
40public:
41 cSectionHandler(cDevice *Device);
42 virtual ~cSectionHandler() override;
43 int Source(void);
44 int Transponder(void);
45 const cChannel *Channel(void);
46 void Attach(cFilter *Filter);
47 void Detach(cFilter *Filter);
48 void SetChannel(const cChannel *Channel);
49 void SetStatus(bool On);
50 };
51
52#endif //__SECTIONS_H
Definition tools.h:650
int Transponder(void)
Definition sections.c:70
friend class cFilter
Definition sections.h:25
void SetChannel(const cChannel *Channel)
Definition sections.c:140
std::atomic< bool > flush
Definition sections.h:32
cList< cFilterHandle > filterHandles
Definition sections.h:36
int Source(void)
Definition sections.c:65
cSectionHandlerPrivate * shp
Definition sections.h:27
const cChannel * Channel(void)
Definition sections.c:75
cTimeMs flushTimer
Definition sections.h:34
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:33
void Attach(cFilter *Filter)
Definition sections.c:119
cList< cFilter > filters
Definition sections.h:35
std::atomic< bool > waitForLock
Definition sections.h:31
cDevice * device
Definition sections.h:28
std::atomic< bool > on
Definition sections.h:31
void Detach(cFilter *Filter)
Definition sections.c:130
cThread(const char *Description=NULL, bool LowPriority=false)
Creates a new thread.
Definition thread.c:264