From 19e3057f34d9c097c8c6bad30188b14d80b7a242 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 27 Oct 2019 19:27:09 +0200 Subject: [PATCH] Added an option to enable/disable frontend reuse. --- HISTORY | 4 +++ README | 84 ++++++++++++++++++++++++++++------------------------- config.c | 1 + config.h | 3 ++ device.c | 4 +-- po/ca_ES.po | 12 ++++++-- po/de_DE.po | 12 ++++++-- po/es_ES.po | 12 ++++++-- po/fi_FI.po | 14 ++++++--- po/pl_PL.po | 12 ++++++-- satip.c | 4 ++- setup.c | 9 +++++- setup.h | 1 + 13 files changed, 112 insertions(+), 60 deletions(-) diff --git a/HISTORY b/HISTORY index d49421d..12d1a5a 100644 --- a/HISTORY +++ b/HISTORY @@ -207,3 +207,7 @@ VDR Plugin 'satip' Revision History - Fixed memory leak in cSatipSectionFilter (Thanks to Alexander Pipelka). - Added more robust section filter handling (Thanks to Alexander Pipelka). - Added a command line parameter for the RTP receive buffer size (Thanks to Stefan Rehm). + +2019-XX-XX: Version 2.4.1 + +- Added an option to enable/disable frontend reuse. diff --git a/README b/README index add7443..436850e 100644 --- a/README +++ b/README @@ -86,46 +86,50 @@ Valid range: 1 ... 99 Setup menu: -- Operating mode = off If you want exclude all SAT>IP devices - low from VDR's device handling, set this - normal option to "off". Otherwise, if you want - high to keep SAT>IP at a low priority when - selecting available devices, set this - option to "low". Similarly, the "high" - value prefers the SAT>IP over the local - DVB cards when selecting available devices. -- Use CI extension = no If you want to use the CI extension found - in some SAT>IP hardware (e.g. Digital - Devices OctopusNet), set this option to - "yes". -- CICAM # = If you want to assign a CA system into - a specific CI slot, set this option to - a named one. Use "---" for autoselection. -- Enable EPG scanning = yes If you want exclude all SAT>IP devices - from VDR's EIT background scanning, set - this option to "no". -- Disabled sources = none If your SAT>IP servers don't have certain - satellite positions available you can - disable them via this option. -- Disabled filters = none Certain section filters might cause some - unwanted behaviour to VDR such as time - being falsely synchronized etc. This option - allows creation of blacklists of ill-behaving - filters. If this option is set to a non-zero - value, the menu page will contain that many - "Disable filter" options which allow you - to disable the individual section filters. - Valid range: "none" = 0 ... 7 -- Transport mode = unicast If you want to use the non-standard - multicast RTP-over-TCP transport mode, set this option - rtp-o-tcp accordingly. Otherwise, the transport - mode will be RTP-over-UDP via unicast or - multicast. -- [Red:Scan] Forces network scanning of SAT>IP hardware. -- [Yellow:Devices] Opens SAT>IP device status menu. -- [Blue:Info] Opens SAT>IP information/statistics menu. -- [Ok] Opens information menu of selected SAT>IP - device. +- Operating mode = off If you want exclude all SAT>IP devices + low from VDR's device handling, set this + normal option to "off". Otherwise, if you want + high to keep SAT>IP at a low priority when + selecting available devices, set this + option to "low". Similarly, the "high" + value prefers the SAT>IP over the local + DVB cards when selecting available devices. +- Use CI extension = no If you want to use the CI extension found + in some SAT>IP hardware (e.g. Digital + Devices OctopusNet), set this option to + "yes". +- CICAM # = If you want to assign a CA system into + a specific CI slot, set this option to + a named one. Use "---" for autoselection. +- Enable EPG scanning = yes If you want exclude all SAT>IP devices + from VDR's EIT background scanning, set + this option to "no". +- Disabled sources = none If your SAT>IP servers don't have certain + satellite positions available you can + disable them via this option. +- Disabled filters = none Certain section filters might cause some + unwanted behaviour to VDR such as time + being falsely synchronized etc. This option + allows creation of blacklists of ill-behaving + filters. If this option is set to a non-zero + value, the menu page will contain that many + "Disable filter" options which allow you + to disable the individual section filters. + Valid range: "none" = 0 ... 7 +- Transport mode = unicast If you want to use the non-standard + multicast RTP-over-TCP transport mode, set this option + rtp-o-tcp accordingly. Otherwise, the transport + mode will be RTP-over-UDP via unicast or + multicast. +- Enable frontend reuse = yes Certain devices might have artifacts if + multiple channels are assigned to the same + frontend. If you want to avoid such a + frontend assignment, set this option to "no". +- [Red:Scan] Forces network scanning of SAT>IP hardware. +- [Yellow:Devices] Opens SAT>IP device status menu. +- [Blue:Info] Opens SAT>IP information/statistics menu. +- [Ok] Opens information menu of selected SAT>IP + device. Information menu: diff --git a/config.c b/config.c index 05dc44e..149cd8d 100644 --- a/config.c +++ b/config.c @@ -15,6 +15,7 @@ cSatipConfig::cSatipConfig(void) : operatingModeM(eOperatingModeLow), traceModeM(eTraceModeNormal), ciExtensionM(0), + frontendReuseM(1), eitScanM(1), useBytesM(1), portRangeStartM(0), diff --git a/config.h b/config.h index 394fc8a..1bb1baa 100644 --- a/config.h +++ b/config.h @@ -17,6 +17,7 @@ private: unsigned int operatingModeM; unsigned int traceModeM; unsigned int ciExtensionM; + unsigned int frontendReuseM; unsigned int eitScanM; unsigned int useBytesM; unsigned int portRangeStartM; @@ -74,6 +75,7 @@ public: unsigned int GetTraceMode(void) const { return traceModeM; } bool IsTraceMode(eTraceMode modeP) const { return (traceModeM & modeP); } unsigned int GetCIExtension(void) const { return ciExtensionM; } + unsigned int GetFrontendReuse(void) const { return frontendReuseM; } int GetCICAM(unsigned int indexP) const; unsigned int GetEITScan(void) const { return eitScanM; } unsigned int GetUseBytes(void) const { return useBytesM; } @@ -95,6 +97,7 @@ public: void SetOperatingMode(unsigned int operatingModeP) { operatingModeM = operatingModeP; } void SetTraceMode(unsigned int modeP) { traceModeM = (modeP & eTraceModeMask); } void SetCIExtension(unsigned int onOffP) { ciExtensionM = onOffP; } + void SetFrontendReuse(unsigned int onOffP) { frontendReuseM = onOffP; } void SetCICAM(unsigned int indexP, int cicamP); void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; } void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; } diff --git a/device.c b/device.c index 830fa9b..5cd8000 100644 --- a/device.c +++ b/device.c @@ -295,10 +295,10 @@ bool cSatipDevice::ProvidesChannel(const cChannel *channelP, int priorityP, bool result = true; } else - result = true; + result = !!SatipConfig.GetFrontendReuse(); } else - needsDetachReceivers = Receiving(); + needsDetachReceivers = true; } } } diff --git a/po/ca_ES.po b/po/ca_ES.po index 68e9ee5..d7c531a 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -1,5 +1,5 @@ # VDR plugin language source file. -# Copyright (C) 2007-2018 Rolf Ahrenberg +# Copyright (C) 2007-2019 Rolf Ahrenberg # This file is distributed under the same license as the satip package. # Gabriel Bonich, 2014-2017 # @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: vdr-satip 2.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" -"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" +"POT-Creation-Date: 2019-10-27 19:12+0200\n" +"PO-Revision-Date: 2019-10-27 10:27+0200\n" "Last-Translator: Gabriel Bonich \n" "Language-Team: Catalan \n" "Language: ca\n" @@ -196,6 +196,12 @@ msgid "" "Unicast, Multicast, RTP-over-TCP" msgstr "" +msgid "Enable frontend reuse" +msgstr "" + +msgid "Define whether reusing a frontend for multiple channels in a transponder should be enabled." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Activa SAT>IP servers:" diff --git a/po/de_DE.po b/po/de_DE.po index 93650e1..18b5be8 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -1,5 +1,5 @@ # VDR plugin language source file. -# Copyright (C) 2007-2018 Rolf Ahrenberg +# Copyright (C) 2007-2019 Rolf Ahrenberg # This file is distributed under the same license as the satip package. # Frank Neumann, 2014-2017 # @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: vdr-satip 2.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" -"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" +"POT-Creation-Date: 2019-10-27 19:12+0200\n" +"PO-Revision-Date: 2019-10-27 10:27+0200\n" "Last-Translator: Frank Neumann \n" "Language-Team: German \n" "Language: de\n" @@ -199,6 +199,12 @@ msgstr "" "\n" "Unicast, Multicast, RTP-over-TCP" +msgid "Enable frontend reuse" +msgstr "" + +msgid "Define whether reusing a frontend for multiple channels in a transponder should be enabled." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Aktive SAT>IP Server:" diff --git a/po/es_ES.po b/po/es_ES.po index 4a0ea81..35e044f 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -1,5 +1,5 @@ # VDR plugin language source file. -# Copyright (C) 2007-2018 Rolf Ahrenberg +# Copyright (C) 2007-2019 Rolf Ahrenberg # This file is distributed under the same license as the satip package. # Gabriel Bonich, 2014-2017 # @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: vdr-satip 2.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" -"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" +"POT-Creation-Date: 2019-10-27 19:12+0200\n" +"PO-Revision-Date: 2019-10-27 10:27+0200\n" "Last-Translator: Gabriel Bonich \n" "Language-Team: Spanish \n" "Language: es\n" @@ -196,6 +196,12 @@ msgid "" "Unicast, Multicast, RTP-over-TCP" msgstr "" +msgid "Enable frontend reuse" +msgstr "" + +msgid "Define whether reusing a frontend for multiple channels in a transponder should be enabled." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Activa SAT>IP servers:" diff --git a/po/fi_FI.po b/po/fi_FI.po index 0958735..3956d3c 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -1,14 +1,14 @@ # VDR plugin language source file. -# Copyright (C) 2007-2018 Rolf Ahrenberg +# Copyright (C) 2007-2019 Rolf Ahrenberg # This file is distributed under the same license as the satip package. -# Rolf Ahrenberg, 2015-2017 +# Rolf Ahrenberg, 2015-2019 # msgid "" msgstr "" "Project-Id-Version: vdr-satip 2.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" -"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" +"POT-Creation-Date: 2019-10-27 19:12+0200\n" +"PO-Revision-Date: 2019-10-27 10:27+0200\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: Finnish \n" "Language: fi\n" @@ -198,6 +198,12 @@ msgstr "" "\n" "Unicast, Multicast, RTP-over-TCP" +msgid "Enable frontend reuse" +msgstr "Uusiokäytä virittimiä" + +msgid "Define whether reusing a frontend for multiple channels in a transponder should be enabled." +msgstr "Määrittele virittien uusiokäyttö kanaville, jotka ovat samalla transponderilla." + msgid "Active SAT>IP servers:" msgstr "Aktiiviset SAT>IP-palvelimet:" diff --git a/po/pl_PL.po b/po/pl_PL.po index cefd2c4..47dad31 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -1,5 +1,5 @@ # VDR plugin language source file. -# Copyright (C) 2007-2018 Rolf Ahrenberg +# Copyright (C) 2007-2019 Rolf Ahrenberg # This file is distributed under the same license as the vdr-satip package. # Tomasz Maciej Nowak, 2017 # @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: vdr-satip 2.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" -"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" +"POT-Creation-Date: 2019-10-27 19:12+0200\n" +"PO-Revision-Date: 2019-10-27 10:27+0200\n" "Last-Translator: Tomasz Maciej Nowak \n" "Language-Team: Polish \n" "Language: pl_PL\n" @@ -199,6 +199,12 @@ msgstr "" "Określa tryb transmisji.\n" "Unicast, Multicast, RTP-over-TCP." +msgid "Enable frontend reuse" +msgstr "" + +msgid "Define whether reusing a frontend for multiple channels in a transponder should be enabled." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Aktywne serwery SAT>IP:" diff --git a/satip.c b/satip.c index cfa61ad..433952f 100644 --- a/satip.c +++ b/satip.c @@ -28,7 +28,7 @@ #define GITVERSION "" #endif - const char VERSION[] = "2.4.0" GITVERSION; + const char VERSION[] = "2.4.1" GITVERSION; static const char DESCRIPTION[] = trNOOP("SAT>IP Devices"); class cPluginSatip : public cPlugin { @@ -392,6 +392,8 @@ bool cPluginSatip::SetupParse(const char *nameP, const char *valueP) SatipConfig.SetOperatingMode(atoi(valueP)); else if (!strcasecmp(nameP, "EnableCIExtension")) SatipConfig.SetCIExtension(atoi(valueP)); + else if (!strcasecmp(nameP, "EnableFrontendReuse")) + SatipConfig.SetFrontendReuse(atoi(valueP)); else if (!strcasecmp(nameP, "CICAM")) { int Cicams[MAX_CICAM_COUNT]; for (unsigned int i = 0; i < ELEMENTS(Cicams); ++i) diff --git a/setup.c b/setup.c index baa4d57..d136e57 100644 --- a/setup.c +++ b/setup.c @@ -347,6 +347,7 @@ cSatipPluginSetup::cSatipPluginSetup() operatingModeM(SatipConfig.GetOperatingMode()), transportModeM(SatipConfig.GetTransportMode()), ciExtensionM(SatipConfig.GetCIExtension()), + frontendReuseM(SatipConfig.GetFrontendReuse()), eitScanM(SatipConfig.GetEITScan()), numDisabledSourcesM(SatipConfig.GetDisabledSourcesCount()), numDisabledFiltersM(SatipConfig.GetDisabledFiltersCount()) @@ -418,6 +419,10 @@ void cSatipPluginSetup::Setup(void) } Add(new cMenuEditStraItem(tr("Transport mode"), &transportModeM, ELEMENTS(transportModeTextsM), transportModeTextsM)); helpM.Append(tr("Define which transport mode shall be used.\n\nUnicast, Multicast, RTP-over-TCP")); + + Add(new cMenuEditBoolItem(tr("Enable frontend reuse"), &frontendReuseM)); + helpM.Append(tr("Define whether reusing a frontend for multiple channels in a transponder should be enabled.")); + Add(new cOsdItem(tr("Active SAT>IP servers:"), osUnknown, false)); helpM.Append(""); @@ -479,6 +484,7 @@ eOSState cSatipPluginSetup::ProcessKey(eKeys keyP) bool hadSubMenu = HasSubMenu(); int oldOperatingMode = operatingModeM; int oldCiExtension = ciExtensionM; + int oldFrontendReuse = frontendReuseM; int oldNumDisabledSources = numDisabledSourcesM; int oldNumDisabledFilters = numDisabledFiltersM; eOSState state = cMenuSetupPage::ProcessKey(keyP); @@ -504,7 +510,7 @@ eOSState cSatipPluginSetup::ProcessKey(eKeys keyP) if ((keyP == kNone) && (cSatipDiscover::GetInstance()->GetServers()->Count() != deviceCountM)) Setup(); - if ((keyP != kNone) && ((numDisabledSourcesM != oldNumDisabledSources) || (numDisabledFiltersM != oldNumDisabledFilters) || (operatingModeM != oldOperatingMode) || (ciExtensionM != oldCiExtension) || (detachedModeM != SatipConfig.GetDetachedMode()))) { + if ((keyP != kNone) && ((numDisabledSourcesM != oldNumDisabledSources) || (numDisabledFiltersM != oldNumDisabledFilters) || (operatingModeM != oldOperatingMode) || (ciExtensionM != oldCiExtension) || ( oldFrontendReuse != frontendReuseM) || (detachedModeM != SatipConfig.GetDetachedMode()))) { while ((numDisabledSourcesM < oldNumDisabledSources) && (oldNumDisabledSources > 0)) disabledSourcesM[--oldNumDisabledSources] = cSource::stNone; while ((numDisabledFiltersM < oldNumDisabledFilters) && (oldNumDisabledFilters > 0)) @@ -569,6 +575,7 @@ void cSatipPluginSetup::Store(void) SetupStore("OperatingMode", operatingModeM); SetupStore("TransportMode", transportModeM); SetupStore("EnableCIExtension", ciExtensionM); + SetupStore("EnableFrontendReuse", frontendReuseM); SetupStore("EnableEITScan", eitScanM); StoreCicams("CICAM", cicamsM); StoreSources("DisabledSources", disabledSourcesM); diff --git a/setup.h b/setup.h index e97ce2f..28c60ab 100644 --- a/setup.h +++ b/setup.h @@ -22,6 +22,7 @@ private: const char *operatingModeTextsM[cSatipConfig::eOperatingModeCount]; const char *transportModeTextsM[cSatipConfig::eTransportModeCount]; int ciExtensionM; + int frontendReuseM; int cicamsM[MAX_CICAM_COUNT]; const char *cicamTextsM[CA_SYSTEMS_TABLE_SIZE]; int eitScanM;