summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grimm <tobias@e-tobi.loc>2009-04-23 09:46:40 +0200
committerTobias Grimm <tobias@e-tobi.loc>2009-04-25 22:37:41 +0200
commit35822157fc24f1964fa16adfc221b32700897687 (patch)
treeccd6259e7942e408870a69308bcea2853d40aa7e
parent104dd4cec36bdd736526e35b3457dd3160fedd13 (diff)
downloadvdr-plugin-ttxtsubs-35822157fc24f1964fa16adfc221b32700897687.tar.gz
vdr-plugin-ttxtsubs-35822157fc24f1964fa16adfc221b32700897687.tar.bz2
Added a separate replay delay setting for TS recordings
Patch provided by Rolf Ahrenberg Note: It seems that the plugin doesn't use PTS values for synchronizing the subtitles and the delay settings could be totally removed if this feature would be added.
-rw-r--r--TODO4
-rw-r--r--po/ca_ES.po9
-rw-r--r--po/de_DE.po9
-rw-r--r--po/es_ES.po9
-rw-r--r--po/fi_FI.po9
-rw-r--r--po/fr_FR.po10
-rw-r--r--po/it_IT.po10
-rw-r--r--po/ru_RU.po10
-rw-r--r--po/sv_SE.po7
-rw-r--r--ttxtsubs.c11
-rw-r--r--ttxtsubsdisplayer.c4
-rw-r--r--ttxtsubsdisplayer.h2
-rw-r--r--ttxtsubsglobals.h3
-rw-r--r--vdrttxtsubshooks.c4
-rw-r--r--vdrttxtsubshooks.h2
15 files changed, 67 insertions, 36 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..922a3d3
--- /dev/null
+++ b/TODO
@@ -0,0 +1,4 @@
+* Take care of the PTS values for synchronizing the subtitles and drop the
+ delay settings (COMMIT 82053ddc483b096bad7acf760e4219349a0d2206 can then be
+ reverted as well as COMMIT 0ac25c2487e123626a344cae57a2013c3c4a450b of the
+ ttxtsubs VDR patch)
diff --git a/po/ca_ES.po b/po/ca_ES.po
index ca0a1e1..4c1e3dc 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Jordi Vilà <jvila@tinet.org>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -107,8 +107,11 @@ msgstr "Grava subtítols"
msgid "Live Delay"
msgstr "Retard en directe"
-msgid "Replay Delay"
-msgstr "Retard en reproducció"
+msgid "Replay Delay (PES)"
+msgstr "Retard en reproducció (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "Retard en reproducció (TS)"
msgid "Main Menu Alternative"
msgstr "Alternativa del menú principal"
diff --git a/po/de_DE.po b/po/de_DE.po
index 9ce1ff1..fcc4c27 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -105,8 +105,11 @@ msgstr "Nimm Untertitel auf"
msgid "Live Delay"
msgstr "Live Verzögerung"
-msgid "Replay Delay"
-msgstr "Wiedergabe Verzögerung"
+msgid "Replay Delay (PES)"
+msgstr "Wiedergabe Verzögerung (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "Wiedergabe Verzögerung (TS)"
msgid "Main Menu Alternative"
msgstr "Hauptmenu Alternative"
diff --git a/po/es_ES.po b/po/es_ES.po
index dc2e47f..ddf236a 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Ruben Nunez Francisco <ruben.nunez@tang-it.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -105,8 +105,11 @@ msgstr "Graba subtítulos"
msgid "Live Delay"
msgstr "Retardo en directo"
-msgid "Replay Delay"
-msgstr "Retardo en reproducción"
+msgid "Replay Delay (PES)"
+msgstr "Retardo en reproducción (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "Retardo en reproducción (TS)"
msgid "Main Menu Alternative"
msgstr "Alternativa del menú principal"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 0935d65..9b56cd3 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -108,8 +108,11 @@ msgstr "Tallenna tekstitykset"
msgid "Live Delay"
msgstr "Viive Live-lähetyksessä"
-msgid "Replay Delay"
-msgstr "Viive toistossa"
+msgid "Replay Delay (PES)"
+msgstr "Viive toistossa (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "Viive toistossa (TS)"
msgid "Main Menu Alternative"
msgstr "Päävalikon toiminnot"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 0834b44..757a831 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2009-01-04 19:05+0100\n"
"Last-Translator: Nival Michaël\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -108,8 +108,11 @@ msgstr "Enregistrer le sous-titrage"
msgid "Live Delay"
msgstr "Délai en directe"
-msgid "Replay Delay"
-msgstr "Delai à la lecture"
+msgid "Replay Delay (PES)"
+msgstr "Delai à la lecture (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "Delai à la lecture (TS)"
msgid "Main Menu Alternative"
msgstr "Choix du menu principal"
@@ -185,4 +188,3 @@ msgstr "Mode de sous-titres TXT"
msgid "Manual Subtitle Page"
msgstr "Page des sous-titres"
-
diff --git a/po/it_IT.po b/po/it_IT.po
index 8f4561e..040ed34 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2008-12-20 19:51+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -109,8 +109,11 @@ msgstr "Registra sottotitoli"
msgid "Live Delay"
msgstr "Ritardo mod. dal vivo"
-msgid "Replay Delay"
-msgstr "Ritardo mod. riproduzione"
+msgid "Replay Delay (PES)"
+msgstr "Ritardo mod. riproduzione (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "Ritardo mod. riproduzione (TS)"
msgid "Main Menu Alternative"
msgstr "Voci alternative menu princ."
@@ -186,4 +189,3 @@ msgstr "Mod. sottotitoli"
msgid "Manual Subtitle Page"
msgstr "Pagina manuale sottotitoli"
-
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 76c0248..16a000d 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2008-12-30 14:05+0100\n"
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -105,8 +105,11 @@ msgstr "·ÐߨáëÒÐâì áãÑâØâàë"
msgid "Live Delay"
msgstr "Live ×ÐÔÕàÖÚÐ"
-msgid "Replay Delay"
-msgstr "·ÐÔÕàÖÚÐ ÒÞáßàÞØ×ÒÕÔÕÝØï"
+msgid "Replay Delay (PES)"
+msgstr "·ÐÔÕàÖÚÐ ÒÞáßàÞØ×ÒÕÔÕÝØï (PES)"
+
+msgid "Replay Delay (TS)"
+msgstr "·ÐÔÕàÖÚÐ ÒÞáßàÞØ×ÒÕÔÕÝØï (TS)"
msgid "Main Menu Alternative"
msgstr "ºÞÜÐÝÔÐ Ò ÓÛÐÒÝÞÜ ÜÕÝî"
@@ -182,4 +185,3 @@ msgstr "ÀÕÖØÜ áãÑâØâàÞÒ"
msgid "Manual Subtitle Page"
msgstr "ÀãçÝÞÙ ÒëÑÞà áâàÐÝØæë"
-
diff --git a/po/sv_SE.po b/po/sv_SE.po
index 8b718a1..676552f 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2008-12-13 23:18+0100\n"
+"POT-Creation-Date: 2009-04-21 23:45+0300\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Tomas Prybil <tomas@prybil.se>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -106,7 +106,10 @@ msgstr "Spela in textning"
msgid "Live Delay"
msgstr ""
-msgid "Replay Delay"
+msgid "Replay Delay (PES)"
+msgstr ""
+
+msgid "Replay Delay (TS)"
msgstr ""
msgid "Main Menu Alternative"
diff --git a/ttxtsubs.c b/ttxtsubs.c
index 4e276b5..4f0cef4 100644
--- a/ttxtsubs.c
+++ b/ttxtsubs.c
@@ -146,7 +146,7 @@ public:
// -- cVDRTtxtsubsHookListener
virtual void HideOSD(void) { HideTtxt(); }
virtual void ShowOSD(void) { ShowTtxt(); }
- virtual void PlayerTeletextData(uint8_t *p, int length);
+ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording);
virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch);
// -- cThread
@@ -336,6 +336,7 @@ bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value)
else if(!strcasecmp(Name, "Record")) globals.mDoRecord = atoi(Value);
else if(!strcasecmp(Name, "LiveDelay")) globals.mLiveDelay = atoi(Value);
else if(!strcasecmp(Name, "ReplayDelay")) globals.mReplayDelay = atoi(Value);
+ else if(!strcasecmp(Name, "ReplayTsDelay")) globals.mReplayTsDelay = atoi(Value);
else if(!strcasecmp(Name, "MainMenuEntry")) globals.mMainMenuEntry = atoi(Value);
else if(!strcasecmp(Name, "TextPos")) globals.mTextPos = atoi(Value);
else if(!strcasecmp(Name, "BottomLB")) globals.mBottomLB = atoi(Value);
@@ -467,7 +468,7 @@ void cPluginTtxtsubs::Replaying(const cControl *Control, const char *Name, const
}
}
-void cPluginTtxtsubs::PlayerTeletextData(uint8_t *p, int length)
+void cPluginTtxtsubs::PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording)
{
cTtxtSubsPlayer *r = dynamic_cast<cTtxtSubsPlayer *>(mDispl);
@@ -476,7 +477,7 @@ void cPluginTtxtsubs::PlayerTeletextData(uint8_t *p, int length)
return;
}
- r->PES_data(p, length);
+ r->PES_data(p, length, IsPesRecording);
}
cTtxtSubsRecorderBase *cPluginTtxtsubs::NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch)
@@ -675,7 +676,8 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
Add(new cMenuEditBoolItem(tr("Display Subtitles"), &mConf.mDoDisplay));
Add(new cMenuEditBoolItem(tr("Record Subtitles"), &mConf.mDoRecord));
Add(new cMenuEditIntItem(tr("Live Delay"), &mConf.mLiveDelay, 0, 5000));
- Add(new cMenuEditIntItem(tr("Replay Delay"), &mConf.mReplayDelay, 0, 5000));
+ Add(new cMenuEditIntItem(tr("Replay Delay (PES)"), &mConf.mReplayDelay, 0, 5000));
+ Add(new cMenuEditIntItem(tr("Replay Delay (TS)"), &mConf.mReplayTsDelay, 0, 5000));
if(mConf.mMainMenuEntry < 0 || mConf.mMainMenuEntry >= numMainMenuAlts)
mConf.mMainMenuEntry = 0; // menu item segfaults if out of range
Add(new cMenuEditStraItem(tr("Main Menu Alternative"), &mConf.mMainMenuEntry,
@@ -775,6 +777,7 @@ void cMenuSetupTtxtsubs::Store(void)
SetupStore("Record", mConf.mDoRecord);
SetupStore("LiveDelay", mConf.mLiveDelay);
SetupStore("ReplayDelay", mConf.mReplayDelay);
+ SetupStore("ReplayTsDelay", mConf.mReplayTsDelay);
SetupStore("TextPos", mConf.mTextPos);
SetupStore("BottomLB", mConf.mBottomLB);
SetupStore("BottomAdj", mConf.mBottomAdj);
diff --git a/ttxtsubsdisplayer.c b/ttxtsubsdisplayer.c
index bbad2cb..ffec39c 100644
--- a/ttxtsubsdisplayer.c
+++ b/ttxtsubsdisplayer.c
@@ -151,7 +151,7 @@ cTtxtSubsPlayer::cTtxtSubsPlayer(int backup_textpage)
// Take PES packets and break out the teletext data
// Buffer the data for processing in a separate thread
// XXX We should do some filtering here to avoid unneccessary load!
-void cTtxtSubsPlayer::PES_data(uchar *p, int Length)
+void cTtxtSubsPlayer::PES_data(uchar *p, int Length, bool IsPesRecording)
{
int i;
@@ -180,7 +180,7 @@ void cTtxtSubsPlayer::PES_data(uchar *p, int Length)
if(0xff == p[i*46]) // stuffing data
continue;
- uint64_t sched_time=cTimeMs::Now() + globals.replayDelay();
+ uint64_t sched_time=cTimeMs::Now() + (IsPesRecording ? globals.replayDelay() : globals.replayTsDelay());
cFrame *f = new cFrame(p + i*46, 46 + sizeof(sched_time));
memcpy(f->Data() + 46, &sched_time, sizeof(sched_time));
mRingBuf.Put(f);
diff --git a/ttxtsubsdisplayer.h b/ttxtsubsdisplayer.h
index e36486c..014b6fd 100644
--- a/ttxtsubsdisplayer.h
+++ b/ttxtsubsdisplayer.h
@@ -54,7 +54,7 @@ class cTtxtSubsLiveReceiver : public cReceiver, public cTtxtSubsDisplayer {
class cTtxtSubsPlayer : public cTtxtSubsDisplayer {
public:
cTtxtSubsPlayer(int backup_textpage);
- virtual void PES_data(uchar *Data, int Length);
+ virtual void PES_data(uchar *Data, int Length, bool IsPesRecording);
private:
void SearchLanguagePage(uint8_t *p, int len);
diff --git a/ttxtsubsglobals.h b/ttxtsubsglobals.h
index 6393860..493852f 100644
--- a/ttxtsubsglobals.h
+++ b/ttxtsubsglobals.h
@@ -54,6 +54,7 @@ class cTtxtsubsConf {
mI18nLanguage = 0;
mLiveDelay = 0;
mReplayDelay = 0;
+ mReplayTsDelay = 0;
}
public:
@@ -77,6 +78,7 @@ class cTtxtsubsConf {
int i18nLanguage(void) {return mI18nLanguage;}
int liveDelay(void) {return mLiveDelay;}
int replayDelay(void) {return mReplayDelay;}
+ int replayTsDelay(void) {return mReplayTsDelay;}
protected:
int mDoDisplay;
@@ -98,6 +100,7 @@ class cTtxtsubsConf {
int mI18nLanguage;
int mLiveDelay;
int mReplayDelay;
+ int mReplayTsDelay;
};
extern cTtxtsubsConf globals;
diff --git a/vdrttxtsubshooks.c b/vdrttxtsubshooks.c
index 25799fe..081d107 100644
--- a/vdrttxtsubshooks.c
+++ b/vdrttxtsubshooks.c
@@ -34,8 +34,8 @@ class cVDRTtxtsubsHookProxy : public cVDRTtxtsubsHookListener
public:
virtual void HideOSD(void) { if(gListener) gListener->HideOSD(); };
virtual void ShowOSD(void) { if(gListener) gListener->ShowOSD(); };
- virtual void PlayerTeletextData(uint8_t *p, int length)
- { if(gListener) gListener->PlayerTeletextData(p, length); };
+ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording)
+ { if(gListener) gListener->PlayerTeletextData(p, length, IsPesRecording); };
virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch)
{ if(gListener) return gListener->NewTtxtSubsRecorder(dev, ch); else return NULL; };
};
diff --git a/vdrttxtsubshooks.h b/vdrttxtsubshooks.h
index 253d6a4..5d3b7df 100644
--- a/vdrttxtsubshooks.h
+++ b/vdrttxtsubshooks.h
@@ -44,7 +44,7 @@ class cVDRTtxtsubsHookListener {
virtual void HideOSD(void) {};
virtual void ShowOSD(void) {};
- virtual void PlayerTeletextData(uint8_t *p, int length) {};
+ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording = true) {};
virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch)
{ return NULL; };