summaryrefslogtreecommitdiff
path: root/patches/patch-set
diff options
context:
space:
mode:
authorTobias Grimm <git@e-tobi.net>2010-02-14 22:50:13 +0100
committerTobias Grimm <git@e-tobi.net>2010-02-14 22:50:13 +0100
commit974b5b78567e350cd8b646be289b7a9c203cf9a4 (patch)
treed48de49b83b23c6054b6c06fea21d66a21f25d1b /patches/patch-set
parent481745255e5bb50287595e3134f517c6cbdcccea (diff)
downloadvdr-plugin-ttxtsubs-974b5b78567e350cd8b646be289b7a9c203cf9a4.tar.gz
vdr-plugin-ttxtsubs-974b5b78567e350cd8b646be289b7a9c203cf9a4.tar.bz2
Pass page count to plugin
Diffstat (limited to 'patches/patch-set')
-rw-r--r--patches/patch-set/0001-Record-teletext-subtitles.patch8
-rw-r--r--patches/patch-set/0002-Added-setup-option-to-enable-teletext-subtitle-recor.patch2
-rw-r--r--patches/patch-set/0003-Allow-manual-configuration-of-teletetxt-subtitle-pag.patch4
-rw-r--r--patches/patch-set/0004-Decrypt-teletext-stream.patch2
-rw-r--r--patches/patch-set/0005-Capture-teletext-subtitle-pages-from-PMT.patch2
-rw-r--r--patches/patch-set/0006-Ttxtsubs-plugin-hook.patch33
6 files changed, 33 insertions, 18 deletions
diff --git a/patches/patch-set/0001-Record-teletext-subtitles.patch b/patches/patch-set/0001-Record-teletext-subtitles.patch
index 207ac62..93f1d9c 100644
--- a/patches/patch-set/0001-Record-teletext-subtitles.patch
+++ b/patches/patch-set/0001-Record-teletext-subtitles.patch
@@ -1,4 +1,4 @@
-From 21d95f17ee8373033602f0cc79d3589ae2978019 Mon Sep 17 00:00:00 2001
+From 16f2ef39cd891a2333d9127c279d06d5e7204577 Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Fri, 12 Feb 2010 21:55:04 +0100
Subject: [PATCH 1/6] Record teletext subtitles
@@ -30,7 +30,7 @@ index c14df19..08ddf3e 100644
{
if (caids[0] && caids[0] <= CA_USER_MAX)
diff --git a/channels.h b/channels.h
-index b465f6a..acb346e 100644
+index b465f6a..60973b7 100644
--- a/channels.h
+++ b/channels.h
@@ -35,6 +35,7 @@
@@ -71,8 +71,8 @@ index b465f6a..acb346e 100644
uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); }
uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); }
int Tpid(void) const { return tpid; }
-+ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; };
-+ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; };
++ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; }
++ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; }
const int *Caids(void) const { return caids; }
int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; }
int Nid(void) const { return nid; }
diff --git a/patches/patch-set/0002-Added-setup-option-to-enable-teletext-subtitle-recor.patch b/patches/patch-set/0002-Added-setup-option-to-enable-teletext-subtitle-recor.patch
index cbd957c..61bad9b 100644
--- a/patches/patch-set/0002-Added-setup-option-to-enable-teletext-subtitle-recor.patch
+++ b/patches/patch-set/0002-Added-setup-option-to-enable-teletext-subtitle-recor.patch
@@ -1,4 +1,4 @@
-From 16a350dcad8b81dda4b0326d327af8a01628a48b Mon Sep 17 00:00:00 2001
+From 1bb47964b00e093abfb8690f26a287b5656cf5b2 Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Sat, 13 Feb 2010 14:42:30 +0100
Subject: [PATCH 2/6] Added setup option to enable teletext subtitle recording
diff --git a/patches/patch-set/0003-Allow-manual-configuration-of-teletetxt-subtitle-pag.patch b/patches/patch-set/0003-Allow-manual-configuration-of-teletetxt-subtitle-pag.patch
index 30094b2..caad40e 100644
--- a/patches/patch-set/0003-Allow-manual-configuration-of-teletetxt-subtitle-pag.patch
+++ b/patches/patch-set/0003-Allow-manual-configuration-of-teletetxt-subtitle-pag.patch
@@ -1,4 +1,4 @@
-From 578e95faa4f0724c664418587a756590a2947f26 Mon Sep 17 00:00:00 2001
+From 856573ae5f4845a0dac545d64edd5c3f7f387de3 Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Fri, 12 Feb 2010 21:56:41 +0100
Subject: [PATCH 3/6] Allow manual configuration of teletetxt subtitle pages in channels.conf
@@ -103,7 +103,7 @@ index 08ddf3e..0e23389 100644
free(namebuf);
if (!GetChannelID().Valid()) {
diff --git a/channels.h b/channels.h
-index acb346e..c61f770 100644
+index 60973b7..897c8cd 100644
--- a/channels.h
+++ b/channels.h
@@ -144,6 +144,7 @@ private:
diff --git a/patches/patch-set/0004-Decrypt-teletext-stream.patch b/patches/patch-set/0004-Decrypt-teletext-stream.patch
index 04ce9c6..1b90d50 100644
--- a/patches/patch-set/0004-Decrypt-teletext-stream.patch
+++ b/patches/patch-set/0004-Decrypt-teletext-stream.patch
@@ -1,4 +1,4 @@
-From 40f30d2e5ab735443071c61b5458b1d4fe9f5f89 Mon Sep 17 00:00:00 2001
+From b941978d0b1bb23ce39f84682854ce3aeeac6c85 Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Sun, 14 Feb 2010 01:30:34 +0100
Subject: [PATCH 4/6] Decrypt teletext stream
diff --git a/patches/patch-set/0005-Capture-teletext-subtitle-pages-from-PMT.patch b/patches/patch-set/0005-Capture-teletext-subtitle-pages-from-PMT.patch
index 3acdd15..1567ed1 100644
--- a/patches/patch-set/0005-Capture-teletext-subtitle-pages-from-PMT.patch
+++ b/patches/patch-set/0005-Capture-teletext-subtitle-pages-from-PMT.patch
@@ -1,4 +1,4 @@
-From c53754118c53807da2b62d3bb985bfd1e2bd0197 Mon Sep 17 00:00:00 2001
+From 0527d5ea66ee4752653b280ae0f75b47c9e36870 Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Fri, 12 Feb 2010 22:06:19 +0100
Subject: [PATCH 5/6] Capture teletext subtitle pages from PMT
diff --git a/patches/patch-set/0006-Ttxtsubs-plugin-hook.patch b/patches/patch-set/0006-Ttxtsubs-plugin-hook.patch
index d325f13..761cd4b 100644
--- a/patches/patch-set/0006-Ttxtsubs-plugin-hook.patch
+++ b/patches/patch-set/0006-Ttxtsubs-plugin-hook.patch
@@ -1,4 +1,4 @@
-From 1eafdc9add03826b63f05c7b9235c2429f5b083c Mon Sep 17 00:00:00 2001
+From 85bd01ba24dbfbb8653eada418cd57929fb4c016 Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Sat, 13 Feb 2010 00:28:21 +0100
Subject: [PATCH 6/6] Ttxtsubs plugin hook
@@ -8,9 +8,10 @@ Subject: [PATCH 6/6] Ttxtsubs plugin hook
device.c | 20 ++++++++++++++++
device.h | 1 +
pat.c | 6 +++++
+ remux.h | 3 +-
vdrttxtsubshooks.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
vdrttxtsubshooks.h | 46 ++++++++++++++++++++++++++++++++++++++
- 6 files changed, 138 insertions(+), 0 deletions(-)
+ 7 files changed, 140 insertions(+), 1 deletions(-)
create mode 100644 vdrttxtsubshooks.c
create mode 100644 vdrttxtsubshooks.h
@@ -28,7 +29,7 @@ index 01408cb..b280030 100644
DEFINES += -DREMOTE_KBD
endif
diff --git a/device.c b/device.c
-index cb31b83..86b6b2c 100644
+index cb31b83..fb4c655 100644
--- a/device.c
+++ b/device.c
@@ -18,6 +18,7 @@
@@ -71,7 +72,7 @@ index cb31b83..86b6b2c 100644
+ 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, false, patPmtParser.TeletextSubtitlePages());
++ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData((uchar *)p, l, false, patPmtParser.TeletextSubtitlePages(), patPmtParser.TotalTeletextSubtitlePages());
+ tsToPesTeletext.Reset();
+ }
+ }
@@ -115,9 +116,23 @@ index ff25501..c6e7834 100644
Channel->SetTeletextSubtitlePages(TeletextSubtitlePages, NumTPages);
Channel->SetCaIds(CaDescriptors->CaIds());
Channel->SetSubtitlingDescriptors(SubtitlingTypes, CompositionPageIds, AncillaryPageIds);
+diff --git a/remux.h b/remux.h
+index 390236a..7bf712e 100644
+--- a/remux.h
++++ b/remux.h
+@@ -280,7 +280,8 @@ public:
+ uchar SubtitlingType(int i) const { return (0 <= i && i < MAXSPIDS) ? subtitlingTypes[i] : uchar(0); }
+ uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); }
+ uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); }
+- const tTeletextSubtitlePage* TeletextSubtitlePages() const { return teletextSubtitlePages; }
++ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; }
++ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; }
+ };
+
+ // TS to PES converter:
diff --git a/vdrttxtsubshooks.c b/vdrttxtsubshooks.c
new file mode 100644
-index 0000000..865596e
+index 0000000..2471788
--- /dev/null
+++ b/vdrttxtsubshooks.c
@@ -0,0 +1,63 @@
@@ -157,8 +172,8 @@ index 0000000..865596e
+ 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, bool IsPesRecording, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL)
-+ { if(gListener) gListener->PlayerTeletextData(p, length, IsPesRecording, teletextSubtitlePages); };
++ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL, int pageCount = 0)
++ { if(gListener) gListener->PlayerTeletextData(p, length, IsPesRecording, teletextSubtitlePages, pageCount); };
+ virtual int ManualPageNumber(const cChannel *channel)
+ { if(gListener) return gListener->ManualPageNumber(channel); else return 0; };
+};
@@ -186,7 +201,7 @@ index 0000000..865596e
+
diff --git a/vdrttxtsubshooks.h b/vdrttxtsubshooks.h
new file mode 100644
-index 0000000..2e8e9ba
+index 0000000..2f97969
--- /dev/null
+++ b/vdrttxtsubshooks.h
@@ -0,0 +1,46 @@
@@ -228,7 +243,7 @@ index 0000000..2e8e9ba
+
+ virtual void HideOSD(void) {};
+ virtual void ShowOSD(void) {};
-+ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording = true, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL) {};
++ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording = true, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL, int pageCount = 0) {};
+ virtual int ManualPageNumber(const cChannel *channel) { return 0; };
+
+ // used by VDR to call hook listeners