From b38af9121cc2c288473ba4239585cefb5f9b0f93 Mon Sep 17 00:00:00 2001 From: Udo Richter Date: Tue, 3 Apr 2012 20:34:53 +0200 Subject: Adding VDR 1.7.27 compatibility (Closes #918, Credit goes to nox and gda from vdrportal.de) --- HISTORY | 4 ++++ osdteletext.c | 2 +- txtrecv.c | 14 +++++++++++--- txtrecv.h | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/HISTORY b/HISTORY index 0ee2d84..b11beda 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,10 @@ VDR Plugin 'osdteletext' Revision History ----------------------------------------- +2012-04-03: version 0.9.3 + - VDR 1.7.27 compatibility (Closes #919), Credit goes to nox and gda fro + vdrportal.de + 2012-03-25: version 0.9.2 - Some code refactorings (Thx to Ville Skyttä) - FF card transfer mode on channel switch with VDR >= 1.7.25 (Closes: #9) diff --git a/osdteletext.c b/osdteletext.c index 7845c39..c6cd090 100644 --- a/osdteletext.c +++ b/osdteletext.c @@ -25,7 +25,7 @@ using namespace std; #error "VDR-1.6.0 API version or greater is required!" #endif -static const char *VERSION = "0.9.2"; +static const char *VERSION = "0.9.3"; static const char *DESCRIPTION = trNOOP("Displays teletext on the OSD"); static const char *MAINMENUENTRY = trNOOP("Teletext"); diff --git a/txtrecv.c b/txtrecv.c index 3dc89f6..3c47ced 100644 --- a/txtrecv.c +++ b/txtrecv.c @@ -518,7 +518,7 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber int TPid = newLiveChannel->Tpid(); if (TPid) { - receiver = new cTxtReceiver(TPid, newLiveChannel->GetChannelID(), storeTopText, storage); + receiver = new cTxtReceiver(newLiveChannel, storeTopText, storage); cDevice::ActualDevice()->AttachReceiver(receiver); } @@ -526,10 +526,18 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber } -cTxtReceiver::cTxtReceiver(int TPid, tChannelID chan, bool storeTopText, Storage* storage) - : cReceiver(chan, -1, TPid), cThread("osdteletext-receiver"), +cTxtReceiver::cTxtReceiver(const cChannel* chan, bool storeTopText, Storage* storage) +#if APIVERSNUM >= 10712 + : cReceiver(chan, -1), cThread("osdteletext-receiver"), +#else + : cReceiver(chan, -1, chan->Tpid()), cThread("osdteletext-receiver"), +#endif TxtPage(0), storeTopText(storeTopText), buffer((188+60)*75), storage(storage) { +#if APIVERSNUM >= 10712 + SetPids(NULL); + AddPid(chan->Tpid()); +#endif storage->prepareDirectory(ChannelID()); // 10 ms timeout on getting TS frames diff --git a/txtrecv.h b/txtrecv.h index a111d0d..3468b6e 100644 --- a/txtrecv.h +++ b/txtrecv.h @@ -165,7 +165,7 @@ protected: virtual void Receive(uchar *Data, int Length); virtual void Action(); public: - cTxtReceiver(int TPid, tChannelID chan, bool storeTopText, Storage* storage); + cTxtReceiver(const cChannel* chan, bool storeTopText, Storage* storage); virtual ~cTxtReceiver(); virtual void Stop(); }; -- cgit v1.2.3