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

Added a command-line option to disable all the SAT>IP server quirks.

This commit is contained in:
Rolf Ahrenberg 2015-01-17 17:29:21 +02:00
parent 9989c36eee
commit 278d0478cf
5 changed files with 37 additions and 23 deletions

View File

@ -103,3 +103,5 @@ 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. - Added an option to disable sources via sources.conf.
- Added a command-line option to disable all the
SAT>IP server quirks.

View File

@ -17,6 +17,7 @@ cSatipConfig::cSatipConfig(void)
ciExtensionM(0), ciExtensionM(0),
eitScanM(1), eitScanM(1),
useBytesM(1), useBytesM(1),
disableServerQuirksM(false),
useSingleModelServersM(false) useSingleModelServersM(false)
{ {
for (unsigned int i = 0; i < ELEMENTS(cicamsM); ++i) for (unsigned int i = 0; i < ELEMENTS(cicamsM); ++i)

View File

@ -19,6 +19,7 @@ private:
unsigned int ciExtensionM; unsigned int ciExtensionM;
unsigned int eitScanM; unsigned int eitScanM;
unsigned int useBytesM; unsigned int useBytesM;
bool disableServerQuirksM;
bool useSingleModelServersM; bool useSingleModelServersM;
int cicamsM[MAX_CICAM_COUNT]; int cicamsM[MAX_CICAM_COUNT];
int disabledSourcesM[MAX_DISABLED_SOURCES_COUNT]; int disabledSourcesM[MAX_DISABLED_SOURCES_COUNT];
@ -65,6 +66,7 @@ public:
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; }
bool GetDisableServerQuirks(void) const { return disableServerQuirksM; }
bool GetUseSingleModelServers(void) const { return useSingleModelServersM; } bool GetUseSingleModelServers(void) const { return useSingleModelServersM; }
unsigned int GetDisabledSourcesCount(void) const; unsigned int GetDisabledSourcesCount(void) const;
int GetDisabledSources(unsigned int indexP) const; int GetDisabledSources(unsigned int indexP) const;
@ -77,6 +79,7 @@ public:
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; }
void SetDisableServerQuirks(bool onOffP) { disableServerQuirksM = onOffP; }
void SetUseSingleModelServers(bool onOffP) { useSingleModelServersM = onOffP; } void SetUseSingleModelServers(bool onOffP) { useSingleModelServersM = onOffP; }
void SetDisabledSources(unsigned int indexP, int sourceP); void SetDisabledSources(unsigned int indexP, int sourceP);
void SetDisabledFilters(unsigned int indexP, int numberP); void SetDisabledFilters(unsigned int indexP, int numberP);

19
satip.c
View File

@ -85,7 +85,8 @@ const char *cPluginSatip::CommandLineHelp(void)
" -t <mode>, --trace=<mode> set the tracing mode\n" " -t <mode>, --trace=<mode> set the tracing mode\n"
" -s <ipaddr>|<model>|<desc>, --server=<ipaddr1>|<model1>|<desc1>;<ipaddr2>|<model2>|<desc2>\n" " -s <ipaddr>|<model>|<desc>, --server=<ipaddr1>|<model1>|<desc1>;<ipaddr2>|<model2>|<desc2>\n"
" define hard-coded SAT>IP server(s)" " define hard-coded SAT>IP server(s)"
" -S, --single set the single model server mode on/off\n"; " -S, --single set the single model server mode on\n"
" -n, --noquirks disable all the server quirks\n";
} }
bool cPluginSatip::ProcessArgs(int argc, char *argv[]) bool cPluginSatip::ProcessArgs(int argc, char *argv[])
@ -93,16 +94,17 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
debug1("%s", __PRETTY_FUNCTION__); debug1("%s", __PRETTY_FUNCTION__);
// Implement command line argument processing here if applicable. // Implement command line argument processing here if applicable.
static const struct option long_options[] = { static const struct option long_options[] = {
{ "devices", required_argument, NULL, 'd' }, { "devices", required_argument, NULL, 'd' },
{ "trace", required_argument, NULL, 't' }, { "trace", required_argument, NULL, 't' },
{ "server", required_argument, NULL, 's' }, { "server", required_argument, NULL, 's' },
{ "single", no_argument, NULL, 'S' }, { "single", no_argument, NULL, 'S' },
{ NULL, no_argument, NULL, 0 } { "noquirks", no_argument, NULL, 'n' },
{ NULL, no_argument, NULL, 0 }
}; };
cString server; cString server;
int c; int c;
while ((c = getopt_long(argc, argv, "d:t:s:S", long_options, NULL)) != -1) { while ((c = getopt_long(argc, argv, "d:t:s:Sn", long_options, NULL)) != -1) {
switch (c) { switch (c) {
case 'd': case 'd':
deviceCountM = strtol(optarg, NULL, 0); deviceCountM = strtol(optarg, NULL, 0);
@ -116,6 +118,9 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
case 'S': case 'S':
SatipConfig.SetUseSingleModelServers(true); SatipConfig.SetUseSingleModelServers(true);
break; break;
case 'n':
SatipConfig.SetDisableServerQuirks(true);
break;
default: default:
return false; return false;
} }

View File

@ -26,22 +26,25 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
lastSeenM(0) lastSeenM(0)
{ {
memset(modelCountM, 0, sizeof(modelCountM)); memset(modelCountM, 0, sizeof(modelCountM));
// These devices contain a session id bug: if (!SatipConfig.GetDisableServerQuirks()) {
// Inverto Airscreen Server IDL 400 ? debug3("%s quirks=%s", __PRETTY_FUNCTION__, *descriptionM);
// Elgato EyeTV Netstream 4Sat ? // These devices contain a session id bug:
if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400 // Inverto Airscreen Server IDL 400 ?
strstr(*descriptionM, "DIGIBIT") || // Telestar Digibit R1 // Elgato EyeTV Netstream 4Sat ?
strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400 if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400
) strstr(*descriptionM, "DIGIBIT") || // Telestar Digibit R1
quirkM |= eSatipQuirkSessionId; strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
// These devices contain a play (add/delpids) parameter bug: )
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C quirkM |= eSatipQuirkSessionId;
quirkM |= eSatipQuirkPlayPids; // These devices contain a play (add/delpids) parameter bug:
// These devices contain a frontend locking bug: if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C quirkM |= eSatipQuirkPlayPids;
quirkM |= eSatipQuirkForceLock; // These devices contain a frontend locking bug:
if (quirkM != eSatipQuirkNone) if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
info("Malfunctioning '%s' server detected! Please, fix the firmware.", *descriptionM); quirkM |= eSatipQuirkForceLock;
if (quirkM != eSatipQuirkNone)
info("Malfunctioning '%s' server detected! Please, fix the firmware.", *descriptionM);
}
// These devices support the X_PMT protocol extension // These devices support the X_PMT protocol extension
if (strstr(*descriptionM, "OctopusNet")) // Digital Devices OctopusNet if (strstr(*descriptionM, "OctopusNet")) // Digital Devices OctopusNet
quirkM |= eSatipQuirkUseXCI; quirkM |= eSatipQuirkUseXCI;