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:
parent
9989c36eee
commit
278d0478cf
2
HISTORY
2
HISTORY
@ -103,3 +103,5 @@ VDR Plugin 'satip' Revision History
|
||||
- Added configurable CI slots.
|
||||
- Fixed parsing of the setup values.
|
||||
- Added an option to disable sources via sources.conf.
|
||||
- Added a command-line option to disable all the
|
||||
SAT>IP server quirks.
|
||||
|
1
config.c
1
config.c
@ -17,6 +17,7 @@ cSatipConfig::cSatipConfig(void)
|
||||
ciExtensionM(0),
|
||||
eitScanM(1),
|
||||
useBytesM(1),
|
||||
disableServerQuirksM(false),
|
||||
useSingleModelServersM(false)
|
||||
{
|
||||
for (unsigned int i = 0; i < ELEMENTS(cicamsM); ++i)
|
||||
|
3
config.h
3
config.h
@ -19,6 +19,7 @@ private:
|
||||
unsigned int ciExtensionM;
|
||||
unsigned int eitScanM;
|
||||
unsigned int useBytesM;
|
||||
bool disableServerQuirksM;
|
||||
bool useSingleModelServersM;
|
||||
int cicamsM[MAX_CICAM_COUNT];
|
||||
int disabledSourcesM[MAX_DISABLED_SOURCES_COUNT];
|
||||
@ -65,6 +66,7 @@ public:
|
||||
int GetCICAM(unsigned int indexP) const;
|
||||
unsigned int GetEITScan(void) const { return eitScanM; }
|
||||
unsigned int GetUseBytes(void) const { return useBytesM; }
|
||||
bool GetDisableServerQuirks(void) const { return disableServerQuirksM; }
|
||||
bool GetUseSingleModelServers(void) const { return useSingleModelServersM; }
|
||||
unsigned int GetDisabledSourcesCount(void) const;
|
||||
int GetDisabledSources(unsigned int indexP) const;
|
||||
@ -77,6 +79,7 @@ public:
|
||||
void SetCICAM(unsigned int indexP, int cicamP);
|
||||
void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; }
|
||||
void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; }
|
||||
void SetDisableServerQuirks(bool onOffP) { disableServerQuirksM = onOffP; }
|
||||
void SetUseSingleModelServers(bool onOffP) { useSingleModelServersM = onOffP; }
|
||||
void SetDisabledSources(unsigned int indexP, int sourceP);
|
||||
void SetDisabledFilters(unsigned int indexP, int numberP);
|
||||
|
19
satip.c
19
satip.c
@ -85,7 +85,8 @@ const char *cPluginSatip::CommandLineHelp(void)
|
||||
" -t <mode>, --trace=<mode> set the tracing mode\n"
|
||||
" -s <ipaddr>|<model>|<desc>, --server=<ipaddr1>|<model1>|<desc1>;<ipaddr2>|<model2>|<desc2>\n"
|
||||
" 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[])
|
||||
@ -93,16 +94,17 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
||||
debug1("%s", __PRETTY_FUNCTION__);
|
||||
// Implement command line argument processing here if applicable.
|
||||
static const struct option long_options[] = {
|
||||
{ "devices", required_argument, NULL, 'd' },
|
||||
{ "trace", required_argument, NULL, 't' },
|
||||
{ "server", required_argument, NULL, 's' },
|
||||
{ "single", no_argument, NULL, 'S' },
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
{ "devices", required_argument, NULL, 'd' },
|
||||
{ "trace", required_argument, NULL, 't' },
|
||||
{ "server", required_argument, NULL, 's' },
|
||||
{ "single", no_argument, NULL, 'S' },
|
||||
{ "noquirks", no_argument, NULL, 'n' },
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
};
|
||||
|
||||
cString server;
|
||||
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) {
|
||||
case 'd':
|
||||
deviceCountM = strtol(optarg, NULL, 0);
|
||||
@ -116,6 +118,9 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
||||
case 'S':
|
||||
SatipConfig.SetUseSingleModelServers(true);
|
||||
break;
|
||||
case 'n':
|
||||
SatipConfig.SetDisableServerQuirks(true);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
35
server.c
35
server.c
@ -26,22 +26,25 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
|
||||
lastSeenM(0)
|
||||
{
|
||||
memset(modelCountM, 0, sizeof(modelCountM));
|
||||
// These devices contain a session id bug:
|
||||
// Inverto Airscreen Server IDL 400 ?
|
||||
// Elgato EyeTV Netstream 4Sat ?
|
||||
if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400
|
||||
strstr(*descriptionM, "DIGIBIT") || // Telestar Digibit R1
|
||||
strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
|
||||
)
|
||||
quirkM |= eSatipQuirkSessionId;
|
||||
// These devices contain a play (add/delpids) parameter bug:
|
||||
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
|
||||
quirkM |= eSatipQuirkPlayPids;
|
||||
// These devices contain a frontend locking bug:
|
||||
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
|
||||
quirkM |= eSatipQuirkForceLock;
|
||||
if (quirkM != eSatipQuirkNone)
|
||||
info("Malfunctioning '%s' server detected! Please, fix the firmware.", *descriptionM);
|
||||
if (!SatipConfig.GetDisableServerQuirks()) {
|
||||
debug3("%s quirks=%s", __PRETTY_FUNCTION__, *descriptionM);
|
||||
// These devices contain a session id bug:
|
||||
// Inverto Airscreen Server IDL 400 ?
|
||||
// Elgato EyeTV Netstream 4Sat ?
|
||||
if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400
|
||||
strstr(*descriptionM, "DIGIBIT") || // Telestar Digibit R1
|
||||
strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
|
||||
)
|
||||
quirkM |= eSatipQuirkSessionId;
|
||||
// These devices contain a play (add/delpids) parameter bug:
|
||||
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
|
||||
quirkM |= eSatipQuirkPlayPids;
|
||||
// These devices contain a frontend locking bug:
|
||||
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
|
||||
quirkM |= eSatipQuirkForceLock;
|
||||
if (quirkM != eSatipQuirkNone)
|
||||
info("Malfunctioning '%s' server detected! Please, fix the firmware.", *descriptionM);
|
||||
}
|
||||
// These devices support the X_PMT protocol extension
|
||||
if (strstr(*descriptionM, "OctopusNet")) // Digital Devices OctopusNet
|
||||
quirkM |= eSatipQuirkUseXCI;
|
||||
|
Loading…
Reference in New Issue
Block a user