summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY19
-rw-r--r--Makefile4
-rw-r--r--VDR.patch80
-rw-r--r--siinfo.c2
-rw-r--r--ttxtsubs.c81
-rw-r--r--ttxtsubsdisplay.c41
-rw-r--r--ttxtsubsglobals.h9
-rw-r--r--ttxtsubsi18n.c715
-rw-r--r--ttxtsubsi18n.h17
9 files changed, 903 insertions, 65 deletions
diff --git a/HISTORY b/HISTORY
index 81e373d..bbf7513 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,25 @@
VDR Plugin 'ttxtsubs' Revision History
--------------------------------------
+2004-03-02: Version 0.0.5pre2
+
+- New features
+ - Text colours can be set and row spacing can be adjusted.
+ (The usual semitransparent "background" colour appearently
+ doesn't work with the ElchiAIO patch, don't know why.)
+ Thanks to Rolf Ahrenberg for the patch!
+ - ttxtsubs menus can now be translated to different languages.
+ Thanks to Rolf Ahrenberg for the patch!
+ English, Finnish and Swedish now included, others are welcome!
+- Bugs fixed:
+ - Information for channels with no teletext at all is now cached
+ too, making channel switches to such channels faster.
+
+- Note:
+ - The VDR 1.2.x patch "VDR.patch" is the same as in ttxtsubs 0.0.4b,
+ and the 0.0.4 and 0.0.3d patch should work equally well - there is
+ no need to repatch if you previously used any of those.
+
2004-03-01: Version 0.0.5pre1
- New features:
diff --git a/Makefile b/Makefile
index 3d2da80..e3048f5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile,v 1.19 2004/03/01 04:41:13 ragge Exp ragge $
+# $Id: Makefile,v 1.21 2004/03/02 01:08:45 ragge Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -48,7 +48,7 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
### The object files (add further files here):
OBJS = $(PLUGIN).o ttxtsubsdisplayer.o ttxtsubsdisplay.o teletext.o siinfo.o \
- ttxtsubsfilter.o ttxtsubsrecorder.o ttxtsubsreceiver.o
+ ttxtsubsfilter.o ttxtsubsrecorder.o ttxtsubsreceiver.o ttxtsubsi18n.o
SOURCEFILES = *.c *.h [A-Z]???*
diff --git a/VDR.patch b/VDR.patch
index 7ef6fd9..dfe7a1e 100644
--- a/VDR.patch
+++ b/VDR.patch
@@ -1,7 +1,7 @@
-diff -upr ./DIST/vdr-1.2.5/Makefile ./Makefile
---- ./DIST/vdr-1.2.5/Makefile 2003-08-09 13:09:45.000000000 +0200
-+++ ./Makefile 2003-09-26 01:49:20.000000000 +0200
-@@ -37,7 +37,8 @@ OBJS = audio.o channels.o ci.o config.o
+diff -upr ./DIST/vdr-1.2.1/Makefile ./Makefile
+--- ./DIST/vdr-1.2.1/Makefile 2003-01-06 13:28:09.000000000 +0100
++++ ./Makefile 2003-07-16 05:39:36.000000000 +0200
+@@ -36,7 +36,8 @@ OBJS = audio.o channels.o ci.o config.o
dvbplayer.o dvbspu.o eit.o eitscan.o font.o i18n.o interface.o keys.o\
lirc.o menu.o menuitems.o osdbase.o osd.o player.o plugin.o rcu.o\
receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sources.o\
@@ -11,9 +11,9 @@ diff -upr ./DIST/vdr-1.2.5/Makefile ./Makefile
OSDFONT = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-1
FIXFONT = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-1
-diff -upr ./DIST/vdr-1.2.5/dvbplayer.c ./dvbplayer.c
---- ./DIST/vdr-1.2.5/dvbplayer.c 2003-05-24 11:04:26.000000000 +0200
-+++ ./dvbplayer.c 2003-09-26 01:49:20.000000000 +0200
+diff -upr ./DIST/vdr-1.2.1/dvbplayer.c ./dvbplayer.c
+--- ./DIST/vdr-1.2.1/dvbplayer.c 2003-05-24 11:04:26.000000000 +0200
++++ ./dvbplayer.c 2003-07-16 05:39:36.000000000 +0200
@@ -14,6 +14,7 @@
#include "ringbuffer.h"
#include "thread.h"
@@ -88,31 +88,31 @@ diff -upr ./DIST/vdr-1.2.5/dvbplayer.c ./dvbplayer.c
if (p) {
int w = PlayVideo(p, pc);
if (w > 0) {
-diff -upr ./DIST/vdr-1.2.5/menu.c ./menu.c
---- ./DIST/vdr-1.2.5/menu.c 2003-09-14 12:49:28.000000000 +0200
-+++ ./menu.c 2003-09-26 01:50:59.000000000 +0200
-@@ -3014,8 +3014,18 @@ cRecordControl::cRecordControl(cDevice *
- isyslog("record %s", fileName);
- if (MakeDirs(fileName, true)) {
- const cChannel *ch = timer->Channel();
+diff -upr ./DIST/vdr-1.2.1/menu.c ./menu.c
+--- ./DIST/vdr-1.2.1/menu.c 2003-06-07 14:31:57.000000000 +0200
++++ ./menu.c 2003-07-16 05:39:36.000000000 +0200
+@@ -2969,8 +2969,18 @@ cRecordControl::cRecordControl(cDevice *
+
+ cRecordingUserCommand::InvokeCommand(RUC_BEFORERECORDING, fileName);
+ const cChannel *ch = timer->Channel();
+#ifdef VDRTTXTSUBSHOOKS
-+ cTtxtSubsRecorderBase *subsRecorder = cVDRTtxtsubsHookListener::Hook()
-+ ->NewTtxtSubsRecorder(device, ch);
-+ recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid1(), ch->Apid2(), ch->Dpid1(), ch->Dpid2(), subsRecorder);
++ cTtxtSubsRecorderBase *subsRecorder = cVDRTtxtsubsHookListener::Hook()
++ ->NewTtxtSubsRecorder(device, ch);
++ recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid1(), ch->Apid2(), ch->Dpid1(), ch->Dpid2(), subsRecorder);
+#else
- recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid1(), ch->Apid2(), ch->Dpid1(), ch->Dpid2());
+ recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid1(), ch->Apid2(), ch->Dpid1(), ch->Dpid2());
+#endif
- if (device->AttachReceiver(recorder)) {
+ if (device->AttachReceiver(recorder)) {
+#ifdef VDRTTXTSUBSHOOKS
-+ if(subsRecorder)
-+ subsRecorder->DeviceAttach();
++ if(subsRecorder)
++ subsRecorder->DeviceAttach();
+#endif
- Recording.WriteSummary();
- cStatus::MsgRecording(device, Recording.Name());
- if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
-diff -upr ./DIST/vdr-1.2.5/menu.h ./menu.h
---- ./DIST/vdr-1.2.5/menu.h 2003-08-03 11:37:18.000000000 +0200
-+++ ./menu.h 2003-09-26 01:49:20.000000000 +0200
+ Recording.WriteSummary();
+ cStatus::MsgRecording(device, Recording.Name());
+ if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
+diff -upr ./DIST/vdr-1.2.1/menu.h ./menu.h
+--- ./DIST/vdr-1.2.1/menu.h 2003-05-24 18:35:52.000000000 +0200
++++ ./menu.h 2003-07-16 05:39:36.000000000 +0200
@@ -14,6 +14,7 @@
#include "device.h"
#include "osd.h"
@@ -121,9 +121,9 @@ diff -upr ./DIST/vdr-1.2.5/menu.h ./menu.h
#include "recorder.h"
#include "recording.h"
-diff -upr ./DIST/vdr-1.2.5/osd.c ./osd.c
---- ./DIST/vdr-1.2.5/osd.c 2003-06-04 18:13:00.000000000 +0200
-+++ ./osd.c 2003-09-26 01:49:20.000000000 +0200
+diff -upr ./DIST/vdr-1.2.1/osd.c ./osd.c
+--- ./DIST/vdr-1.2.1/osd.c 2003-06-04 18:13:00.000000000 +0200
++++ ./osd.c 2003-07-16 05:43:06.000000000 +0200
@@ -12,6 +12,7 @@
#include "device.h"
#include "i18n.h"
@@ -153,9 +153,9 @@ diff -upr ./DIST/vdr-1.2.5/osd.c ./osd.c
}
void cOsd::Clear(void)
-diff -upr ./DIST/vdr-1.2.5/recorder.c ./recorder.c
---- ./DIST/vdr-1.2.5/recorder.c 2003-08-02 15:01:19.000000000 +0200
-+++ ./recorder.c 2003-09-26 01:52:35.000000000 +0200
+diff -upr ./DIST/vdr-1.2.1/recorder.c ./recorder.c
+--- ./DIST/vdr-1.2.1/recorder.c 2003-05-16 15:33:04.000000000 +0200
++++ ./recorder.c 2003-07-16 05:39:36.000000000 +0200
@@ -10,6 +10,8 @@
#include <stdarg.h>
#include <stdio.h>
@@ -184,10 +184,10 @@ diff -upr ./DIST/vdr-1.2.5/recorder.c ./recorder.c
+#ifdef VDRTTXTSUBSHOOKS
+ ttxtSubsRecorder = tsr;
+#endif
+ isyslog("record %s", FileName);
- // Make sure the disk is up and running:
-
-@@ -55,6 +64,10 @@ cRecorder::cRecorder(const char *FileNam
+ // Create directories if necessary:
+@@ -61,6 +70,10 @@ cRecorder::cRecorder(const char *FileNam
cRecorder::~cRecorder()
{
Detach();
@@ -198,7 +198,7 @@ diff -upr ./DIST/vdr-1.2.5/recorder.c ./recorder.c
delete index;
delete fileName;
delete remux;
-@@ -129,6 +142,19 @@ void cRecorder::Action(void)
+@@ -135,6 +148,19 @@ void cRecorder::Action(void)
break;
}
fileSize += Result;
@@ -218,9 +218,9 @@ diff -upr ./DIST/vdr-1.2.5/recorder.c ./recorder.c
}
else
break;
-diff -upr ./DIST/vdr-1.2.5/recorder.h ./recorder.h
---- ./DIST/vdr-1.2.5/recorder.h 2002-06-08 11:35:03.000000000 +0200
-+++ ./recorder.h 2003-09-26 01:49:20.000000000 +0200
+diff -upr ./DIST/vdr-1.2.1/recorder.h ./recorder.h
+--- ./DIST/vdr-1.2.1/recorder.h 2002-06-08 11:35:03.000000000 +0200
++++ ./recorder.h 2003-07-16 05:39:36.000000000 +0200
@@ -15,6 +15,7 @@
#include "remux.h"
#include "ringbuffer.h"
diff --git a/siinfo.c b/siinfo.c
index 5ef3eb0..717580c 100644
--- a/siinfo.c
+++ b/siinfo.c
@@ -553,7 +553,7 @@ int GetTtxtInfo(int card_no, int channel, uint16_t sid, uint16_t vpid, struct tt
FreeSects(patsects);
}
- if(foundinfo) {
+ if(foundinfo || (ret == 0 && retry == 2)) {
struct ttxtinfo info2;
DupTtxtInfo(info, &info2);
gCache[channel] = info2;
diff --git a/ttxtsubs.c b/ttxtsubs.c
index 02f09a9..8e9b0c7 100644
--- a/ttxtsubs.c
+++ b/ttxtsubs.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: ttxtsubs.c,v 1.22 2004/03/01 04:36:32 ragge Exp $
+ * $Id: ttxtsubs.c,v 1.23 2004/03/02 01:08:45 ragge Exp $
*/
#include <vdr/plugin.h>
@@ -15,11 +15,12 @@
#include "ttxtsubsglobals.h"
#include "ttxtsubsdisplayer.h"
#include "ttxtsubsrecorder.h"
+#include "ttxtsubsi18n.h"
#include "utils.h"
#include "siinfo.h"
#include "ttxtsubs.h"
-static const char *VERSION = "0.0.5pre1";
+static const char *VERSION = "0.0.5pre2";
static const char *DESCRIPTION = "Teletext subtitles";
cTtxtsubsConf globals;
@@ -38,7 +39,7 @@ char *gLanguages[][2] = {
"por","", //Portuguese
"fre","fra", //French
"nor","", //Norwegian
- "fin","", //Finnish
+ "fin","suo", //Finnish
"pol","", //Polish
"spa","esl", //Spanish
"gre","ell", //Greek
@@ -46,6 +47,9 @@ char *gLanguages[][2] = {
"ron","rum", //Romanian
"hun","", //Hungarian
"cat","", //Catalanian
+#if VDRVERSNUM >= 10300
+ "rus","", //Russian
+#endif
// Not in translations!
"dan","" //Danish
};
@@ -67,6 +71,10 @@ const char *gLanguageNames[] = {
"Romaneste",
"Magyar",
"Catalā",
+#if VDRVERSNUM >= 10300
+ "ĀãááÚØŲ",
+#endif
+ // Not in translations!
"Dansk"
};
int gNumLanguages = sizeof(gLanguages) / sizeof(gLanguages[0]);
@@ -78,7 +86,7 @@ public:
// -- cPlugin
virtual const char *Version(void) { return VERSION; }
- virtual const char *Description(void) { return DESCRIPTION; }
+ virtual const char *Description(void) { return tr(DESCRIPTION); }
virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]);
virtual bool Start(void);
@@ -181,6 +189,8 @@ bool cPluginTtxtsubs::Start(void)
{
// Start any background activities the plugin shall perform.
+ RegisterI18n(Phrases);
+
if(!memcmp(globals.mLanguages[0][0], "unk", 3)) {
// no language found in setup
if(strlen(mOldLanguage)) {
@@ -283,6 +293,9 @@ bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value)
else if(!strcasecmp(Name, "BottomLB")) globals.mBottomLB = atoi(Value);
else if(!strcasecmp(Name, "BottomAdj")) globals.mBottomAdj = atoi(Value);
else if(!strcasecmp(Name, "FrenchSpecial")) globals.mFrenchSpecial = atoi(Value);
+ else if(!strcasecmp(Name, "LineSpacing")) globals.mLineSpacing = atoi(Value);
+ else if(!strcasecmp(Name, "FgColor")) globals.mFgColor = atoi(Value);
+ else if(!strcasecmp(Name, "BgColor")) globals.mBgColor = atoi(Value);
else if(!strcasecmp(Name, "Languages")) parseLanguages(Value);
else if(!strcasecmp(Name, "HearingImpaireds")) parseHIs(Value);
// Handle old settings
@@ -470,6 +483,10 @@ void cMenuSetupTtxtsubsLanguages::Store(void)
fprintf(stderr, "cMenuSetupTtxtsubsLanguages::Store\n");
}
+const char * mainMenuAlts[4] = {NULL, NULL, NULL, NULL};
+const char * textPosAlts[4];
+const char * textColors[12];
+
cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
:
mTtxtsubs(ttxtsubs),
@@ -478,10 +495,33 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
{
//static char *mainMenuAlts[] = {"off", "Display on/off", "4:3/Letterbox", "This menu"};
// can't get it to store changes in file
- static char *mainMenuAlts[] = {"off", "Display on/off", "4:3/Letterbox"};
- static int numMainMenuAlts = sizeof(mainMenuAlts) / sizeof(mainMenuAlts[0]);
- static char *textPosAlts[] = {"Left", "Center", "Right"};
- static int numTextPosAlts = sizeof(textPosAlts) / sizeof(textPosAlts[0]);
+ if(mainMenuAlts[0] == NULL) {
+ mainMenuAlts[0] = tr("off");
+ mainMenuAlts[1] = tr("Display on/off");
+ mainMenuAlts[2] = tr("4:3/Letterbox");
+ mainMenuAlts[3] = NULL;
+
+ textPosAlts[0] = tr("Left");
+ textPosAlts[1] = tr("Center");
+ textPosAlts[2] = tr("Right");
+ textPosAlts[3] = NULL;
+
+ textColors[0] = tr("Black");
+ textColors[1] = tr("White");
+ textColors[2] = tr("Red");
+ textColors[3] = tr("Green");
+ textColors[4] = tr("Yellow");
+ textColors[5] = tr("Magenta");
+ textColors[6] = tr("Blue");
+ textColors[7] = tr("Cyan");
+ textColors[8] = tr("Grey");
+ textColors[9] = tr("Transparent");
+ textColors[10] = tr("Background");
+ textColors[11] = NULL;
+ }
+ const int numTextPosAlts = sizeof(textPosAlts) / sizeof(textPosAlts[0]) - 1;
+ const int numMainMenuAlts = sizeof(mainMenuAlts) / sizeof(mainMenuAlts[0]) - 1;
+ const int numTextColors = sizeof(textColors) / sizeof(textColors[0]) - 1;
mSavedFrenchSpecial = mConf.mFrenchSpecial;
@@ -512,6 +552,16 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
&mConf.mBottomLB, tr("4:3/Anamorph"), tr("Letterbox")));
Add(new cMenuEditIntItem(tr("Text Vertical Adjust"),
&mConf.mBottomAdj, -100, 45));
+ Add(new cMenuEditIntItem( tr("Line Spacing Adjust"),
+ &mConf.mLineSpacing, -25, 25));
+ if(mConf.mFgColor < 0 || mConf.mFgColor >= numTextColors)
+ mConf.mFgColor = 1; // menu item segfaults if out of range
+ Add(new cMenuEditStraItem(tr("Text Color"), &mConf.mFgColor,
+ numTextColors, textColors));
+ if(mConf.mBgColor < 0 || mConf.mBgColor >= numTextColors)
+ mConf.mBgColor = 0; // menu item segfaults if out of range
+ Add(new cMenuEditStraItem(tr("Background Color"), &mConf.mBgColor,
+ numTextColors, textColors));
Add(new cMenuEditBoolItem(tr("Workaround for some French chns"),
&mConf.mFrenchSpecial, tr("no"), tr("yes")));
@@ -523,16 +573,16 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
item->SetColor(clrCyan);
Add(item);
- sprintf(str, "Language %d", n + 1);
+ sprintf(str, "%s %d", tr("Language"), n + 1);
if(mLanguageNo[n] >= 0) {
- Add(new cMenuEditStraItem(tr(str), &mLanguageNo[n], gNumLanguages, gLanguageNames));
+ Add(new cMenuEditStraItem(str, &mLanguageNo[n], gNumLanguages, gLanguageNames));
} else {
- Add(new cMenuEditStrItem(tr(str), mConf.mLanguages[n][0], 4, allowedc));
- Add(new cMenuEditStrItem(tr(str), mConf.mLanguages[n][1], 4, allowedc));
+ Add(new cMenuEditStrItem(str, mConf.mLanguages[n][0], 4, allowedc));
+ Add(new cMenuEditStrItem(str, mConf.mLanguages[n][1], 4, allowedc));
}
- sprintf(str, "Language %d Hearing Impaired", n + 1);
- Add(new cMenuEditBoolItem(tr(str), &(mConf.mHearingImpaireds[n][0]),
+ sprintf(str, "%s %d %s", tr("Language"), n + 1, tr("Hearing Impaired"));
+ Add(new cMenuEditBoolItem(str, &(mConf.mHearingImpaireds[n][0]),
tr("no"), tr("yes")));
}
@@ -572,6 +622,9 @@ void cMenuSetupTtxtsubs::Store(void)
SetupStore("BottomAdj", mConf.mBottomAdj);
SetupStore("FrenchSpecial", mConf.mFrenchSpecial);
SetupStore("MainMenuEntry", mConf.mMainMenuEntry);
+ SetupStore("LineSpacing", mConf.mLineSpacing);
+ SetupStore("FgColor", mConf.mFgColor);
+ SetupStore("BgColor", mConf.mBgColor);
char lstr[MAXLANGUAGES*2*4 + 1];
char histr[MAXLANGUAGES*2 + 1];
diff --git a/ttxtsubsdisplay.c b/ttxtsubsdisplay.c
index cfb7e88..5bc302b 100644
--- a/ttxtsubsdisplay.c
+++ b/ttxtsubsdisplay.c
@@ -22,6 +22,11 @@ enum {
finished
};
+// extra colours
+enum eMyDvbColor {
+ myClrGrey = 0xFF808080
+};
+
// --------------------
@@ -336,6 +341,26 @@ enum {
TEXTX = 15
};
+static eDvbColor
+getcolor(int color)
+{
+ switch (color)
+ {
+ case 0: return clrBlack;
+ case 1: return clrWhite;
+ case 2: return clrRed;
+ case 3: return clrGreen;
+ case 4: return clrYellow;
+ case 5: return clrMagenta;
+ case 6: return clrBlue;
+ case 7: return clrCyan;
+ case 8: return (eDvbColor) myClrGrey;
+ case 9: return clrTransparent;
+ default: return clrBackground;
+ }
+ return clrBackground;
+}
+
void cTtxtSubsDisplay::ShowOSD(void)
{
int i, y;
@@ -388,7 +413,7 @@ void cTtxtSubsDisplay::ShowOSD(void)
strcpy(buf[3], "1234567890123456789012345678901234567890");
#endif
- y = bottom - SCREENTOP - ROWH - (ROWINCR * (rowcount-1));
+ y = bottom - SCREENTOP - ROWH - ((ROWINCR + globals.lineSpacing()) * (rowcount-1));
for(i = 0; i < rowcount; i++) {
tWindowHandle wind;
int w = 0;
@@ -399,8 +424,8 @@ void cTtxtSubsDisplay::ShowOSD(void)
//wind = mOsd->Create(0, y, 4, ROWH, 2);
//mOsd->Fill(0, y, 4, y + ROWH, clrWhite, wind);
//mOsd->Fill(0, y, 4, y + ROWH, clrBackground, wind);
- wind = mOsd->Create(0, 575, 4, 1, 2);
- mOsd->Fill(0, 574, 4, 575, clrWhite, wind);
+ wind = mOsd->Create(0, 575, 4, 1, 2, false);
+ mOsd->Fill(0, 574, 4, 575, getcolor(globals.fgColor()), wind);
mOsd->Fill(0, 574, 4, 575, clrTransparent, wind);
doneWidthWorkaround = 1;
}
@@ -418,12 +443,12 @@ void cTtxtSubsDisplay::ShowOSD(void)
break;
}
- wind = mOsd->Create(left, y, w, ROWH, 2);
- mOsd->Fill(left, y, left + w, y + ROWH, clrWhite, wind); // needed for dxr3s...
- mOsd->Fill(left, y, left + w, y + ROWH, clrBackground, wind);
- mOsd->Text(left + TEXTX, y + TEXTY, buf[i], clrWhite, clrBackground, wind);
+ wind = mOsd->Create(left, y, w, ROWH, 2, false);
+ mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.fgColor()), wind); // needed for dxr3s...
+ mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.bgColor()), wind);
+ mOsd->Text(left + TEXTX, y + TEXTY, buf[i], getcolor(globals.fgColor()), getcolor(globals.bgColor()), wind);
- y += ROWINCR;
+ y += (ROWINCR + globals.lineSpacing());
}
mOsd->Flush();
diff --git a/ttxtsubsglobals.h b/ttxtsubsglobals.h
index 09bae9d..cee1bd7 100644
--- a/ttxtsubsglobals.h
+++ b/ttxtsubsglobals.h
@@ -18,6 +18,9 @@ class cTtxtsubsConf {
mBottomLB = 0;
mBottomAdj = 0;
mFrenchSpecial = 0;
+ mLineSpacing = 0;
+ mFgColor = 1;
+ mBgColor = 10;
memset(mLanguages, 0, sizeof(mLanguages));
memset(mHearingImpaireds, 0, sizeof(mHearingImpaireds));
}
@@ -30,6 +33,9 @@ class cTtxtsubsConf {
int bottomLB(void) {return mBottomLB;}
int bottomAdj(void) {return mBottomAdj;}
int frenchSpecial(void) {return mFrenchSpecial;}
+ int lineSpacing(void) {return mLineSpacing;}
+ int fgColor(void) {return mFgColor;}
+ int bgColor(void) {return mBgColor;}
char (*languages(void))[MAXLANGUAGES][2][4] {return &mLanguages;}
int (*hearingImpaireds(void))[MAXLANGUAGES][2] {return &mHearingImpaireds;}
@@ -43,6 +49,9 @@ class cTtxtsubsConf {
int mBottomLB;
int mBottomAdj;
int mFrenchSpecial;
+ int mLineSpacing;
+ int mFgColor;
+ int mBgColor;
char mLanguages[MAXLANGUAGES][2][4];
int mHearingImpaireds[MAXLANGUAGES][2];
};
diff --git a/ttxtsubsi18n.c b/ttxtsubsi18n.c
new file mode 100644
index 0000000..6507a5b
--- /dev/null
+++ b/ttxtsubsi18n.c
@@ -0,0 +1,715 @@
+/*
+ * ttxtsubsi18n.c: A plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: ttxtsubsi18n.c,v 1.1 2004/03/02 01:08:45 ragge Exp $
+ */
+
+#include "ttxtsubsi18n.h"
+#include <stdio.h>
+
+const tI18nPhrase Phrases[] =
+{
+ { "Teletext subtitles", // English
+ "", // Deutsch
+ "", // Slovenian
+ "", // Italian
+ "", // Dutch
+ "", // Portuguese
+ "", // French
+ "", // Norwegian
+ "Tekstitys (Teksti-TV)", // Finnish
+ "", // Polish
+ "", // Spanish
+ "", // Greek
+ "Textning (Text-TV)", // Swedish
+ "", // Romanian
+ "", // Hungarian
+ "", // Catalanian
+#if VDRVERSNUM >= 10300
+ "", // Russian
+#endif
+ },
+ { "Hide teletext subtitles",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Piilota tekstitys (Teksti-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Göm textning (Text-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Display teletext subtitles",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Näytä tekstitys (Teksti-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Visa textning (Text-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Position Teletext Subtitles for 4:3/Anamorph",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "4:3/Anamorfinen tekstitys (Teksti-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Textning för 4:3/anamorf (Text-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Position Teletext Subtitles for Letterbox",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Letterbox tekstitys (Teksti-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Textning för brevlådeformat (Text-TV)",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Display Subtitles",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Näytä tekstitykset",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Visa textning",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Record Subtitles",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Tallenna tekstitykset",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Spela in textning",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Main Menu Alternative",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Päävalikon toiminnot",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Huvudmenyalternativ",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Display on/off",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "aktivointi",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Visa textning på/av",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "4:3/Letterbox",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "kuvasuhde",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "4:3/brevlådeformat",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Text Horizontal Position",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Vaakatasaus",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Horisontell position",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Left",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "vasen",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "vänster",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Center",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "keskitä",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "centrerad",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Right",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "oikea",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "höger",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Text Vertical Position",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Pystytasaus",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Vertikal positon",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "4:3/Anamorph",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "4:3/anamorfinen",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "4:3/anamorf",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Letterbox",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "letterbox",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "brevlådeformat",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Text Vertical Adjust",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Pystytasauksen hienosäätö",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Vertikal justering",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Line Spacing Adjust",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Rivivälin hienosäätö",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Radavstånd",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Workaround for some French chns",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Ranskalainen silmänkääntötemppu",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Fix för vissa franska kanaler",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Language",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Tekstityskieli",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Språk",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Hearing Impaired",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "kuulorajoitteisille",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Nedsatt hörsel",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Text Color",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Kirjasimen väri",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Färg på text",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Background Color",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Taustaväri",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "Färg på bakgrund",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Black",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "musta",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "svart",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "White",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "valkoinen",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "vit",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Red",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "punainen",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "röd",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Green",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "vihreä",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "grön",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Yellow",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "keltainen",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "gul",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Magenta",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "magenta",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "magenta",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Blue",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "sininen",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "blå",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Cyan",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "syaani",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "cyan",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Grey",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "harmaa",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "grå",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Transparent",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "läpinäkyvä",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "transparent",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { "Background",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "tausta",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "bakgrund",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+#if VDRVERSNUM >= 10300
+ "", // TODO
+#endif
+ },
+ { NULL }
+};
diff --git a/ttxtsubsi18n.h b/ttxtsubsi18n.h
new file mode 100644
index 0000000..bc3f02b
--- /dev/null
+++ b/ttxtsubsi18n.h
@@ -0,0 +1,17 @@
+/*
+ * ttxtsubsi18n.h: A plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: ttxtsubsi18n.h,v 1.1 2004/03/02 01:08:45 ragge Exp $
+ */
+
+#ifndef __TTXTSUBS_I18N_H
+#define __TTXTSUBS_I18N_H
+
+#include <vdr/i18n.h>
+
+
+extern const tI18nPhrase Phrases[];
+
+#endif //__TTXTSUBS_I18N_H