diff --git a/HISTORY b/HISTORY index 8ad877e..af164c1 100644 --- a/HISTORY +++ b/HISTORY @@ -525,3 +525,12 @@ VDR Plugin 'femon' Revision History - Got rid of FEMON_DEBUG. - Added support for tracing modes. - Removed the 'femonclient' plugin. + + +=================================== +VDR Plugin 'femon' Revision History +=================================== + +2015-XX-XX: Version 2.3.0 + +- Updated for vdr-2.3.1. diff --git a/femon.c b/femon.c index 91b4846..faa9d20 100644 --- a/femon.c +++ b/femon.c @@ -17,15 +17,15 @@ #include "tools.h" #include "setup.h" -#if defined(APIVERSNUM) && APIVERSNUM < 20200 -#error "VDR-2.2.0 API version or greater is required!" +#if defined(APIVERSNUM) && APIVERSNUM < 20301 +#error "VDR-2.3.1 API version or greater is required!" #endif #ifndef GITVERSION #define GITVERSION "" #endif -static const char VERSION[] = "2.2.1" GITVERSION; +static const char VERSION[] = "2.3.0" GITVERSION; static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)"); static const char MAINMENUENTRY[] = trNOOP("Signal Information"); @@ -120,7 +120,8 @@ cOsdObject *cPluginFemon::MainMenuAction(void) { // Perform the action when selected from the main VDR menu. debug1("%s", __PRETTY_FUNCTION__); - if (cControl::Control() || (Channels.Count() <= 0)) + LOCK_CHANNELS_READ; + if (cControl::Control() || (Channels->Count() <= 0)) Skins.Message(mtInfo, tr("Femon not available")); else return cFemonOsd::Instance(true); diff --git a/osd.c b/osd.c index 7158642..f6baaac 100644 --- a/osd.c +++ b/osd.c @@ -250,7 +250,8 @@ cFemonOsd::~cFemonOsd(void) void cFemonOsd::DrawStatusWindow(void) { cMutexLock lock(&mutexM); - cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (osdM && channel) { cBitmap *bm = NULL; @@ -394,7 +395,8 @@ void cFemonOsd::DrawStatusWindow(void) void cFemonOsd::DrawInfoWindow(void) { cMutexLock lock(&mutexM); - cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (osdM && channel) { int offset = 0; @@ -716,7 +718,8 @@ void cFemonOsd::Show(void) { debug1("%s", __PRETTY_FUNCTION__); eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); deviceSourceM = DEVICESOURCE_DVBAPI; if (channel) { @@ -784,7 +787,8 @@ void cFemonOsd::ChannelSwitch(const cDevice * deviceP, int channelNumberP, bool { debug1("%s (%d, %d, %d)", __PRETTY_FUNCTION__, deviceP->DeviceNumber(), channelNumberP, liveViewP); eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (!deviceP || !liveViewP) return; @@ -852,7 +856,8 @@ void cFemonOsd::SetAudioTrack(int indexP, const char * const *tracksP) DELETENULL(receiverM); } if (FemonConfig.GetAnalyzeStream()) { - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (channel) { receiverM = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0); cDevice::ActualDevice()->AttachReceiver(receiverM); @@ -866,7 +871,8 @@ bool cFemonOsd::DeviceSwitch(int directionP) int device = cDevice::ActualDevice()->DeviceNumber(); int direction = sgn(directionP); if (device >= 0) { - cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (channel) { for (int i = 0; i < cDevice::NumDevices() - 1; i++) { if (direction >= 0) { @@ -978,7 +984,8 @@ bool cFemonOsd::SvdrpConnect(void) bool cFemonOsd::SvdrpTune(void) { if (svdrpPluginM && svdrpConnectionM.handle >= 0) { - cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (channel) { SvdrpCommand_v1_0 cmd; cmd.handle = svdrpConnectionM.handle; @@ -1038,7 +1045,8 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP) if ((numberM == 0) && (oldNumberM != 0)) { numberM = oldNumberM; oldNumberM = cDevice::CurrentChannel(); - Channels.SwitchTo(numberM); + LOCK_CHANNELS_READ; + Channels->SwitchTo(numberM); numberM = 0; return osContinue; } @@ -1047,11 +1055,12 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP) numberM = numberM * 10 + keyP - k0; if (numberM > 0) { DrawStatusWindow(); - cChannel *ch = Channels.GetByNumber(numberM); + LOCK_CHANNELS_READ; + const cChannel *ch = Channels->GetByNumber(numberM); inputTimeM.Set(0); // Lets see if there can be any useful further input: int n = ch ? numberM * 10 : 0; - while (ch && (ch = Channels.Next(ch)) != NULL) { + while (ch && (ch = Channels->Next(ch)) != NULL) { if (!ch->GroupSep()) { if (n <= ch->Number() && ch->Number() <= n + 9) { n = 0; @@ -1064,7 +1073,7 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP) if (n > 0) { // This channel is the only one that fits the input, so let's take it right away: oldNumberM = cDevice::CurrentChannel(); - Channels.SwitchTo(numberM); + Channels->SwitchTo(numberM); numberM = 0; } } @@ -1124,9 +1133,10 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP) break; case kNone: if (numberM && (inputTimeM.Elapsed() > CHANNELINPUT_TIMEOUT)) { - if (Channels.GetByNumber(numberM)) { + LOCK_CHANNELS_READ; + if (Channels->GetByNumber(numberM)) { oldNumberM = cDevice::CurrentChannel(); - Channels.SwitchTo(numberM); + Channels->SwitchTo(numberM); numberM = 0; } else { @@ -1138,7 +1148,8 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP) case kOk: { // toggle between display modes - cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (++displayModeM == eFemonModeAC3 && channel && !channel->Dpid(0)) displayModeM++; if (displayModeM >= eFemonModeMaxNumber) displayModeM = 0; DrawInfoWindow(); diff --git a/po/de_DE.po b/po/de_DE.po index 5dd2004..92f9e2d 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/es_ES.po b/po/es_ES.po index b93f35f..ce68781 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/et_EE.po b/po/et_EE.po index d114787..fde546c 100644 --- a/po/et_EE.po +++ b/po/et_EE.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index 9c936b4..0ac7ed1 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index 531fb23..b49a723 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -7,7 +7,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/hu_HU.po b/po/hu_HU.po index 88a29ca..f913b41 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/it_IT.po b/po/it_IT.po index 8818e2f..af8c8bb 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -6,7 +6,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/lt_LT.po b/po/lt_LT.po index ee2b3fc..9266f18 100644 --- a/po/lt_LT.po +++ b/po/lt_LT.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index ac65c8b..4540479 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/sk_SK.po b/po/sk_SK.po index 5f40aa9..0f6474a 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/uk_UA.po b/po/uk_UA.po index 56efac1..d32ea1e 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -4,7 +4,7 @@ # Yarema aka Knedlyk , 2010. msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index b4b3865..ef80319 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index e7d246d..67f94c6 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 2.2.1\n" +"Project-Id-Version: vdr-femon 2.3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-04 04:04+0300\n" "PO-Revision-Date: 2015-04-04 04:04+0300\n" diff --git a/receiver.c b/receiver.c index 4401dab..c5c1cef 100644 --- a/receiver.c +++ b/receiver.c @@ -101,7 +101,7 @@ void cFemonReceiver::Activate(bool onP) Deactivate(); } -void cFemonReceiver::Receive(uchar *dataP, int lengthP) +void cFemonReceiver::Receive(const uchar *dataP, int lengthP) { // TS packet length: TS_SIZE if (Running() && (*dataP == TS_SYNC_BYTE) && (lengthP == TS_SIZE)) { diff --git a/receiver.h b/receiver.h index c4b5ecf..abd5c6e 100644 --- a/receiver.h +++ b/receiver.h @@ -59,7 +59,7 @@ private: protected: virtual void Activate(bool onP); - virtual void Receive(uchar *dataP, int lengthP); + virtual void Receive(const uchar *dataP, int lengthP); virtual void Action(void); public: diff --git a/tools.c b/tools.c index 3dafc52..9d012cd 100644 --- a/tools.c +++ b/tools.c @@ -110,7 +110,8 @@ cString getFrontendInfo(cDvbDevice *deviceP) uint16_t snr = 0; uint32_t ber = 0; uint32_t unc = 0; - cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel()); if (!deviceP) return info;