diff options
author | Tobias Grimm <tobias@e-tobi.loc> | 2009-04-23 23:43:57 +0200 |
---|---|---|
committer | Tobias Grimm <tobias@e-tobi.loc> | 2009-06-20 18:17:42 +0200 |
commit | 2cc8de4c93ef1f92017eaa3e25dda237fc348165 (patch) | |
tree | a954a56fee2df887769269fa98eb7757b9d4e2db | |
parent | e125a3bbd31042b4d8d72171f19c1006bee06282 (diff) | |
download | vdr-patches-2cc8de4c93ef1f92017eaa3e25dda237fc348165.tar.gz vdr-patches-2cc8de4c93ef1f92017eaa3e25dda237fc348165.tar.bz2 |
ttxtsubs: Added Ttxtsubs hook to TS playback / PlayTs()
(provided by Rolf Ahrenberg)
-rw-r--r-- | device.c | 13 | ||||
-rw-r--r-- | device.h | 1 |
2 files changed, 14 insertions, 0 deletions
@@ -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; @@ -496,6 +496,7 @@ private: cTsToPes tsToPesVideo; cTsToPes tsToPesAudio; cTsToPes tsToPesSubtitle; + cTsToPes tsToPesTeletext; bool isPlayingVideo; protected: virtual bool CanReplay(void) const; |