vdr 2.8.3
dvbsubtitle.h
Go to the documentation of this file.
1/*
2 * dvbsubtitle.h: DVB subtitles
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * Original author: Marco Schluessler <marco@lordzodiac.de>
8 *
9 * $Id: dvbsubtitle.h 5.3 2025/03/28 22:49:17 kls Exp $
10 */
11
12#ifndef __DVBSUBTITLE_H
13#define __DVBSUBTITLE_H
14
15#include <atomic>
16#include "osd.h"
17#include "thread.h"
18#include "tools.h"
19
21class cDvbSubtitleAssembler; // for legacy PES recordings
23
25private:
26 static std::atomic<int> setupLevel; // incremented by SetupChanged() in the main thread, read by Action()
29 std::atomic<bool> frozen; // set by Freeze() and Reset() in other threads, read by Action() without the lock
39 double osdFactorX;
40 double osdFactorY;
42 bool visible;
43 uint64_t endVisible;
47 cDvbSubtitlePage *GetPageById(int PageId, bool New = false);
48 void SetOsdData(void);
49 bool AssertOsd(void);
50 int ExtractSegment(const uchar *Data, int Length, int64_t Pts);
51 int ExtractPgsSegment(const uchar *Data, int Length, int64_t Pts);
52 void FinishPage(cDvbSubtitlePage *Page);
53public:
55 virtual ~cDvbSubtitleConverter() override;
56 virtual void Action(void) override;
57 void SetVisible(bool Visible);
58 void SetTempVisible(void);
59 void Reset(void);
60 void Freeze(bool Status) { frozen = Status; }
61 int ConvertFragments(const uchar *Data, int Length); // for legacy PES recordings
62 int Convert(const uchar *Data, int Length);
63 static void SetupChanged(void);
64 };
65
66#endif //__DVBSUBTITLE_H
static std::atomic< int > setupLevel
Definition dvbsubtitle.h:26
int Convert(const uchar *Data, int Length)
void Freeze(bool Status)
Definition dvbsubtitle.h:60
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 SetVisible(bool Visible)
cList< cDvbSubtitleBitmaps > * bitmaps
Definition dvbsubtitle.h:45
void FinishPage(cDvbSubtitlePage *Page)
int ExtractPgsSegment(const uchar *Data, int Length, int64_t Pts)
int ExtractSegment(const uchar *Data, int Length, int64_t Pts)
cDvbSubtitleAssembler * dvbSubtitleAssembler
Definition dvbsubtitle.h:27
std::atomic< bool > frozen
Definition dvbsubtitle.h:29
cList< cDvbSubtitlePage > * pages
Definition dvbsubtitle.h:44
cDvbSubtitlePage * GetPageById(int PageId, bool New=false)
static void SetupChanged(void)
int ConvertFragments(const uchar *Data, int Length)
cDvbSubtitleBitmaps * current
Definition dvbsubtitle.h:46
Definition tools.h:650
The cOsd class is the interface to the "On Screen Display".
Definition osd.h:756
cThread(const char *Description=NULL, bool LowPriority=false)
Creates a new thread.
Definition thread.c:264
unsigned char uchar
Definition tools.h:31