Added an option to enable/disable frontend reuse.

This commit is contained in:
Rolf Ahrenberg 2019-10-27 19:27:09 +02:00
parent b697e435d4
commit 19e3057f34
13 changed files with 112 additions and 60 deletions

View File

@ -207,3 +207,7 @@ VDR Plugin 'satip' Revision History
- Fixed memory leak in cSatipSectionFilter (Thanks to Alexander Pipelka). - Fixed memory leak in cSatipSectionFilter (Thanks to Alexander Pipelka).
- Added more robust section filter handling (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). - 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.

84
README
View File

@ -86,46 +86,50 @@ Valid range: 1 ... 99
Setup menu: Setup menu:
- Operating mode = off If you want exclude all SAT>IP devices - Operating mode = off If you want exclude all SAT>IP devices
low from VDR's device handling, set this low from VDR's device handling, set this
normal option to "off". Otherwise, if you want normal option to "off". Otherwise, if you want
high to keep SAT>IP at a low priority when high to keep SAT>IP at a low priority when
selecting available devices, set this selecting available devices, set this
option to "low". Similarly, the "high" option to "low". Similarly, the "high"
value prefers the SAT>IP over the local value prefers the SAT>IP over the local
DVB cards when selecting available devices. DVB cards when selecting available devices.
- Use CI extension = no If you want to use the CI extension found - Use CI extension = no If you want to use the CI extension found
in some SAT>IP hardware (e.g. Digital in some SAT>IP hardware (e.g. Digital
Devices OctopusNet), set this option to Devices OctopusNet), set this option to
"yes". "yes".
- CICAM #<slot> = <system> If you want to assign a CA system into - CICAM #<slot> = <system> If you want to assign a CA system into
a specific CI slot, set this option to a specific CI slot, set this option to
a named one. Use "---" for autoselection. a named one. Use "---" for autoselection.
- Enable EPG scanning = yes If you want exclude all SAT>IP devices - Enable EPG scanning = yes If you want exclude all SAT>IP devices
from VDR's EIT background scanning, set from VDR's EIT background scanning, set
this option to "no". this option to "no".
- Disabled sources = none If your SAT>IP servers don't have certain - Disabled sources = none If your SAT>IP servers don't have certain
satellite positions available you can satellite positions available you can
disable them via this option. disable them via this option.
- Disabled filters = none Certain section filters might cause some - Disabled filters = none Certain section filters might cause some
unwanted behaviour to VDR such as time unwanted behaviour to VDR such as time
being falsely synchronized etc. This option being falsely synchronized etc. This option
allows creation of blacklists of ill-behaving allows creation of blacklists of ill-behaving
filters. If this option is set to a non-zero filters. If this option is set to a non-zero
value, the menu page will contain that many value, the menu page will contain that many
"Disable filter" options which allow you "Disable filter" options which allow you
to disable the individual section filters. to disable the individual section filters.
Valid range: "none" = 0 ... 7 Valid range: "none" = 0 ... 7
- Transport mode = unicast If you want to use the non-standard - Transport mode = unicast If you want to use the non-standard
multicast RTP-over-TCP transport mode, set this option multicast RTP-over-TCP transport mode, set this option
rtp-o-tcp accordingly. Otherwise, the transport rtp-o-tcp accordingly. Otherwise, the transport
mode will be RTP-over-UDP via unicast or mode will be RTP-over-UDP via unicast or
multicast. multicast.
- [Red:Scan] Forces network scanning of SAT>IP hardware. - Enable frontend reuse = yes Certain devices might have artifacts if
- [Yellow:Devices] Opens SAT>IP device status menu. multiple channels are assigned to the same
- [Blue:Info] Opens SAT>IP information/statistics menu. frontend. If you want to avoid such a
- [Ok] Opens information menu of selected SAT>IP frontend assignment, set this option to "no".
device. - [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: Information menu:

View File

@ -15,6 +15,7 @@ cSatipConfig::cSatipConfig(void)
: operatingModeM(eOperatingModeLow), : operatingModeM(eOperatingModeLow),
traceModeM(eTraceModeNormal), traceModeM(eTraceModeNormal),
ciExtensionM(0), ciExtensionM(0),
frontendReuseM(1),
eitScanM(1), eitScanM(1),
useBytesM(1), useBytesM(1),
portRangeStartM(0), portRangeStartM(0),

View File

@ -17,6 +17,7 @@ private:
unsigned int operatingModeM; unsigned int operatingModeM;
unsigned int traceModeM; unsigned int traceModeM;
unsigned int ciExtensionM; unsigned int ciExtensionM;
unsigned int frontendReuseM;
unsigned int eitScanM; unsigned int eitScanM;
unsigned int useBytesM; unsigned int useBytesM;
unsigned int portRangeStartM; unsigned int portRangeStartM;
@ -74,6 +75,7 @@ public:
unsigned int GetTraceMode(void) const { return traceModeM; } unsigned int GetTraceMode(void) const { return traceModeM; }
bool IsTraceMode(eTraceMode modeP) const { return (traceModeM & modeP); } bool IsTraceMode(eTraceMode modeP) const { return (traceModeM & modeP); }
unsigned int GetCIExtension(void) const { return ciExtensionM; } unsigned int GetCIExtension(void) const { return ciExtensionM; }
unsigned int GetFrontendReuse(void) const { return frontendReuseM; }
int GetCICAM(unsigned int indexP) const; int GetCICAM(unsigned int indexP) const;
unsigned int GetEITScan(void) const { return eitScanM; } unsigned int GetEITScan(void) const { return eitScanM; }
unsigned int GetUseBytes(void) const { return useBytesM; } unsigned int GetUseBytes(void) const { return useBytesM; }
@ -95,6 +97,7 @@ public:
void SetOperatingMode(unsigned int operatingModeP) { operatingModeM = operatingModeP; } void SetOperatingMode(unsigned int operatingModeP) { operatingModeM = operatingModeP; }
void SetTraceMode(unsigned int modeP) { traceModeM = (modeP & eTraceModeMask); } void SetTraceMode(unsigned int modeP) { traceModeM = (modeP & eTraceModeMask); }
void SetCIExtension(unsigned int onOffP) { ciExtensionM = onOffP; } void SetCIExtension(unsigned int onOffP) { ciExtensionM = onOffP; }
void SetFrontendReuse(unsigned int onOffP) { frontendReuseM = onOffP; }
void SetCICAM(unsigned int indexP, int cicamP); void SetCICAM(unsigned int indexP, int cicamP);
void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; } void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; }
void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; } void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; }

View File

@ -295,10 +295,10 @@ bool cSatipDevice::ProvidesChannel(const cChannel *channelP, int priorityP, bool
result = true; result = true;
} }
else else
result = true; result = !!SatipConfig.GetFrontendReuse();
} }
else else
needsDetachReceivers = Receiving(); needsDetachReceivers = true;
} }
} }
} }

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # 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. # This file is distributed under the same license as the satip package.
# Gabriel Bonich, 2014-2017 # Gabriel Bonich, 2014-2017
# #
@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-satip 2.4.0\n" "Project-Id-Version: vdr-satip 2.4.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" "POT-Creation-Date: 2019-10-27 19:12+0200\n"
"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" "PO-Revision-Date: 2019-10-27 10:27+0200\n"
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n" "Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
"Language-Team: Catalan <vdr@linuxtv.org>\n" "Language-Team: Catalan <vdr@linuxtv.org>\n"
"Language: ca\n" "Language: ca\n"
@ -196,6 +196,12 @@ msgid ""
"Unicast, Multicast, RTP-over-TCP" "Unicast, Multicast, RTP-over-TCP"
msgstr "" 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:" msgid "Active SAT>IP servers:"
msgstr "Activa SAT>IP servers:" msgstr "Activa SAT>IP servers:"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # 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. # This file is distributed under the same license as the satip package.
# Frank Neumann, 2014-2017 # Frank Neumann, 2014-2017
# #
@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-satip 2.4.0\n" "Project-Id-Version: vdr-satip 2.4.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" "POT-Creation-Date: 2019-10-27 19:12+0200\n"
"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" "PO-Revision-Date: 2019-10-27 10:27+0200\n"
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n" "Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
"Language-Team: German <vdr@linuxtv.org>\n" "Language-Team: German <vdr@linuxtv.org>\n"
"Language: de\n" "Language: de\n"
@ -199,6 +199,12 @@ msgstr ""
"\n" "\n"
"Unicast, Multicast, RTP-over-TCP" "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:" msgid "Active SAT>IP servers:"
msgstr "Aktive SAT>IP Server:" msgstr "Aktive SAT>IP Server:"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # 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. # This file is distributed under the same license as the satip package.
# Gabriel Bonich, 2014-2017 # Gabriel Bonich, 2014-2017
# #
@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-satip 2.4.0\n" "Project-Id-Version: vdr-satip 2.4.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" "POT-Creation-Date: 2019-10-27 19:12+0200\n"
"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" "PO-Revision-Date: 2019-10-27 10:27+0200\n"
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n" "Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
"Language-Team: Spanish <vdr@linuxtv.org>\n" "Language-Team: Spanish <vdr@linuxtv.org>\n"
"Language: es\n" "Language: es\n"
@ -196,6 +196,12 @@ msgid ""
"Unicast, Multicast, RTP-over-TCP" "Unicast, Multicast, RTP-over-TCP"
msgstr "" 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:" msgid "Active SAT>IP servers:"
msgstr "Activa SAT>IP servers:" msgstr "Activa SAT>IP servers:"

View File

@ -1,14 +1,14 @@
# VDR plugin language source file. # 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. # This file is distributed under the same license as the satip package.
# Rolf Ahrenberg, 2015-2017 # Rolf Ahrenberg, 2015-2019
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-satip 2.4.0\n" "Project-Id-Version: vdr-satip 2.4.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" "POT-Creation-Date: 2019-10-27 19:12+0200\n"
"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" "PO-Revision-Date: 2019-10-27 10:27+0200\n"
"Last-Translator: Rolf Ahrenberg\n" "Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n" "Language-Team: Finnish <vdr@linuxtv.org>\n"
"Language: fi\n" "Language: fi\n"
@ -198,6 +198,12 @@ msgstr ""
"\n" "\n"
"Unicast, Multicast, RTP-over-TCP" "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:" msgid "Active SAT>IP servers:"
msgstr "Aktiiviset SAT>IP-palvelimet:" msgstr "Aktiiviset SAT>IP-palvelimet:"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # 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. # This file is distributed under the same license as the vdr-satip package.
# Tomasz Maciej Nowak, 2017 # Tomasz Maciej Nowak, 2017
# #
@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-satip 2.4.0\n" "Project-Id-Version: vdr-satip 2.4.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-04-15 04:15+0300+0300\n" "POT-Creation-Date: 2019-10-27 19:12+0200\n"
"PO-Revision-Date: 2018-04-15 04:15+0300+0300\n" "PO-Revision-Date: 2019-10-27 10:27+0200\n"
"Last-Translator: Tomasz Maciej Nowak <tomek_n@o2.pl>\n" "Last-Translator: Tomasz Maciej Nowak <tomek_n@o2.pl>\n"
"Language-Team: Polish <vdr@linuxtv.org>\n" "Language-Team: Polish <vdr@linuxtv.org>\n"
"Language: pl_PL\n" "Language: pl_PL\n"
@ -199,6 +199,12 @@ msgstr ""
"Określa tryb transmisji.\n" "Określa tryb transmisji.\n"
"Unicast, Multicast, RTP-over-TCP." "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:" msgid "Active SAT>IP servers:"
msgstr "Aktywne serwery SAT>IP:" msgstr "Aktywne serwery SAT>IP:"

View File

@ -28,7 +28,7 @@
#define GITVERSION "" #define GITVERSION ""
#endif #endif
const char VERSION[] = "2.4.0" GITVERSION; const char VERSION[] = "2.4.1" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices"); static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin { class cPluginSatip : public cPlugin {
@ -392,6 +392,8 @@ bool cPluginSatip::SetupParse(const char *nameP, const char *valueP)
SatipConfig.SetOperatingMode(atoi(valueP)); SatipConfig.SetOperatingMode(atoi(valueP));
else if (!strcasecmp(nameP, "EnableCIExtension")) else if (!strcasecmp(nameP, "EnableCIExtension"))
SatipConfig.SetCIExtension(atoi(valueP)); SatipConfig.SetCIExtension(atoi(valueP));
else if (!strcasecmp(nameP, "EnableFrontendReuse"))
SatipConfig.SetFrontendReuse(atoi(valueP));
else if (!strcasecmp(nameP, "CICAM")) { else if (!strcasecmp(nameP, "CICAM")) {
int Cicams[MAX_CICAM_COUNT]; int Cicams[MAX_CICAM_COUNT];
for (unsigned int i = 0; i < ELEMENTS(Cicams); ++i) for (unsigned int i = 0; i < ELEMENTS(Cicams); ++i)

View File

@ -347,6 +347,7 @@ cSatipPluginSetup::cSatipPluginSetup()
operatingModeM(SatipConfig.GetOperatingMode()), operatingModeM(SatipConfig.GetOperatingMode()),
transportModeM(SatipConfig.GetTransportMode()), transportModeM(SatipConfig.GetTransportMode()),
ciExtensionM(SatipConfig.GetCIExtension()), ciExtensionM(SatipConfig.GetCIExtension()),
frontendReuseM(SatipConfig.GetFrontendReuse()),
eitScanM(SatipConfig.GetEITScan()), eitScanM(SatipConfig.GetEITScan()),
numDisabledSourcesM(SatipConfig.GetDisabledSourcesCount()), numDisabledSourcesM(SatipConfig.GetDisabledSourcesCount()),
numDisabledFiltersM(SatipConfig.GetDisabledFiltersCount()) numDisabledFiltersM(SatipConfig.GetDisabledFiltersCount())
@ -418,6 +419,10 @@ void cSatipPluginSetup::Setup(void)
} }
Add(new cMenuEditStraItem(tr("Transport mode"), &transportModeM, ELEMENTS(transportModeTextsM), transportModeTextsM)); 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")); 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)); Add(new cOsdItem(tr("Active SAT>IP servers:"), osUnknown, false));
helpM.Append(""); helpM.Append("");
@ -479,6 +484,7 @@ eOSState cSatipPluginSetup::ProcessKey(eKeys keyP)
bool hadSubMenu = HasSubMenu(); bool hadSubMenu = HasSubMenu();
int oldOperatingMode = operatingModeM; int oldOperatingMode = operatingModeM;
int oldCiExtension = ciExtensionM; int oldCiExtension = ciExtensionM;
int oldFrontendReuse = frontendReuseM;
int oldNumDisabledSources = numDisabledSourcesM; int oldNumDisabledSources = numDisabledSourcesM;
int oldNumDisabledFilters = numDisabledFiltersM; int oldNumDisabledFilters = numDisabledFiltersM;
eOSState state = cMenuSetupPage::ProcessKey(keyP); eOSState state = cMenuSetupPage::ProcessKey(keyP);
@ -504,7 +510,7 @@ eOSState cSatipPluginSetup::ProcessKey(eKeys keyP)
if ((keyP == kNone) && (cSatipDiscover::GetInstance()->GetServers()->Count() != deviceCountM)) if ((keyP == kNone) && (cSatipDiscover::GetInstance()->GetServers()->Count() != deviceCountM))
Setup(); 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)) while ((numDisabledSourcesM < oldNumDisabledSources) && (oldNumDisabledSources > 0))
disabledSourcesM[--oldNumDisabledSources] = cSource::stNone; disabledSourcesM[--oldNumDisabledSources] = cSource::stNone;
while ((numDisabledFiltersM < oldNumDisabledFilters) && (oldNumDisabledFilters > 0)) while ((numDisabledFiltersM < oldNumDisabledFilters) && (oldNumDisabledFilters > 0))
@ -569,6 +575,7 @@ void cSatipPluginSetup::Store(void)
SetupStore("OperatingMode", operatingModeM); SetupStore("OperatingMode", operatingModeM);
SetupStore("TransportMode", transportModeM); SetupStore("TransportMode", transportModeM);
SetupStore("EnableCIExtension", ciExtensionM); SetupStore("EnableCIExtension", ciExtensionM);
SetupStore("EnableFrontendReuse", frontendReuseM);
SetupStore("EnableEITScan", eitScanM); SetupStore("EnableEITScan", eitScanM);
StoreCicams("CICAM", cicamsM); StoreCicams("CICAM", cicamsM);
StoreSources("DisabledSources", disabledSourcesM); StoreSources("DisabledSources", disabledSourcesM);

View File

@ -22,6 +22,7 @@ private:
const char *operatingModeTextsM[cSatipConfig::eOperatingModeCount]; const char *operatingModeTextsM[cSatipConfig::eOperatingModeCount];
const char *transportModeTextsM[cSatipConfig::eTransportModeCount]; const char *transportModeTextsM[cSatipConfig::eTransportModeCount];
int ciExtensionM; int ciExtensionM;
int frontendReuseM;
int cicamsM[MAX_CICAM_COUNT]; int cicamsM[MAX_CICAM_COUNT];
const char *cicamTextsM[CA_SYSTEMS_TABLE_SIZE]; const char *cicamTextsM[CA_SYSTEMS_TABLE_SIZE];
int eitScanM; int eitScanM;