Fixed model detection and OctopusNet DVB-C model quirks.

Added a session id quirk for GSSBOX.
This commit is contained in:
Rolf Ahrenberg 2014-05-08 22:09:35 +03:00
parent fbbfdfab2b
commit 9a8c6f8c0d
9 changed files with 37 additions and 17 deletions

View File

@ -54,3 +54,8 @@ VDR Plugin 'satip' Revision History
2014-04-27: Version 0.3.1
- Fixed the device discovery.
2014-05-10: Version 0.3.2
- Fixed model detection and OctopusNet DVB-C model quirks.
- Added a session id quirk for GSSBOX.

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.1\n"
"Project-Id-Version: vdr-satip 0.3.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
"Language-Team: Catalan <vdr@linuxtv.org>\n"
"Language: ca\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.1\n"
"Project-Id-Version: vdr-satip 0.3.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
"Language: de\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.1\n"
"Project-Id-Version: vdr-satip 0.3.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
"Language-Team: Spanish <vdr@linuxtv.org>\n"
"Language: es\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.1\n"
"Project-Id-Version: vdr-satip 0.3.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
"Language: fi\n"

View File

@ -25,7 +25,7 @@
#define GITVERSION ""
#endif
const char VERSION[] = "0.3.1" GITVERSION;
const char VERSION[] = "0.3.2" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin {

View File

@ -16,7 +16,8 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
: addressM(addressP),
descriptionM(descriptionP),
modelM(modelP),
modelTypeM(eSatipModelTypeMask),
modelTypeM(eSatipModelTypeNone),
quirkM(eSatipQuirkNone),
useCountM(0),
createdM(time(NULL)),
lastSeenM(0)
@ -24,6 +25,9 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
memset(modelCountM, 0, sizeof(modelCountM));
if (isempty(*modelM))
modelM = "DVBS-1";
// Grundig Sat Systems GSS.box DSI 400 has a session id bug
if (strstr(*descriptionM, "GSSBOX"))
quirkM |= eSatipQuirkSessionId;
char *s, *p = strdup(*modelM);
char *r = strtok_r(p, ",", &s);
while (r) {
@ -41,7 +45,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
else
modelCountM[eSatipModuleDVBT2] = 1;
// Add model quirks here
if (strstr(*addressM, "OctopusNet"))
if (strstr(*descriptionM, "OctopusNet"))
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
}
if (strstr(r, "DVBT")) {
@ -51,7 +55,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
else
modelCountM[eSatipModuleDVBT] = 1;
// Add model quirks here
if (strstr(*addressM, "OctopusNet"))
if (strstr(*descriptionM, "OctopusNet"))
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
}
r = strtok_r(NULL, ",", &s);

View File

@ -23,12 +23,19 @@ private:
cString modelM;
int modelCountM[eSatipModuleCount];
int modelTypeM;
int quirkM;
int useCountM;
time_t createdM;
cTimeMs lastSeenM;
public:
enum eSatipQuirk {
eSatipQuirkNone = 0x00,
eSatipQuirkSessionId = 0x01,
eSatipQuirkMask = 0x0F
};
enum eSatipModelType {
eSatipModelTypeNone = 0x00,
eSatipModelTypeDVBS2 = 0x01,
eSatipModelTypeDVBT = 0x02,
eSatipModelTypeDVBT2 = 0x04,
@ -43,6 +50,7 @@ public:
const char *Description() { return *descriptionM; }
const char *Address() { return *addressM; }
const char *Model(void) { return modelM; }
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
int ModelType(void) { return modelTypeM; }
bool Match(int modelP) { return ((modelP & eSatipModelTypeMask) & modelTypeM); }
int Cable() { return Match(eSatipModelTypeDVBC) ? (Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : modelCountM[eSatipModuleDVBT]) : 0; } // an ugly hack

View File

@ -240,7 +240,10 @@ bool cSatipTuner::Connect(void)
// Session id is now known - disable header parsing
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_HEADERFUNCTION, NULL);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEHEADER, NULL);
//SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_SESSION_ID, *sessionM);
if (nextServerM && nextServerM->Quirk(cSatipServer::eSatipQuirkSessionId) && startswith(*sessionM, "0")) {
debug("cSatipTuner::%s(): session id quirk [device %d]", __FUNCTION__, deviceM->GetId());
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_SESSION_ID, *sessionM + 1);
}
if (!ValidateLatestResponse())
return false;