Skip to content

Commit

Permalink
Subtitles: backport some code to enable cc608 TT deprecation log mess…
Browse files Browse the repository at this point in the history
…age.
  • Loading branch information
stichnot committed Jul 24, 2012
1 parent 39fad46 commit 3256849
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion mythtv/libs/libmythtv/subtitlescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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() + ' ';
Expand Down
7 changes: 4 additions & 3 deletions mythtv/libs/libmythtv/subtitlescreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -130,6 +130,7 @@ class FormattedTextChunk
QString text;
CC708CharacterAttribute format;
SubtitleScreen *parent; // where fonts and sizes are kept
bool isTeletext;
};

class FormattedTextLine
Expand Down

0 comments on commit 3256849

Please sign in to comment.