diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2009-08-26 20:22:50 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2009-08-26 20:22:50 +0300 |
commit | 4284bda3eb9961437bf18e2363e49271a5de8662 (patch) | |
tree | eb331e66028c6059c05034a14709c9d43965a36d | |
parent | f4741b2e2944b28bc48ba4aaf9ccb8ec96b6288b (diff) | |
download | vdr-plugin-ttxtsubs-4284bda3eb9961437bf18e2363e49271a5de8662.tar.gz vdr-plugin-ttxtsubs-4284bda3eb9961437bf18e2363e49271a5de8662.tar.bz2 |
Clarify that VDR >= 1.7.6 is needed, remove obsolete patches.
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | patches/vdr-1.6.0-2-ttxtsubs.patch | 296 | ||||
-rw-r--r-- | patches/vdr-1.7.2-ttxtsubs.patch | 289 | ||||
-rw-r--r-- | ttxtsubs.c | 4 |
5 files changed, 5 insertions, 590 deletions
@@ -7,8 +7,8 @@ VDR Plugin 'ttxtsubs' Revision History 2009-04-26: Version 0.1.0 - Updated VDR patch and plugin to VDR 1.7.6 with support for the TS recording - format and added separate delay setting for TS recordings. - Credits go to Rolf Ahrenberg - Thanks a lot! + format and added separate delay setting for TS recordings. Older VDR versions + are no longer supported. Credits go to Rolf Ahrenberg - Thanks a lot! - Silence compiler warning about unchecked read return value. (thx to Rolf Ahrenberg) - After replaying, reset the last channel variable and trigger a channel switch @@ -82,7 +82,7 @@ reworked a few times. Installation: -This plugin is for VDR >= 1.6.0. It currently needs a few hooks in, and +This plugin is for VDR >= 1.7.6. It currently needs a few hooks in, and changes to, VDR to work. A patch file is included and it should be harmless if you don't have the plugin loaded, so even if you patch VDR and later decide not to use this plugin you don't necessarily have diff --git a/patches/vdr-1.6.0-2-ttxtsubs.patch b/patches/vdr-1.6.0-2-ttxtsubs.patch deleted file mode 100644 index 16bd1a1..0000000 --- a/patches/vdr-1.6.0-2-ttxtsubs.patch +++ /dev/null @@ -1,296 +0,0 @@ -diff --git a/Makefile b/Makefile -index b07b1df..fda1f40 100644 ---- a/Makefile -+++ b/Makefile -@@ -43,6 +43,8 @@ OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o d - skinclassic.o skins.o skinsttng.o sources.o spu.o status.o svdrp.o themes.o thread.o\ - timers.o tools.o transfer.o vdr.o videodir.o - -+OBJS += vdrttxtsubshooks.o -+ - ifndef NO_KBD - DEFINES += -DREMOTE_KBD - endif -diff --git a/dvbplayer.c b/dvbplayer.c -index 64fa559..18484fe 100644 ---- a/dvbplayer.c -+++ b/dvbplayer.c -@@ -14,6 +14,7 @@ - #include "ringbuffer.h" - #include "thread.h" - #include "tools.h" -+#include "vdrttxtsubshooks.h" - - // --- cBackTrace ------------------------------------------------------------ - -@@ -312,6 +313,32 @@ void cDvbPlayer::Empty(void) - firstPacket = true; - } - -+static void StripExtendedPackets(uchar *b, int Length) -+{ -+ for (int i = 0; i < Length - 6; i++) { -+ if (b[i] == 0x00 && b[i + 1] == 0x00 && b[i + 2] == 0x01) { -+ uchar c = b[i + 3]; -+ int l = b[i + 4] * 256 + b[i + 5] + 6; -+ switch (c) { -+ case 0xBD: // dolby -+ // EBU Teletext data, ETSI EN 300 472 -+ if (b[i + 8] == 0x24 && b[i + 45] >= 0x10 && b[i + 45] < 0x20) { -+ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData(&b[i], l); -+ // continue with deleting the data - otherwise it disturbs DVB replay -+ int n = l; -+ for (int j = i; j < Length && n--; j++) -+ b[j] = 0x00; -+ } -+ break; -+ default: -+ break; -+ } -+ if (l) -+ i += l - 1; // the loop increments, too! -+ } -+ } -+} -+ - bool cDvbPlayer::NextFile(uchar FileNumber, int FileOffset) - { - if (FileNumber > 0) -@@ -503,6 +530,7 @@ void cDvbPlayer::Action(void) - } - } - if (p) { -+ StripExtendedPackets(p, pc); - int w = PlayPes(p, pc, playMode != pmPlay); - if (w > 0) { - p += w; -diff --git a/menu.c b/menu.c -index b7eab45..b1f112a 100644 ---- a/menu.c -+++ b/menu.c -@@ -28,6 +28,7 @@ - #include "themes.h" - #include "timers.h" - #include "transfer.h" -+#include "vdrttxtsubshooks.h" - #include "videodir.h" - - #define MAXWAIT4EPGINFO 3 // seconds -@@ -3811,8 +3812,10 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause) - isyslog("record %s", fileName); - if (MakeDirs(fileName, true)) { - const cChannel *ch = timer->Channel(); -- recorder = new cRecorder(fileName, ch->GetChannelID(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids()); -+ cTtxtSubsRecorderBase *subsRecorder = cVDRTtxtsubsHookListener::Hook()->NewTtxtSubsRecorder(device, ch); -+ recorder = new cRecorder(fileName, ch->GetChannelID(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids(), subsRecorder); - if (device->AttachReceiver(recorder)) { -+ if (subsRecorder) subsRecorder->DeviceAttach(); - Recording.WriteInfo(); - cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true); - if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() -diff --git a/osd.c b/osd.c -index 47a11b2..c32750b 100644 ---- a/osd.c -+++ b/osd.c -@@ -15,6 +15,7 @@ - #include <sys/stat.h> - #include <sys/unistd.h> - #include "tools.h" -+#include "vdrttxtsubshooks.h" - - // --- cPalette -------------------------------------------------------------- - -diff --git a/recorder.c b/recorder.c -index 7bcd0cc..a915140 100644 ---- a/recorder.c -+++ b/recorder.c -@@ -11,6 +11,7 @@ - #include <stdarg.h> - #include <stdio.h> - #include <unistd.h> -+#include <stdint.h> - #include "shutdown.h" - - #define RECORDERBUFSIZE MEGABYTE(5) -@@ -26,6 +27,7 @@ - - class cFileWriter : public cThread { - private: -+ cTtxtSubsRecorderBase *ttxtSubsRecorder; - cRemux *remux; - cFileName *fileName; - cIndexFile *index; -@@ -38,13 +40,14 @@ private: - protected: - virtual void Action(void); - public: -- cFileWriter(const char *FileName, cRemux *Remux); -+ cFileWriter(const char *FileName, cRemux *Remux, cTtxtSubsRecorderBase *tsr); - virtual ~cFileWriter(); - }; - --cFileWriter::cFileWriter(const char *FileName, cRemux *Remux) -+cFileWriter::cFileWriter(const char *FileName, cRemux *Remux, cTtxtSubsRecorderBase *tsr) - :cThread("file writer") - { -+ ttxtSubsRecorder = tsr; - fileName = NULL; - remux = Remux; - index = NULL; -@@ -67,6 +70,8 @@ cFileWriter::~cFileWriter() - Cancel(3); - delete index; - delete fileName; -+ if (ttxtSubsRecorder) -+ delete ttxtSubsRecorder; - } - - bool cFileWriter::RunningLowOnDiskSpace(void) -@@ -111,6 +116,16 @@ void cFileWriter::Action(void) - } - fileSize += Count; - remux->Del(Count); -+ // not sure if the pictureType test is needed, but it seems we can get -+ // incomplete pes packets from remux if we are not getting pictures? -+ if (ttxtSubsRecorder && pictureType != NO_PICTURE) { -+ uint8_t *subsp; -+ size_t len; -+ if (ttxtSubsRecorder->GetPacket(&subsp, &len)) { -+ recordFile->Write(subsp, len); -+ fileSize += len; -+ } -+ } - } - else - break; -@@ -126,7 +141,7 @@ void cFileWriter::Action(void) - - // --- cRecorder ------------------------------------------------------------- - --cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids) -+cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, cTtxtSubsRecorderBase *tsr) - :cReceiver(ChannelID, Priority, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids) - ,cThread("recording") - { -@@ -137,7 +152,7 @@ cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, i - ringBuffer = new cRingBufferLinear(RECORDERBUFSIZE, TS_SIZE * 2, true, "Recorder"); - ringBuffer->SetTimeouts(0, 100); - remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids, true); -- writer = new cFileWriter(FileName, remux); -+ writer = new cFileWriter(FileName, remux, tsr); - } - - cRecorder::~cRecorder() -diff --git a/recorder.h b/recorder.h -index 920d909..0211c97 100644 ---- a/recorder.h -+++ b/recorder.h -@@ -15,6 +15,7 @@ - #include "remux.h" - #include "ringbuffer.h" - #include "thread.h" -+#include "vdrttxtsubshooks.h" - - class cFileWriter; - -@@ -28,7 +29,7 @@ protected: - virtual void Receive(uchar *Data, int Length); - virtual void Action(void); - public: -- cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids); -+ cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, cTtxtSubsRecorderBase *tsr); - // Creates a new recorder for the channel with the given ChannelID and - // the given Priority that will record the given PIDs into the file FileName. - virtual ~cRecorder(); -diff --git a/vdrttxtsubshooks.c b/vdrttxtsubshooks.c -new file mode 100644 -index 0000000..4c1836b ---- /dev/null -+++ b/vdrttxtsubshooks.c -@@ -0,0 +1,44 @@ -+ -+#include <stdlib.h> -+#include <stdio.h> -+#include <stdint.h> -+ -+#include "vdrttxtsubshooks.h" -+ -+// XXX Really should be a list... -+static cVDRTtxtsubsHookListener *gListener; -+ -+// ------ class cVDRTtxtsubsHookProxy ------ -+ -+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 cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch) -+ { if(gListener) return gListener->NewTtxtSubsRecorder(dev, ch); else return NULL; }; -+}; -+ -+ -+// ------ class cVDRTtxtsubsHookListener ------ -+ -+cVDRTtxtsubsHookListener::~cVDRTtxtsubsHookListener() -+{ -+ gListener = 0; -+} -+ -+void cVDRTtxtsubsHookListener::HookAttach(void) -+{ -+ gListener = this; -+ //printf("cVDRTtxtsubsHookListener::HookAttach\n"); -+} -+ -+static cVDRTtxtsubsHookProxy gProxy; -+ -+cVDRTtxtsubsHookListener *cVDRTtxtsubsHookListener::Hook(void) -+{ -+ return &gProxy; -+} -+ -diff --git a/vdrttxtsubshooks.h b/vdrttxtsubshooks.h -new file mode 100644 -index 0000000..cfcd6a5 ---- /dev/null -+++ b/vdrttxtsubshooks.h -@@ -0,0 +1,36 @@ -+ -+#ifndef __VDRTTXTSUBSHOOKS_H -+#define __VDRTTXTSUBSHOOKS_H -+ -+class cDevice; -+class cChannel; -+ -+#define VDRTTXTSUBSHOOKS -+ -+class cTtxtSubsRecorderBase { -+ public: -+ virtual ~cTtxtSubsRecorderBase() {}; -+ -+ // returns a PES packet if there is data to add to the recording -+ virtual uint8_t *GetPacket(uint8_t **buf, size_t *len) { return NULL; }; -+ virtual void DeviceAttach(void) {}; -+}; -+ -+class cVDRTtxtsubsHookListener { -+ public: -+ cVDRTtxtsubsHookListener(void) {}; -+ virtual ~cVDRTtxtsubsHookListener(); -+ -+ void HookAttach(void); -+ -+ virtual void HideOSD(void) {}; -+ virtual void ShowOSD(void) {}; -+ virtual void PlayerTeletextData(uint8_t *p, int length) {}; -+ virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch) -+ { return NULL; }; -+ -+ // used by VDR to call hook listeners -+ static cVDRTtxtsubsHookListener *Hook(void); -+}; -+ -+#endif diff --git a/patches/vdr-1.7.2-ttxtsubs.patch b/patches/vdr-1.7.2-ttxtsubs.patch deleted file mode 100644 index bb34c58..0000000 --- a/patches/vdr-1.7.2-ttxtsubs.patch +++ /dev/null @@ -1,289 +0,0 @@ -diff --git a/Makefile b/Makefile -index c6efa37..0ef42e1 100644 ---- a/Makefile -+++ b/Makefile -@@ -43,6 +43,8 @@ OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o d - skinclassic.o skins.o skinsttng.o sources.o spu.o status.o svdrp.o themes.o thread.o\ - timers.o tools.o transfer.o vdr.o videodir.o - -+OBJS += vdrttxtsubshooks.o -+ - ifndef NO_KBD - DEFINES += -DREMOTE_KBD - endif -diff --git a/dvbplayer.c b/dvbplayer.c -index 0fe8d34..3ff4d4c 100644 ---- a/dvbplayer.c -+++ b/dvbplayer.c -@@ -14,6 +14,33 @@ - #include "ringbuffer.h" - #include "thread.h" - #include "tools.h" -+#include "vdrttxtsubshooks.h" -+ -+static void StripExtendedPackets(uchar *b, int Length) -+{ -+ for (int i = 0; i < Length - 6; i++) { -+ if (b[i] == 0x00 && b[i + 1] == 0x00 && b[i + 2] == 0x01) { -+ uchar c = b[i + 3]; -+ int l = b[i + 4] * 256 + b[i + 5] + 6; -+ switch (c) { -+ case 0xBD: // dolby -+ // EBU Teletext data, ETSI EN 300 472 -+ if (b[i + 8] == 0x24 && b[i + 45] >= 0x10 && b[i + 45] < 0x20) { -+ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData(&b[i], l); -+ // continue with deleting the data - otherwise it disturbs DVB replay -+ int n = l; -+ for (int j = i; j < Length && n--; j++) -+ b[j] = 0x00; -+ } -+ break; -+ default: -+ break; -+ } -+ if (l) -+ i += l - 1; // the loop increments, too! -+ } -+ } -+} - - // --- cBackTrace ------------------------------------------------------------ - -@@ -503,6 +530,7 @@ void cDvbPlayer::Action(void) - } - } - if (p) { -+ StripExtendedPackets(p, pc); - int w = PlayPes(p, pc, playMode != pmPlay); - if (w > 0) { - p += w; -diff --git a/menu.c b/menu.c -index 58ea2dd..5a3c6fa 100644 ---- a/menu.c -+++ b/menu.c -@@ -29,6 +29,7 @@ - #include "timers.h" - #include "transfer.h" - #include "videodir.h" -+#include "vdrttxtsubshooks.h" - - #define MAXWAIT4EPGINFO 3 // seconds - #define MODETIMEOUT 3 // seconds -@@ -3751,8 +3752,10 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause) - isyslog("record %s", fileName); - if (MakeDirs(fileName, true)) { - const cChannel *ch = timer->Channel(); -- recorder = new cRecorder(fileName, ch->GetChannelID(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids()); -+ cTtxtSubsRecorderBase *subsRecorder = cVDRTtxtsubsHookListener::Hook()->NewTtxtSubsRecorder(device, ch); -+ recorder = new cRecorder(fileName, ch->GetChannelID(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids(), subsRecorder); - if (device->AttachReceiver(recorder)) { -+ if (subsRecorder) subsRecorder->DeviceAttach(); - Recording.WriteInfo(); - cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true); - if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() -diff --git a/osd.c b/osd.c -index 925d605..3a955bc 100644 ---- a/osd.c -+++ b/osd.c -@@ -15,6 +15,7 @@ - #include <sys/stat.h> - #include <sys/unistd.h> - #include "tools.h" -+#include "vdrttxtsubshooks.h" - - // --- cPalette -------------------------------------------------------------- - -diff --git a/recorder.c b/recorder.c -index 93424da..4155f45 100644 ---- a/recorder.c -+++ b/recorder.c -@@ -10,6 +10,7 @@ - #include "recorder.h" - #include <stdarg.h> - #include <stdio.h> -+#include <stdint.h> - #include <unistd.h> - #include "shutdown.h" - -@@ -26,6 +27,7 @@ - - class cFileWriter : public cThread { - private: -+ cTtxtSubsRecorderBase *ttxtSubsRecorder; - cRemux *remux; - cFileName *fileName; - cIndexFile *index; -@@ -38,13 +40,14 @@ private: - protected: - virtual void Action(void); - public: -- cFileWriter(const char *FileName, cRemux *Remux); -+ cFileWriter(const char *FileName, cRemux *Remux, cTtxtSubsRecorderBase *tsr); - virtual ~cFileWriter(); - }; - --cFileWriter::cFileWriter(const char *FileName, cRemux *Remux) -+cFileWriter::cFileWriter(const char *FileName, cRemux *Remux, cTtxtSubsRecorderBase *tsr) - :cThread("file writer") - { -+ ttxtSubsRecorder = tsr; - fileName = NULL; - remux = Remux; - index = NULL; -@@ -67,6 +70,8 @@ cFileWriter::~cFileWriter() - Cancel(3); - delete index; - delete fileName; -+ if (ttxtSubsRecorder) -+ delete ttxtSubsRecorder; - } - - bool cFileWriter::RunningLowOnDiskSpace(void) -@@ -111,6 +116,16 @@ void cFileWriter::Action(void) - } - fileSize += Count; - remux->Del(Count); -+ // not sure if the pictureType test is needed, but it seems we can get -+ // incomplete pes packets from remux if we are not getting pictures? -+ if (ttxtSubsRecorder && pictureType != NO_PICTURE) { -+ uint8_t *subsp; -+ size_t len; -+ if (ttxtSubsRecorder->GetPacket(&subsp, &len)) { -+ recordFile->Write(subsp, len); -+ fileSize += len; -+ } -+ } - } - else - break; -@@ -126,7 +141,7 @@ void cFileWriter::Action(void) - - // --- cRecorder ------------------------------------------------------------- - --cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids) -+cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, cTtxtSubsRecorderBase *tsr) - :cReceiver(ChannelID, Priority, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids) - ,cThread("recording") - { -@@ -137,7 +152,7 @@ cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, i - ringBuffer = new cRingBufferLinear(RECORDERBUFSIZE, TS_SIZE * 2, true, "Recorder"); - ringBuffer->SetTimeouts(0, 100); - remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids, true); -- writer = new cFileWriter(FileName, remux); -+ writer = new cFileWriter(FileName, remux, tsr); - } - - cRecorder::~cRecorder() -diff --git a/recorder.h b/recorder.h -index d0ce9bd..ecb6cd4 100644 ---- a/recorder.h -+++ b/recorder.h -@@ -15,6 +15,7 @@ - #include "remux.h" - #include "ringbuffer.h" - #include "thread.h" -+#include "vdrttxtsubshooks.h" - - class cFileWriter; - -@@ -28,7 +29,7 @@ protected: - virtual void Receive(uchar *Data, int Length); - virtual void Action(void); - public: -- cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids); -+ cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids, cTtxtSubsRecorderBase *tsr); - // Creates a new recorder for the channel with the given ChannelID and - // the given Priority that will record the given PIDs into the file FileName. - virtual ~cRecorder(); -diff --git a/vdrttxtsubshooks.c b/vdrttxtsubshooks.c -new file mode 100644 -index 0000000..4c1836b ---- /dev/null -+++ b/vdrttxtsubshooks.c -@@ -0,0 +1,44 @@ -+ -+#include <stdlib.h> -+#include <stdio.h> -+#include <stdint.h> -+ -+#include "vdrttxtsubshooks.h" -+ -+// XXX Really should be a list... -+static cVDRTtxtsubsHookListener *gListener; -+ -+// ------ class cVDRTtxtsubsHookProxy ------ -+ -+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 cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch) -+ { if(gListener) return gListener->NewTtxtSubsRecorder(dev, ch); else return NULL; }; -+}; -+ -+ -+// ------ class cVDRTtxtsubsHookListener ------ -+ -+cVDRTtxtsubsHookListener::~cVDRTtxtsubsHookListener() -+{ -+ gListener = 0; -+} -+ -+void cVDRTtxtsubsHookListener::HookAttach(void) -+{ -+ gListener = this; -+ //printf("cVDRTtxtsubsHookListener::HookAttach\n"); -+} -+ -+static cVDRTtxtsubsHookProxy gProxy; -+ -+cVDRTtxtsubsHookListener *cVDRTtxtsubsHookListener::Hook(void) -+{ -+ return &gProxy; -+} -+ -diff --git a/vdrttxtsubshooks.h b/vdrttxtsubshooks.h -new file mode 100644 -index 0000000..cfcd6a5 ---- /dev/null -+++ b/vdrttxtsubshooks.h -@@ -0,0 +1,36 @@ -+ -+#ifndef __VDRTTXTSUBSHOOKS_H -+#define __VDRTTXTSUBSHOOKS_H -+ -+class cDevice; -+class cChannel; -+ -+#define VDRTTXTSUBSHOOKS -+ -+class cTtxtSubsRecorderBase { -+ public: -+ virtual ~cTtxtSubsRecorderBase() {}; -+ -+ // returns a PES packet if there is data to add to the recording -+ virtual uint8_t *GetPacket(uint8_t **buf, size_t *len) { return NULL; }; -+ virtual void DeviceAttach(void) {}; -+}; -+ -+class cVDRTtxtsubsHookListener { -+ public: -+ cVDRTtxtsubsHookListener(void) {}; -+ virtual ~cVDRTtxtsubsHookListener(); -+ -+ void HookAttach(void); -+ -+ virtual void HideOSD(void) {}; -+ virtual void ShowOSD(void) {}; -+ virtual void PlayerTeletextData(uint8_t *p, int length) {}; -+ virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch) -+ { return NULL; }; -+ -+ // used by VDR to call hook listeners -+ static cVDRTtxtsubsHookListener *Hook(void); -+}; -+ -+#endif @@ -45,8 +45,8 @@ #include "ttxtsubspagemenu.h" #include "ttxtsubschannelsettings.h" -#if defined(APIVERSNUM) && APIVERSNUM < 10600 -#error "This version of ttxtsubs only works with vdr version >= 1.6.0!" +#if defined(APIVERSNUM) && APIVERSNUM < 10706 +#error "This version of ttxtsubs only works with vdr version >= 1.7.6!" #endif static const char *VERSION = "0.1.0"; |