summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Horila <mhorila@nic.fi>2013-03-06 00:10:09 +0200
committerVille Skyttä <ville.skytta@iki.fi>2013-03-06 00:17:08 +0200
commitf2bc4f5a511de4673e0d2c302c4e5e57600c4b02 (patch)
tree46f07ab6d1fc8ce640573d91d534b1f698390c8f
parent615a68e7eb2b82ae9b1d5b4e2d703861cc8584a0 (diff)
downloadvdr-plugin-ttxtsubs-f2bc4f5a511de4673e0d2c302c4e5e57600c4b02.tar.gz
vdr-plugin-ttxtsubs-f2bc4f5a511de4673e0d2c302c4e5e57600c4b02.tar.bz2
Sync subtitles using PTS (Closes #119).
Co-authored-by: Dimitar Petrovski <dimeptr@gmail.com>
-rw-r--r--Makefile2
-rw-r--r--po/ca_ES.po8
-rw-r--r--po/de_DE.po8
-rw-r--r--po/es_ES.po8
-rw-r--r--po/et_EE.po8
-rw-r--r--po/fi_FI.po8
-rw-r--r--po/fr_FR.po8
-rw-r--r--po/it_IT.po8
-rw-r--r--po/ru_RU.po8
-rw-r--r--po/sv_SE.po8
-rw-r--r--po/uk_UA.po8
-rw-r--r--ttxtaudio.c47
-rw-r--r--ttxtaudio.h31
-rw-r--r--ttxtsubs.c10
-rw-r--r--ttxtsubsdisplay.c27
-rw-r--r--ttxtsubsdisplay.h2
-rw-r--r--ttxtsubsdisplayer.c20
-rw-r--r--ttxtsubsglobals.h8
18 files changed, 131 insertions, 96 deletions
diff --git a/Makefile b/Makefile
index 9b2da50..13c2043 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
### The object files (add further files here):
OBJS = $(PLUGIN).o ttxtsubsdisplayer.o ttxtsubsdisplay.o teletext.o \
- ttxtsubspagemenu.o ttxtsubschannelsettings.o ttxtsubslivereceiver.o
+ ttxtsubspagemenu.o ttxtsubschannelsettings.o ttxtsubslivereceiver.o ttxtaudio.o
### Implicit rules:
.PHONY: all all-redirect
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 7dc0fbe..30988e0 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Jordi Vilà <jvila@tinet.org>\n"
"Language-Team: Catalan <vdr@linuxtv.org>\n"
@@ -46,12 +46,6 @@ msgstr "Modalitat pàgina"
msgid "Display Subtitles"
msgstr "Visualitza subtítols"
-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 73b169d..54c230c 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
@@ -44,12 +44,6 @@ msgstr "Seitenmodus"
msgid "Display Subtitles"
msgstr "Zeige Untertitel"
-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 310cab3..4822701 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Ruben Nunez Francisco <ruben.nunez@tang-it.com>\n"
"Language-Team: Spanish <vdr@linuxtv.org>\n"
@@ -44,12 +44,6 @@ msgstr "Modo página"
msgid "Display Subtitles"
msgstr "Visualiza subtítulos"
-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/et_EE.po b/po/et_EE.po
index a1711ed..3576b07 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Arthur Konovalov <artlov@gmail.com>\n"
"Language-Team: Estonian <vdr@linuxtv.org>\n"
@@ -43,12 +43,6 @@ msgstr "lk valik"
msgid "Display Subtitles"
msgstr "Subtiitrite kuvamine"
-msgid "Replay Delay (PES)"
-msgstr "Salvestuse viivitus (PES)"
-
-msgid "Replay Delay (TS)"
-msgstr "Salvestuse viivitus (TS)"
-
msgid "Main Menu Alternative"
msgstr "Peamenüü valikud"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 6dce8de..80169a8 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ttxtsubs 0.2.0\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
@@ -43,12 +43,6 @@ msgstr "sivun valinta"
msgid "Display Subtitles"
msgstr "Näytä tekstitykset"
-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 e074cab..b0956cb 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2010-02-28 14:43+0100\n"
"Last-Translator: Nival Michaël\n"
"Language-Team: French <vdr@linuxtv.org>\n"
@@ -46,12 +46,6 @@ msgstr "Mode page"
msgid "Display Subtitles"
msgstr "Afficher les sous-titre"
-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"
diff --git a/po/it_IT.po b/po/it_IT.po
index 9911a01..cf5af4b 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2010-03-02 20:48+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian <vdr@linuxtv.org>\n"
@@ -48,12 +48,6 @@ msgstr "Mod. pagina"
msgid "Display Subtitles"
msgstr "Visualizza sottotitoli"
-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."
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 4bda852..eaac9b7 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2008-12-30 14:05+0100\n"
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
"Language-Team: Russian <vdr@linuxtv.org>\n"
@@ -44,12 +44,6 @@ msgstr "Режим страницы"
msgid "Display Subtitles"
msgstr "Показывать субтитры"
-msgid "Replay Delay (PES)"
-msgstr "Задержка воспроизведения (PES)"
-
-msgid "Replay Delay (TS)"
-msgstr "Задержка воспроизведения (TS)"
-
msgid "Main Menu Alternative"
msgstr "Команда в главном меню"
diff --git a/po/sv_SE.po b/po/sv_SE.po
index b12242c..7fdd9be 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: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2007-08-24 23:49+0300\n"
"Last-Translator: Tomas Prybil <tomas@prybil.se>\n"
"Language-Team: Swedish <vdr@linuxtv.org>\n"
@@ -45,12 +45,6 @@ msgstr ""
msgid "Display Subtitles"
msgstr "Visa textning"
-msgid "Replay Delay (PES)"
-msgstr ""
-
-msgid "Replay Delay (TS)"
-msgstr ""
-
msgid "Main Menu Alternative"
msgstr "Huvudmenyalternativ"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index bdcae35..6dc2f60 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\n"
-"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+"POT-Creation-Date: 2013-03-06 00:14+0200\n"
"PO-Revision-Date: 2009-05-28 14:05+0100\n"
"Last-Translator: Yarema aka Knedlyk <yupadmin@gmail.com>\n"
"Language-Team: Ukrainian <vdr@linuxtv.org>\n"
@@ -39,12 +39,6 @@ msgstr "Режим сторінки"
msgid "Display Subtitles"
msgstr "Показувати субтитри"
-msgid "Replay Delay (PES)"
-msgstr "Затримка Програвання (PES)"
-
-msgid "Replay Delay (TS)"
-msgstr "Затримка Програвання (TS)"
-
msgid "Main Menu Alternative"
msgstr "Команда в головному меню"
diff --git a/ttxtaudio.c b/ttxtaudio.c
new file mode 100644
index 0000000..ac2135c
--- /dev/null
+++ b/ttxtaudio.c
@@ -0,0 +1,47 @@
+/* -*- c++ -*-
+ * ttxtaudio.c
+ *
+ * Created on: Oct 31, 2012
+ * Author: Dimitar Petrovski
+ */
+
+#include "ttxtaudio.h"
+
+int64_t cTtxtAudio::pts = 0;
+
+cTtxtAudio::cTtxtAudio()
+:cExternalAudio("TtxtAudio")
+{
+}
+
+cTtxtAudio::~cTtxtAudio()
+{
+}
+
+void cTtxtAudio::Play(const uchar* p, int Length, uchar Id)
+{
+ int64_t tmp_pts = 0;
+ bool audio_pts_wrap = false;
+
+ if (PesHasPts(p))
+ tmp_pts = PesGetPts(p);
+ if (tmp_pts != 0) {
+ if ((pts > 0x1ffff0000LL) && (tmp_pts < 0x000100000LL)) {
+ audio_pts_wrap=true;
+ }
+ if (audio_pts_wrap) { tmp_pts+=0x200000000LL; }
+ }
+ if (tmp_pts != pts) { pts=tmp_pts; }
+
+}
+
+void cTtxtAudio::PlayTs(const uchar* Data, int Length)
+{
+// isyslog("ttxtsubs: cTtxtAudio::PlayTs");
+ tsToPesTtxtAudio.PutTs(Data, Length);
+ int l;
+ if (const uchar *p = tsToPesTtxtAudio.GetPes(l)) {
+ Play(p,l,0);
+ tsToPesTtxtAudio.Reset();
+ }
+}
diff --git a/ttxtaudio.h b/ttxtaudio.h
new file mode 100644
index 0000000..e6a1bce
--- /dev/null
+++ b/ttxtaudio.h
@@ -0,0 +1,31 @@
+/* -*- c++ -*-
+ * ttxtaudio.h
+ *
+ * Created on: Oct 31, 2012
+ * Author: Dimitar Petrovski
+ */
+
+#ifndef CTTXTAUDIO_H_
+#define CTTXTAUDIO_H_
+
+#include <vdr/audio.h>
+#include <vdr/remux.h>
+
+class cTtxtAudio : public cExternalAudio
+{
+public:
+ cTtxtAudio();
+ virtual ~cTtxtAudio();
+
+ virtual void Play(const uchar *Data, int Length, uchar Id);
+ virtual void PlayTs(const uchar *Data, int Length);
+ virtual void Mute(bool On){};
+ virtual void Clear(void){};
+
+ static int64_t pts;
+private:
+ cTsToPes tsToPesTtxtAudio;
+
+};
+
+#endif /* CTTXTAUDIO_H_ */
diff --git a/ttxtsubs.c b/ttxtsubs.c
index 7d316d3..0dd839b 100644
--- a/ttxtsubs.c
+++ b/ttxtsubs.c
@@ -43,6 +43,7 @@
#include "ttxtsubspagemenu.h"
#include "ttxtsubschannelsettings.h"
#include "ttxtsubslivereceiver.h"
+#include "ttxtaudio.h"
#if defined(APIVERSNUM) && APIVERSNUM < 10706
#error "This version of ttxtsubs only works with vdr version >= 1.7.6!"
@@ -169,6 +170,7 @@ public:
private:
cTtxtSubsPlayer *mDispl;
cMutex mDisplLock;;
+ cTtxtAudio *mAudio;
char mOldLanguage[4]; // language chosen from previous version
int mOldHearingImpaired; // HI setting chosen from previous version
@@ -316,8 +318,6 @@ cMenuSetupPage *cPluginTtxtsubs::SetupMenu(void)
bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value)
{
if(!strcasecmp(Name, "Display")) { globals.mDoDisplay = atoi(Value); globals.mRealDoDisplay=globals.mDoDisplay; }
- 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, "FontSize")) globals.mFontSize = atoi(Value);
else if(!strcasecmp(Name, "OutlineWidth")) globals.mOutlineWidth = atoi(Value);
@@ -396,6 +396,8 @@ void cPluginTtxtsubs::StartTtxtPlay(int backup_page)
if(!mDispl) {
isyslog("ttxtsubs: teletext subtitles replayer started with initial page %03x", backup_page);
mDispl = new cTtxtSubsPlayer(backup_page);
+ if (!mAudio)
+ mAudio = new cTtxtAudio();
ShowTtxt();
} else
esyslog("ttxtsubs: Error: StartTtxtPlay called when already started!");
@@ -519,8 +521,6 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
}
Add(new cMenuEditBoolItem(tr("Display Subtitles"), &mConf.mDoDisplay));
- 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,
@@ -578,8 +578,6 @@ void cMenuSetupTtxtsubs::Store(void)
}
SetupStore("Display", mConf.mDoDisplay);
- SetupStore("ReplayDelay", mConf.mReplayDelay);
- SetupStore("ReplayTsDelay", mConf.mReplayTsDelay);
SetupStore("MainMenuEntry", mConf.mMainMenuEntry);
SetupStore("FontSize", mConf.mFontSize);
SetupStore("OutlineWidth", mConf.mOutlineWidth);
diff --git a/ttxtsubsdisplay.c b/ttxtsubsdisplay.c
index 04b36c8..0257a22 100644
--- a/ttxtsubsdisplay.c
+++ b/ttxtsubsdisplay.c
@@ -31,6 +31,7 @@
#include <vdr/font.h>
#include <vdr/config.h>
#include <vdr/tools.h>
+#include <vdr/device.h>
#include "ttxtsubsglobals.h"
#include "ttxtsubsdisplay.h"
@@ -163,8 +164,11 @@ void cTtxtSubsDisplay::Show(void)
ShowOSD();
}
+//Taken from VDR dvbsubtitle.c
+#define LimitTo32Bit(n) ((n) & 0x00000000FFFFFFFFL)
+#define MAXDELTA 40000 // max. reasonable PTS/STC delta in ms
-void cTtxtSubsDisplay::TtxtData(const uint8_t *Data, uint64_t sched_time)
+void cTtxtSubsDisplay::TtxtData(const uint8_t *Data, int64_t sched_pts)
{
int mp;
int mag; // X in ETSI EN 300 706
@@ -256,9 +260,24 @@ void cTtxtSubsDisplay::TtxtData(const uint8_t *Data, uint64_t sched_time)
if (_pageState != collecting)
{
- int diff = sched_time - cTimeMs::Now();
- //printf("Got sched_time %llx, diff %d\n", sched_time, diff);
- if (diff > 10) cCondWait::SleepMs(diff);
+ int64_t pts = cDevice::PrimaryDevice()->GetSTC();
+
+ //Taken from VDR dvbsubtitle.c
+ int64_t diff = (LimitTo32Bit(sched_pts) - LimitTo32Bit(pts));// some devices only deliver 32 bits
+ if (diff > (int64_t(1) << 31))
+ diff -= (int64_t(1) << 32);
+ else if (diff < -((int64_t(1) << 31) - 1))
+ diff += (int64_t(1) << 32);
+ diff /= 90;
+ if (diff > MAXDELTA)
+ return;
+
+ while( diff > 10 )
+ {
+ cCondWait::SleepMs(min(diff,int64_t(250)));
+ if( !_doDisplay ) return;
+ diff -= 250;
+ }
}
_pageState = collecting;
diff --git a/ttxtsubsdisplay.h b/ttxtsubsdisplay.h
index 534e24e..ac5762a 100644
--- a/ttxtsubsdisplay.h
+++ b/ttxtsubsdisplay.h
@@ -45,7 +45,7 @@ public:
void SetPage(int Pageno); // Pageno is 0x000 to 0x799
void Hide(void);
void Show(void);
- void TtxtData(const uint8_t *, uint64_t sched_time = 0);
+ void TtxtData(const uint8_t *, int64_t sched_pts = 0);
protected:
void ShowOSD();
diff --git a/ttxtsubsdisplayer.c b/ttxtsubsdisplayer.c
index fa0a1b2..4b80858 100644
--- a/ttxtsubsdisplayer.c
+++ b/ttxtsubsdisplayer.c
@@ -22,16 +22,18 @@
#include "ttxtsubsdisplay.h"
#include "utils.h"
#include "ttxtsubsglobals.h"
+#include "ttxtaudio.h"
#include <vdr/channels.h>
// ----- class cTtxtSubsDisplayer -----
cTtxtSubsDisplayer::cTtxtSubsDisplayer(int textpage)
:
+ cThread("TtxtSubsDisplayer"),
mDisp(new cTtxtSubsDisplay()),
mGetMutex(),
mGetCond(),
- mRingBuf(94000, true),
+ mRingBuf(188000, true),
mRun(0)
{
mDisp->SetPage(textpage);
@@ -59,9 +61,7 @@ void cTtxtSubsDisplayer::Action(void)
f = mRingBuf.Get();
if(f) {
- uint64_t sched_time;
- memcpy(&sched_time, f->Data() + 46, sizeof(sched_time));
- mDisp->TtxtData(f->Data(), sched_time);
+ mDisp->TtxtData(f->Data(), f->Pts());
mRingBuf.Drop(f);
} else {
// wait for more data
@@ -102,6 +102,7 @@ cTtxtSubsPlayer::cTtxtSubsPlayer(int backup_textpage)
void cTtxtSubsPlayer::PES_data(uchar *p, int Length, bool IsPesRecording, const struct tTeletextSubtitlePage teletextSubtitlePages[], int pageCount)
{
int i;
+ int64_t pts = 0;
//printf("cTtxtSubsPlayer: len: %d\n", Length); // XXX
@@ -136,14 +137,19 @@ void cTtxtSubsPlayer::PES_data(uchar *p, int Length, bool IsPesRecording, const
if(mHasFilteredStream && !mFoundLangPage)
SearchLanguagePage(p, Length);
+ if (PesHasPts(p))
+ pts = PesGetPts(p);
+
+ //Some streams are missing the Subtitle pts so we use the audio instead
+ if (!pts && cTtxtAudio::pts)
+ pts = cTtxtAudio::pts;
+
// payload_unit_start_indicator
for(i = 1; (i*46) < Length ; i++) {
if(0xff == p[i*46]) // stuffing data
continue;
- 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));
+ cFrame *f = new cFrame(p + i*46, 46, ftUnknown, -1, pts);
if (mRingBuf.Put(f))
{
mGetCond.Broadcast();
diff --git a/ttxtsubsglobals.h b/ttxtsubsglobals.h
index acf82b5..d35a877 100644
--- a/ttxtsubsglobals.h
+++ b/ttxtsubsglobals.h
@@ -39,9 +39,7 @@ class cTtxtsubsConf {
mRealDoDisplay(1),
mMainMenuEntry(0),
mFontSize(20),
- mOutlineWidth(2),
- mReplayDelay(0),
- mReplayTsDelay(0)
+ mOutlineWidth(2)
{
memset(mLanguages, 0, sizeof(mLanguages));
memset(mHearingImpaireds, 0, sizeof(mHearingImpaireds));
@@ -56,8 +54,6 @@ class cTtxtsubsConf {
int (*hearingImpaireds(void))[MAXLANGUAGES][2] {return &mHearingImpaireds;}
int langChoise(const char *lang, const int HI);
- int replayDelay(void) {return mReplayDelay;}
- int replayTsDelay(void) {return mReplayTsDelay;}
protected:
int mDoDisplay;
@@ -67,8 +63,6 @@ class cTtxtsubsConf {
int mOutlineWidth;
char mLanguages[MAXLANGUAGES][2][4];
int mHearingImpaireds[MAXLANGUAGES][2];
- int mReplayDelay;
- int mReplayTsDelay;
};
extern cTtxtsubsConf globals;