1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Added an option to disable sources via sources.conf.

This commit is contained in:
Rolf Ahrenberg 2015-01-17 01:39:32 +02:00
parent 714d3ed902
commit d2064f0c04
3 changed files with 11 additions and 3 deletions

View File

@ -102,3 +102,4 @@ VDR Plugin 'satip' Revision History
- Added configurable CI slots. - Added configurable CI slots.
- Fixed parsing of the setup values. - Fixed parsing of the setup values.
- Added an option to disable sources via sources.conf.

7
README
View File

@ -60,8 +60,8 @@ vdr -P 'satip -s 192.168.0.1|DVBS2-4|Octo1;192.168.0.2|DVBT2-4|Octo2'
SAT>IP satellite positions (aka. signal sources) shall be defined via SAT>IP satellite positions (aka. signal sources) shall be defined via
sources.conf. If the source description begins with a number, it's used sources.conf. If the source description begins with a number, it's used
as SAT>IP signal source selection parameter. Otherwise, the default as SAT>IP signal source selection parameter. A special number zero can
parameter is one: be used to disable the source. Otherwise, the default parameter is one:
S19.2E Astra 1KR/1L/1M/2C S19.2E Astra 1KR/1L/1M/2C
=> Signal source = 1 => Signal source = 1
@ -72,6 +72,9 @@ S19.2E 2
S19.2E 3 Astra 1KR/1L/1M/2C S19.2E 3 Astra 1KR/1L/1M/2C
=> Signal source = 3 => Signal source = 3
S19.2E 0 Astra 1KR/1L/1M/2C
=> Source is disabled
A channel can be assigned into a specific SAT>IP frontend by giving the A channel can be assigned into a specific SAT>IP frontend by giving the
identifier number in RID field of a channels.conf entry: identifier number in RID field of a channels.conf entry:
FE = RID % 100 FE = RID % 100

View File

@ -217,7 +217,11 @@ int cSatipDevice::SignalQuality(void) const
bool cSatipDevice::ProvidesSource(int sourceP) const bool cSatipDevice::ProvidesSource(int sourceP) const
{ {
debug9("%s (%c) [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), deviceIndexM); cSource *s = Sources.Get(sourceP);
debug9("%s (%c) desc='%s' [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), s ? s->Description() : "", deviceIndexM);
// source descriptions starting with '0' are disabled
if (s && s->Description() && (*(s->Description()) == '0'))
return false;
if (!SatipConfig.IsOperatingModeOff() && !!cSatipDiscover::GetInstance()->GetServer(sourceP)) { if (!SatipConfig.IsOperatingModeOff() && !!cSatipDiscover::GetInstance()->GetServer(sourceP)) {
int numDisabledSourcesM = SatipConfig.GetDisabledSourcesCount(); int numDisabledSourcesM = SatipConfig.GetDisabledSourcesCount();
for (int i = 0; i < numDisabledSourcesM; ++i) { for (int i = 0; i < numDisabledSourcesM; ++i) {