summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.c13
-rw-r--r--device.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/device.c b/device.c
index 834b6ea..4d89fd5 100644
--- a/device.c
+++ b/device.c
@@ -18,6 +18,7 @@
#include "receiver.h"
#include "status.h"
#include "transfer.h"
+#include "vdrttxtsubshooks.h"
// --- cLiveSubtitle ---------------------------------------------------------
@@ -1337,6 +1338,7 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
tsToPesVideo.Reset();
tsToPesAudio.Reset();
tsToPesSubtitle.Reset();
+ tsToPesTeletext.Reset();
}
else if (Length < TS_SIZE) {
esyslog("ERROR: skipped %d bytes of TS fragment", Length);
@@ -1382,6 +1384,17 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
if (!VideoOnly || HasIBPTrickSpeed())
PlayTsSubtitle(Data, TS_SIZE);
}
+ else if (Pid == patPmtParser.Tpid()) {
+ if (!VideoOnly || HasIBPTrickSpeed()) {
+ int l;
+ tsToPesTeletext.PutTs(Data, Length);
+ if (const uchar *p = tsToPesTeletext.GetPes(l)) {
+ if ((l > 45) && (p[0] == 0x00) && (p[1] == 0x00) && (p[2] == 0x01) && (p[3] == 0xbd) && (p[8] == 0x24) && (p[45] >= 0x10) && (p[45] < 0x20))
+ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData((uchar *)p, l);
+ tsToPesTeletext.Reset();
+ }
+ }
+ }
}
}
Played += TS_SIZE;
diff --git a/device.h b/device.h
index 8ac8594..b4b27ce 100644
--- a/device.h
+++ b/device.h
@@ -496,6 +496,7 @@ private:
cTsToPes tsToPesVideo;
cTsToPes tsToPesAudio;
cTsToPes tsToPesSubtitle;
+ cTsToPes tsToPesTeletext;
bool isPlayingVideo;
protected:
virtual bool CanReplay(void) const;