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

Added a quirk to avoid addpids/delpids in PLAY commands.

This commit is contained in:
Rolf Ahrenberg 2014-10-31 18:18:33 +02:00
parent c8497e1fce
commit 3630a9f78a
3 changed files with 16 additions and 10 deletions

View File

@ -25,15 +25,19 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
memset(modelCountM, 0, sizeof(modelCountM)); memset(modelCountM, 0, sizeof(modelCountM));
if (isempty(*modelM)) if (isempty(*modelM))
modelM = "DVBS-1"; modelM = "DVBS-1";
if (!isempty(*descriptionM)) {
// These devices contain a session id bug: // These devices contain a session id bug:
// Inverto Airscreen Server IDL 400 ? // Inverto Airscreen Server IDL 400 ?
// Telestar Digibit R1 ? // Telestar Digibit R1 ?
// Elgato EyeTV Netstream 4Sat ? // Elgato EyeTV Netstream 4Sat ?
if (!isempty(*descriptionM) && if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400
(strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400
strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400 strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
)) )
quirkM |= eSatipQuirkSessionId; quirkM |= eSatipQuirkSessionId;
// These devices contain a play (*pids) parameter bug:
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
quirkM |= eSatipQuirkPlayPids;
}
char *s, *p = strdup(*modelM); char *s, *p = strdup(*modelM);
char *r = strtok_r(p, ",", &s); char *r = strtok_r(p, ",", &s);
while (r) { while (r) {
@ -73,6 +77,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
modelCountM[eSatipModuleDVBC] = atoi(++c); modelCountM[eSatipModuleDVBC] = atoi(++c);
else else
modelCountM[eSatipModuleDVBC] = 1; modelCountM[eSatipModuleDVBC] = 1;
// Add model quirks here
} }
r = strtok_r(NULL, ",", &s); r = strtok_r(NULL, ",", &s);
} }

View File

@ -33,6 +33,7 @@ public:
enum eSatipQuirk { enum eSatipQuirk {
eSatipQuirkNone = 0x00, eSatipQuirkNone = 0x00,
eSatipQuirkSessionId = 0x01, eSatipQuirkSessionId = 0x01,
eSatipQuirkPlayPids = 0x02,
eSatipQuirkMask = 0x0F eSatipQuirkMask = 0x0F
}; };
enum eSatipModelType { enum eSatipModelType {

View File

@ -459,7 +459,7 @@ bool cSatipTuner::UpdatePids(bool forceP)
tunedM && handleM && !isempty(*streamAddrM) && (streamIdM > 0)) { tunedM && handleM && !isempty(*streamAddrM) && (streamIdM > 0)) {
CURLcode res = CURLE_OK; CURLcode res = CURLE_OK;
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM); cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
if (forceP) { if (forceP || (currentServerM && currentServerM->Quirk(cSatipServer::eSatipQuirkPlayPids))) {
if (pidsM.Size()) { if (pidsM.Size()) {
uri = cString::sprintf("%s?pids=", *uri); uri = cString::sprintf("%s?pids=", *uri);
for (int i = 0; i < pidsM.Size(); ++i) for (int i = 0; i < pidsM.Size(); ++i)