MythTV  master
subtitlescreen.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 #ifndef SUBTITLESCREEN_H
4 #define SUBTITLESCREEN_H
5 
6 #include <utility>
7 #ifdef USING_LIBASS
8 extern "C" {
9 #include <ass/ass.h>
10 }
11 #endif
12 
13 // Qt headers
14 #include <QFont>
15 #include <QHash>
16 #include <QRect>
17 #include <QRegExp>
18 #include <QSize>
19 #include <QStringList>
20 #include <QVector>
21 
22 // MythTV headers
23 #include "mythscreentype.h"
24 #include "subtitlereader.h"
25 #include "mythplayer.h"
26 #include "mythuishape.h"
27 #include "mythuisimpletext.h"
28 #include "mythuiimage.h"
29 
30 class SubtitleScreen;
31 
33 {
34 public:
36  CC708CharacterAttribute formatting,
38  : m_text(std::move(t)), m_format(std::move(formatting)), m_parent(p) {}
39  FormattedTextChunk(void) = default;
40 
41  QSize CalcSize(float layoutSpacing = 0.0F) const;
42  void CalcPadding(bool isFirst, bool isLast, int &left, int &right) const;
43  bool Split(FormattedTextChunk &newChunk);
44  QString ToLogString(void) const;
45  bool PreRender(bool isFirst, bool isLast, int &x, int y, int height);
46 
47  QString m_text;
49  const SubtitleScreen *m_parent {nullptr}; // where fonts and sizes are kept
50 
51  // The following are calculated by PreRender().
52  QString m_bgShapeName;
55  QString m_textName;
56  QRect m_textRect;
57 };
58 
60 {
61 public:
62  explicit FormattedTextLine(int x = -1, int y = -1, int o_x = -1, int o_y = -1)
63  : m_xIndent(x), m_yIndent(y), m_origX(o_x), m_origY(o_y) {}
64 
65  QSize CalcSize(float layoutSpacing = 0.0F) const;
66 
67  QList<FormattedTextChunk> chunks;
68  int m_xIndent {-1}; // -1 means TBD i.e. centered
69  int m_yIndent {-1}; // -1 means TBD i.e. relative to bottom
70  int m_origX {-1}; // original, unscaled coordinates
71  int m_origY {-1}; // original, unscaled coordinates
72 };
73 
75 {
76 protected:
77  FormattedTextSubtitle(QString base, const QRect &safearea,
78  uint64_t start, uint64_t duration,
79  SubtitleScreen *p) :
80  m_base(std::move(base)), m_safeArea(safearea),
81  m_start(start), m_duration(duration), m_subScreen(p) {}
82  FormattedTextSubtitle(void) = default;
83 public:
84  virtual ~FormattedTextSubtitle() = default;
85  // These are the steps that can be done outside of the UI thread
86  // and the decoder thread.
87  virtual void WrapLongLines(void) {}
88  virtual void Layout(void);
89  virtual void PreRender(void);
90  // This is the step that can only be done in the UI thread.
91  virtual void Draw(void);
92  virtual int CacheNum(void) const { return -1; }
93  QStringList ToSRT(void) const;
94 
95 protected:
96  QString m_base;
97  QVector<FormattedTextLine> m_lines;
98  const QRect m_safeArea;
99  uint64_t m_start {0};
100  uint64_t m_duration {0};
101  SubtitleScreen *m_subScreen {nullptr}; // where fonts and sizes are kept
102  int m_xAnchorPoint {0}; // 0=left, 1=center, 2=right
103  int m_yAnchorPoint {0}; // 0=top, 1=center, 2=bottom
104  int m_xAnchor {0}; // pixels from left
105  int m_yAnchor {0}; // pixels from top
106  QRect m_bounds;
107 };
108 
110 {
111 public:
112  FormattedTextSubtitleSRT(const QString &base,
113  const QRect &safearea,
114  uint64_t start,
115  uint64_t duration,
116  SubtitleScreen *p,
117  const QStringList &subs) :
118  FormattedTextSubtitle(base, safearea, start, duration, p)
119  {
120  Init(subs);
121  }
122  void WrapLongLines(void) override; // FormattedTextSubtitle
123 private:
124  void Init(const QStringList &subs);
125 };
126 
128 {
129 public:
130  explicit FormattedTextSubtitle608(const vector<CC608Text*> &buffers,
131  const QString &base = "",
132  const QRect &safearea = QRect(),
133  SubtitleScreen *p = nullptr) :
134  FormattedTextSubtitle(base, safearea, 0, 0, p)
135  {
136  Init(buffers);
137  }
138  void Layout(void) override; // FormattedTextSubtitle
139 private:
140  void Init(const vector<CC608Text*> &buffers);
141 };
142 
144 {
145 public:
147  int num,
148  const vector<CC708String*> &list,
149  const QString &base = "",
150  const QRect &safearea = QRect(),
151  SubtitleScreen *p = nullptr,
152  float aspect = 1.77777F) :
153  FormattedTextSubtitle(base, safearea, 0, 0, p),
154  m_num(num),
155  m_bgFillAlpha(win.GetFillAlpha()),
156  m_bgFillColor(win.GetFillColor())
157  {
158  Init(win, list, aspect);
159  }
160  void Draw(void) override; // FormattedTextSubtitle
161  int CacheNum(void) const override // FormattedTextSubtitle
162  { return m_num; }
163 private:
164  void Init(const CC708Window &win,
165  const vector<CC708String*> &list,
166  float aspect);
167  int m_num;
170 };
171 
173 {
174 public:
175  SubtitleScreen(MythPlayer *player, const char * name, int fontStretch);
176  ~SubtitleScreen() override;
177 
178  void EnableSubtitles(int type, bool forced_only = false);
179  void DisableForcedSubtitles(void);
180  int EnabledSubtitleType(void) const { return m_subtitleType; }
181 
182  void ClearAllSubtitles(void);
183  void ClearNonDisplayedSubtitles(void);
184  void ClearDisplayedSubtitles(void);
185  void DisplayDVDButton(AVSubtitle* dvdButton, QRect &buttonPos);
186 
187  void SetZoom(int percent);
188  int GetZoom(void) const;
189  void SetDelay(int ms);
190  int GetDelay(void) const;
191 
192  class SubtitleFormat *GetSubtitleFormat(void) { return m_format; }
193  void Clear708Cache(uint64_t mask);
194  void SetElementAdded(void);
195  void SetElementResized(void);
196  void SetElementDeleted(void);
197 
198  QSize CalcTextSize(const QString &text,
199  const CC708CharacterAttribute &format,
200  float layoutSpacing) const;
201  void CalcPadding(const CC708CharacterAttribute &format,
202  bool isFirst, bool isLast,
203  int &left, int &right) const;
205  void SetFontSize(int pixelSize) { m_fontSize = pixelSize; }
206 
207  // Temporary methods until teletextscreen.cpp is refactored into
208  // subtitlescreen.cpp
209  static QString GetTeletextFontName(void);
210  static int GetTeletextBackgroundAlpha(void);
211 
212  // MythScreenType methods
213  bool Create(void) override; // MythScreenType
214  void Pulse(void) override; // MythUIType
215 
216 private:
217  void ResetElementState(void);
218  void OptimiseDisplayedArea(void);
219  void DisplayAVSubtitles(void);
220  int DisplayScaledAVSubtitles(const AVSubtitleRect *rect, QRect &bbox,
221  bool top, QRect &display, int forced,
222  const QString& imagename,
223  long long displayuntil, long long late);
224  void DisplayTextSubtitles(void);
225  void DisplayRawTextSubtitles(void);
226  void DrawTextSubtitles(const QStringList &subs, uint64_t start,
227  uint64_t duration);
228  void DisplayCC608Subtitles(void);
229  void DisplayCC708Subtitles(void);
230  void AddScaledImage(QImage &img, QRect &pos);
231  void InitializeFonts(bool wasResized);
232 
233  MythPlayer *m_player {nullptr};
237  QRect m_safeArea;
238  QRegExp m_removeHTML {"</?.+>"};
240  int m_fontSize {0};
241  int m_textFontZoom {100}; // valid for 708 & text subs
243  int m_textFontDelayMs {0}; // valid for text subs
249  bool m_refreshModified {false};
250  bool m_refreshDeleted {false};
252  QString m_family; // 608, 708, text, teletext
253  // Subtitles initialized but still to be processed and drawn
254  QList<FormattedTextSubtitle *> m_qInited;
255  class SubtitleFormat *m_format {nullptr};
256 
257 #ifdef USING_LIBASS
258  bool InitialiseAssLibrary(void);
259  void LoadAssFonts(void);
260  void CleanupAssLibrary(void);
261  void InitialiseAssTrack(int tracknum);
262  void CleanupAssTrack(void);
263  void AddAssEvent(char *event);
264  void ResizeAssRenderer(void);
265  void RenderAssTrack(uint64_t timecode);
266 
267  ASS_Library *m_assLibrary {nullptr};
268  ASS_Renderer *m_assRenderer {nullptr};
269  int m_assTrackNum {-1};
270  ASS_Track *m_assTrack {nullptr};
272 #endif // USING_LIBASS
273 };
274 
275 #endif // SUBTITLESCREEN_H
SubtitleScreen::DrawTextSubtitles
void DrawTextSubtitles(const QStringList &subs, uint64_t start, uint64_t duration)
Definition: subtitlescreen.cpp:2217
FormattedTextSubtitleSRT::FormattedTextSubtitleSRT
FormattedTextSubtitleSRT(const QString &base, const QRect &safearea, uint64_t start, uint64_t duration, SubtitleScreen *p, const QStringList &subs)
Definition: subtitlescreen.h:112
SubtitleScreen::DisplayRawTextSubtitles
void DisplayRawTextSubtitles(void)
Definition: subtitlescreen.cpp:2191
FormattedTextSubtitle
Definition: subtitlescreen.h:75
FormattedTextSubtitle::CacheNum
virtual int CacheNum(void) const
Definition: subtitlescreen.h:92
SubtitleScreen::EnabledSubtitleType
int EnabledSubtitleType(void) const
Definition: subtitlescreen.h:180
FormattedTextSubtitle::Layout
virtual void Layout(void)
Definition: subtitlescreen.cpp:784
SubtitleScreen::m_textFontZoom
int m_textFontZoom
Definition: subtitlescreen.h:241
SubtitleScreen::m_cc708reader
CC708Reader * m_cc708reader
Definition: subtitlescreen.h:236
SubtitleScreen::m_textFontDelayMs
int m_textFontDelayMs
Definition: subtitlescreen.h:243
SubtitleScreen::Pulse
void Pulse(void) override
Pulse is called 70 times a second to trigger a single frame of an animation.
Definition: subtitlescreen.cpp:1715
SubtitleScreen::m_removeHTML
QRegExp m_removeHTML
Definition: subtitlescreen.h:238
FormattedTextSubtitle::m_base
QString m_base
Definition: subtitlescreen.h:96
FormattedTextSubtitleSRT::Init
void Init(const QStringList &subs)
Definition: subtitlescreen.cpp:973
SubtitleScreen::m_assLibrary
ASS_Library * m_assLibrary
Definition: subtitlescreen.h:267
FormattedTextChunk::Split
bool Split(FormattedTextChunk &newChunk)
Definition: subtitlescreen.cpp:658
SubtitleScreen::RenderAssTrack
void RenderAssTrack(uint64_t timecode)
Definition: subtitlescreen.cpp:2502
FormattedTextLine
Definition: subtitlescreen.h:60
FormattedTextSubtitle::m_start
uint64_t m_start
Definition: subtitlescreen.h:99
SubtitleScreen::GetTeletextBackgroundAlpha
static int GetTeletextBackgroundAlpha(void)
Definition: subtitlescreen.cpp:1691
FormattedTextLine::m_xIndent
int m_xIndent
Definition: subtitlescreen.h:68
SubtitleScreen::InitialiseAssLibrary
bool InitialiseAssLibrary(void)
Definition: subtitlescreen.cpp:2376
SubtitleScreen::SetDelay
void SetDelay(int ms)
Definition: subtitlescreen.cpp:1554
CC708Window
Definition: cc708window.h:188
SubtitleScreen::AddScaledImage
void AddScaledImage(QImage &img, QRect &pos)
Definition: subtitlescreen.cpp:2305
FormattedTextChunk::FormattedTextChunk
FormattedTextChunk(QString t, CC708CharacterAttribute formatting, SubtitleScreen *p)
Definition: subtitlescreen.h:35
FormattedTextSubtitle608::FormattedTextSubtitle608
FormattedTextSubtitle608(const vector< CC608Text * > &buffers, const QString &base="", const QRect &safearea=QRect(), SubtitleScreen *p=nullptr)
Definition: subtitlescreen.h:130
mythuisimpletext.h
FormattedTextSubtitle708::m_num
int m_num
Definition: subtitlescreen.h:167
SubtitleScreen::m_assRenderer
ASS_Renderer * m_assRenderer
Definition: subtitlescreen.h:268
SubtitleScreen::DisplayCC708Subtitles
void DisplayCC708Subtitles(void)
Definition: subtitlescreen.cpp:2256
FormattedTextSubtitleSRT
Definition: subtitlescreen.h:110
FormattedTextSubtitle::m_yAnchor
int m_yAnchor
Definition: subtitlescreen.h:105
SubtitleScreen::Create
bool Create(void) override
Definition: subtitlescreen.cpp:1697
SubtitleScreen::DisplayTextSubtitles
void DisplayTextSubtitles(void)
Definition: subtitlescreen.cpp:2116
CC708CharacterAttribute
Definition: cc708window.h:78
SubtitleReader
Definition: subtitlereader.h:33
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
FormattedTextSubtitle708::m_bgFillAlpha
uint m_bgFillAlpha
Definition: subtitlescreen.h:168
SubtitleScreen::DisplayAVSubtitles
void DisplayAVSubtitles(void)
Definition: subtitlescreen.cpp:1828
SubtitleScreen::m_assTrack
ASS_Track * m_assTrack
Definition: subtitlescreen.h:270
SubtitleScreen::CleanupAssLibrary
void CleanupAssLibrary(void)
Definition: subtitlescreen.cpp:2443
mythplayer.h
FormattedTextSubtitle::m_xAnchor
int m_xAnchor
Definition: subtitlescreen.h:104
SubtitleScreen::m_refreshModified
bool m_refreshModified
Definition: subtitlescreen.h:249
FormattedTextLine::m_origY
int m_origY
Definition: subtitlescreen.h:71
subtitlereader.h
MythPlayer
Definition: mythplayer.h:165
FormattedTextChunk::m_bgShapeRect
QRect m_bgShapeRect
Definition: subtitlescreen.h:53
FormattedTextLine::CalcSize
QSize CalcSize(float layoutSpacing=0.0F) const
Definition: subtitlescreen.cpp:751
FormattedTextSubtitle708
Definition: subtitlescreen.h:144
mythuiimage.h
FormattedTextSubtitle608
Definition: subtitlescreen.h:128
FormattedTextSubtitle::m_safeArea
const QRect m_safeArea
Definition: subtitlescreen.h:98
SubtitleScreen::GetZoom
int GetZoom(void) const
Definition: subtitlescreen.cpp:1549
SubtitleScreen::m_fontStretch
int m_fontStretch
Definition: subtitlescreen.h:251
FormattedTextSubtitle::FormattedTextSubtitle
FormattedTextSubtitle(void)=default
SubtitleScreen::m_family
QString m_family
Definition: subtitlescreen.h:252
SubtitleScreen::m_refreshDeleted
bool m_refreshDeleted
Definition: subtitlescreen.h:250
SubtitleScreen::~SubtitleScreen
~SubtitleScreen() override
Definition: subtitlescreen.cpp:1377
SubtitleScreen
Definition: subtitlescreen.h:173
SubtitleScreen::m_textFontMinDurationMs
int m_textFontMinDurationMs
Definition: subtitlescreen.h:245
SubtitleScreen::DisplayCC608Subtitles
void DisplayCC608Subtitles(void)
Definition: subtitlescreen.cpp:2225
FormattedTextChunk::CalcPadding
void CalcPadding(bool isFirst, bool isLast, int &left, int &right) const
Definition: subtitlescreen.cpp:652
FormattedTextChunk
Definition: subtitlescreen.h:33
FormattedTextChunk::FormattedTextChunk
FormattedTextChunk(void)=default
SubtitleScreen::LoadAssFonts
void LoadAssFonts(void)
Definition: subtitlescreen.cpp:2418
FormattedTextLine::m_origX
int m_origX
Definition: subtitlescreen.h:70
hardwareprofile.config.p
p
Definition: config.py:33
SubtitleScreen::ResetElementState
void ResetElementState(void)
Definition: subtitlescreen.cpp:1787
SubtitleScreen::CalcTextSize
QSize CalcTextSize(const QString &text, const CC708CharacterAttribute &format, float layoutSpacing) const
Definition: subtitlescreen.cpp:1639
hardwareprofile.i18n.t
t
Definition: i18n.py:36
FormattedTextSubtitle708::CacheNum
int CacheNum(void) const override
Definition: subtitlescreen.h:161
SubtitleScreen::GetTeletextFontName
static QString GetTeletextFontName(void)
Definition: subtitlescreen.cpp:1681
SubtitleScreen::Clear708Cache
void Clear708Cache(uint64_t mask)
Definition: subtitlescreen.cpp:1564
SubtitleScreen::EnableSubtitles
void EnableSubtitles(int type, bool forced_only=false)
Definition: subtitlescreen.cpp:1386
FormattedTextSubtitle608::Init
void Init(const vector< CC608Text * > &buffers)
Definition: subtitlescreen.cpp:1224
SubtitleScreen::m_qInited
QList< FormattedTextSubtitle * > m_qInited
Definition: subtitlescreen.h:254
MythFontProperties
Definition: mythfontproperties.h:14
SubtitleScreen::AddAssEvent
void AddAssEvent(char *event)
Definition: subtitlescreen.cpp:2488
FormattedTextSubtitle::m_xAnchorPoint
int m_xAnchorPoint
Definition: subtitlescreen.h:102
SubtitleScreen::m_fontSize
int m_fontSize
Definition: subtitlescreen.h:240
FormattedTextSubtitleSRT::WrapLongLines
void WrapLongLines(void) override
Definition: subtitlescreen.cpp:1078
FormattedTextChunk::m_parent
const SubtitleScreen * m_parent
Definition: subtitlescreen.h:49
SubtitleScreen::CleanupAssTrack
void CleanupAssTrack(void)
Definition: subtitlescreen.cpp:2481
SubtitleScreen::ClearDisplayedSubtitles
void ClearDisplayedSubtitles(void)
Definition: subtitlescreen.cpp:1475
SubtitleScreen::ResizeAssRenderer
void ResizeAssRenderer(void)
Definition: subtitlescreen.cpp:2494
SubtitleScreen::InitializeFonts
void InitializeFonts(bool wasResized)
SubtitleScreen::DisplayDVDButton
void DisplayDVDButton(AVSubtitle *dvdButton, QRect &buttonPos)
Definition: subtitlescreen.cpp:1481
FormattedTextChunk::m_textFont
MythFontProperties * m_textFont
Definition: subtitlescreen.h:54
FormattedTextSubtitle608::Layout
void Layout(void) override
Definition: subtitlescreen.cpp:1177
SubtitleScreen::GetDelay
int GetDelay(void) const
Definition: subtitlescreen.cpp:1559
FormattedTextChunk::m_textRect
QRect m_textRect
Definition: subtitlescreen.h:56
uint
unsigned int uint
Definition: compat.h:140
SubtitleScreen::m_assTrackNum
int m_assTrackNum
Definition: subtitlescreen.h:269
FormattedTextSubtitle::m_duration
uint64_t m_duration
Definition: subtitlescreen.h:100
FormattedTextSubtitle::FormattedTextSubtitle
FormattedTextSubtitle(QString base, const QRect &safearea, uint64_t start, uint64_t duration, SubtitleScreen *p)
Definition: subtitlescreen.h:77
SubtitleScreen::m_textFontZoomPrev
int m_textFontZoomPrev
Definition: subtitlescreen.h:242
SubtitleScreen::DisableForcedSubtitles
void DisableForcedSubtitles(void)
Definition: subtitlescreen.cpp:1444
SubtitleScreen::SetZoom
void SetZoom(int percent)
Definition: subtitlescreen.cpp:1540
SubtitleScreen::SubtitleScreen
SubtitleScreen(MythPlayer *player, const char *name, int fontStretch)
Definition: subtitlescreen.cpp:1367
FormattedTextSubtitle708::Draw
void Draw(void) override
Definition: subtitlescreen.cpp:1312
SubtitleScreen::SetElementDeleted
void SetElementDeleted(void)
Definition: subtitlescreen.cpp:1600
FormattedTextLine::FormattedTextLine
FormattedTextLine(int x=-1, int y=-1, int o_x=-1, int o_y=-1)
Definition: subtitlescreen.h:62
SubtitleScreen::m_textFontDurationExtensionMs
int m_textFontDurationExtensionMs
Definition: subtitlescreen.h:247
FormattedTextChunk::m_textName
QString m_textName
Definition: subtitlescreen.h:55
FormattedTextChunk::m_text
QString m_text
Definition: subtitlescreen.h:47
FormattedTextSubtitle::m_lines
QVector< FormattedTextLine > m_lines
Definition: subtitlescreen.h:97
buffers
Definition: freesurround.cpp:51
SubtitleScreen::m_textFontMinDurationMsPrev
int m_textFontMinDurationMsPrev
Definition: subtitlescreen.h:246
FormattedTextSubtitle708::m_bgFillColor
QColor m_bgFillColor
Definition: subtitlescreen.h:169
FormattedTextChunk::CalcSize
QSize CalcSize(float layoutSpacing=0.0F) const
Definition: subtitlescreen.cpp:647
SubtitleScreen::m_textFontDurationExtensionMsPrev
int m_textFontDurationExtensionMsPrev
Definition: subtitlescreen.h:248
FormattedTextChunk::ToLogString
QString ToLogString(void) const
Definition: subtitlescreen.cpp:678
SubtitleScreen::ClearNonDisplayedSubtitles
void ClearNonDisplayedSubtitles(void)
Definition: subtitlescreen.cpp:1463
SubtitleScreen::InitialiseAssTrack
void InitialiseAssTrack(int tracknum)
Definition: subtitlescreen.cpp:2460
SubtitleScreen::GetSubtitleFormat
class SubtitleFormat * GetSubtitleFormat(void)
Definition: subtitlescreen.h:192
SubtitleScreen::m_textFontDelayMsPrev
int m_textFontDelayMsPrev
Definition: subtitlescreen.h:244
SubtitleScreen::m_format
class SubtitleFormat * m_format
Definition: subtitlescreen.h:255
FormattedTextSubtitle708::Init
void Init(const CC708Window &win, const vector< CC708String * > &list, float aspect)
Definition: subtitlescreen.cpp:1329
SubtitleScreen::m_assFontCount
uint m_assFontCount
Definition: subtitlescreen.h:271
kDisplayNone
@ kDisplayNone
Definition: mythplayer.h:72
SubtitleScreen::SetElementResized
void SetElementResized(void)
Definition: subtitlescreen.cpp:1593
FormattedTextSubtitle::PreRender
virtual void PreRender(void)
Definition: subtitlescreen.cpp:852
FormattedTextChunk::m_bgShapeName
QString m_bgShapeName
Definition: subtitlescreen.h:52
FormattedTextChunk::m_format
CC708CharacterAttribute m_format
Definition: subtitlescreen.h:48
SubtitleScreen::OptimiseDisplayedArea
void OptimiseDisplayedArea(void)
Definition: subtitlescreen.cpp:1793
SubtitleScreen::SetElementAdded
void SetElementAdded(void)
Definition: subtitlescreen.cpp:1586
FormattedTextSubtitle::m_subScreen
SubtitleScreen * m_subScreen
Definition: subtitlescreen.h:101
FormattedTextSubtitle::ToSRT
QStringList ToSRT(void) const
Definition: subtitlescreen.cpp:926
SubtitleScreen::m_subtitleType
int m_subtitleType
Definition: subtitlescreen.h:239
FormattedTextSubtitle::m_yAnchorPoint
int m_yAnchorPoint
Definition: subtitlescreen.h:103
SubtitleScreen::m_safeArea
QRect m_safeArea
Definition: subtitlescreen.h:237
SubtitleScreen::m_cc608reader
CC608Reader * m_cc608reader
Definition: subtitlescreen.h:235
SubtitleScreen::m_subreader
SubtitleReader * m_subreader
Definition: subtitlescreen.h:234
FormattedTextSubtitle708::FormattedTextSubtitle708
FormattedTextSubtitle708(const CC708Window &win, int num, const vector< CC708String * > &list, const QString &base="", const QRect &safearea=QRect(), SubtitleScreen *p=nullptr, float aspect=1.77777F)
Definition: subtitlescreen.h:146
FormattedTextChunk::PreRender
bool PreRender(bool isFirst, bool isLast, int &x, int y, int height)
Definition: subtitlescreen.cpp:702
CC708Reader
Definition: cc708reader.h:17
SubtitleFormat
Definition: subtitlescreen.cpp:131
CC608Reader
Definition: cc608reader.h:78
SubtitleScreen::m_player
MythPlayer * m_player
Definition: subtitlescreen.h:233
SubtitleScreen::CalcPadding
void CalcPadding(const CC708CharacterAttribute &format, bool isFirst, bool isLast, int &left, int &right) const
Definition: subtitlescreen.cpp:1661
SubtitleScreen::SetFontSize
void SetFontSize(int pixelSize)
Definition: subtitlescreen.h:205
SubtitleScreen::GetFont
MythFontProperties * GetFont(const CC708CharacterAttribute &attr) const
Definition: subtitlescreen.cpp:1675
FormattedTextLine::chunks
QList< FormattedTextChunk > chunks
Definition: subtitlescreen.h:67
FormattedTextSubtitle::~FormattedTextSubtitle
virtual ~FormattedTextSubtitle()=default
mythuishape.h
FormattedTextSubtitle::Draw
virtual void Draw(void)
Definition: subtitlescreen.cpp:876
FormattedTextSubtitle::m_bounds
QRect m_bounds
Definition: subtitlescreen.h:106
mythscreentype.h
FormattedTextSubtitle::WrapLongLines
virtual void WrapLongLines(void)
Definition: subtitlescreen.h:87
SubtitleScreen::DisplayScaledAVSubtitles
int DisplayScaledAVSubtitles(const AVSubtitleRect *rect, QRect &bbox, bool top, QRect &display, int forced, const QString &imagename, long long displayuntil, long long late)
Definition: subtitlescreen.cpp:1945
SubtitleScreen::ClearAllSubtitles
void ClearAllSubtitles(void)
Definition: subtitlescreen.cpp:1453
FormattedTextLine::m_yIndent
int m_yIndent
Definition: subtitlescreen.h:69