Project

General

Profile

Bug #865 ยป ttxtsubs-French-fix.patch

JTe, 04/02/2012 10:49 AM

View differences:

new//ttxtsubsdisplay.c 2012-04-02 11:37:49.000000000 +0300
{
int lineWidth = _osdFont->Width(_subTitleTextLines[textLineIndex].text) + 2 * globals.mOutlineWidth + 5;
int lineHeight = (textHeight / _numberOfSubTitleTextLines);
int x = (width - lineWidth) / 2;
int x = 4; // start subtitles from the left edge for readability
int y = lineHeight * textLineIndex + globals.mOutlineWidth + 5;
tColor foregroundColor = SubtitleColorMap[_subTitleTextLines[textLineIndex].color][0];
tColor outlineColor = SubtitleColorMap[_subTitleTextLines[textLineIndex].color][1];
new//ttxtsubsdisplayer.c 2012-04-02 11:35:59.000000000 +0300
mDisp(new cTtxtSubsDisplay()),
mGetMutex(),
mGetCond(),
mRingBuf(94000, true),
mRingBuf(188000, true),
mRun(0)
{
mDisp->SetPage(textpage);
......
if (ch >= 0 && ch < mLangChoise) {
mLangChoise = ch;
int bcdPage = (teletextSubtitlePages[p].ttxtMagazine << 8) + teletextSubtitlePages[p].ttxtPage;
// Some French channels still send wrong subtitle page number!
// This is a hard fix to change the page numbers 05x to 08x
// According to ETSI tables pages 850-859 are not used for
// teletext subtitles in any country, so we can make a hard fix for this!
if(bcdPage >= 0x50 && bcdPage <= 0x59)
bcdPage += 0x30;
mDisp->SetPage(bcdPage);
mFoundLangPage = 1;
isyslog("Found subtitle TT page: %03x\n", bcdPage);
if(bcdPage < 0x100) // Shown on log according to ETSI standard
bcdPage += 0x800;
isyslog("Found subtitle page: %03x\n", bcdPage);
}
}
}
    (1-1/1)