Permalink
Browse files

Subtitles: backport some code to enable cc608 TT deprecation log mess…

…age.
  • Loading branch information...
1 parent 39fad46 commit 3256849b14cc882536a153e7fbe4724adf03260c @stichnot stichnot committed Jul 24, 2012
Showing with 7 additions and 4 deletions.
  1. +3 −1 mythtv/libs/libmythtv/subtitlescreen.cpp
  2. +4 −3 mythtv/libs/libmythtv/subtitlescreen.h
@@ -922,7 +922,8 @@ void FormattedTextSubtitle::InitFromCC608(vector<CC608Text*> &buffers,
CC708CharacterAttribute attr(isItalic, isBold, isUnderline,
clr[min(max(0, color), 7)],
useBackground);
- FormattedTextChunk chunk(captionText, attr, parent);
+ FormattedTextChunk chunk(captionText, attr, parent,
+ cc->teletextmode);
line.chunks += chunk;
LOG(VB_VBI, LOG_INFO,
QString("Adding cc608 chunk (%1,%2): %3")
@@ -1089,6 +1090,7 @@ bool FormattedTextChunk::Split(FormattedTextChunk &newChunk)
QString("Failed to split chunk '%1'").arg(text));
return false;
}
+ newChunk.isTeletext = isTeletext;
newChunk.parent = parent;
newChunk.format = format;
newChunk.text = text.mid(lastSpace + 1).trimmed() + ' ';
@@ -110,11 +110,11 @@ class FormattedTextChunk
{
public:
FormattedTextChunk(const QString &t, CC708CharacterAttribute formatting,
- SubtitleScreen *p)
- : text(t), format(formatting), parent(p)
+ SubtitleScreen *p, bool teletext = false)
+ : text(t), format(formatting), parent(p), isTeletext(teletext)
{
}
- FormattedTextChunk(void) : parent(NULL) {}
+ FormattedTextChunk(void) : parent(NULL), isTeletext(false) {}
QSize CalcSize(float layoutSpacing = 0.0f) const
{
@@ -130,6 +130,7 @@ class FormattedTextChunk
QString text;
CC708CharacterAttribute format;
SubtitleScreen *parent; // where fonts and sizes are kept
+ bool isTeletext;
};
class FormattedTextLine

0 comments on commit 3256849

Please sign in to comment.