mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Fixed model detection and OctopusNet DVB-C model quirks.
Added a session id quirk for GSSBOX.
This commit is contained in:
parent
fbbfdfab2b
commit
9a8c6f8c0d
5
HISTORY
5
HISTORY
@ -54,3 +54,8 @@ VDR Plugin 'satip' Revision History
|
|||||||
2014-04-27: Version 0.3.1
|
2014-04-27: Version 0.3.1
|
||||||
|
|
||||||
- Fixed the device discovery.
|
- 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.
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
|
||||||
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
||||||
"Language-Team: Catalan <vdr@linuxtv.org>\n"
|
"Language-Team: Catalan <vdr@linuxtv.org>\n"
|
||||||
"Language: ca\n"
|
"Language: ca\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
|
||||||
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
||||||
"Language-Team: German <vdr@linuxtv.org>\n"
|
"Language-Team: German <vdr@linuxtv.org>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
|
||||||
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
||||||
"Language-Team: Spanish <vdr@linuxtv.org>\n"
|
"Language-Team: Spanish <vdr@linuxtv.org>\n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
"POT-Creation-Date: 2014-05-10 05:10+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
"PO-Revision-Date: 2014-05-10 05:10+0200\n"
|
||||||
"Last-Translator: Rolf Ahrenberg\n"
|
"Last-Translator: Rolf Ahrenberg\n"
|
||||||
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
||||||
"Language: fi\n"
|
"Language: fi\n"
|
||||||
|
2
satip.c
2
satip.c
@ -25,7 +25,7 @@
|
|||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "0.3.1" GITVERSION;
|
const char VERSION[] = "0.3.2" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
||||||
|
|
||||||
class cPluginSatip : public cPlugin {
|
class cPluginSatip : public cPlugin {
|
||||||
|
10
server.c
10
server.c
@ -16,7 +16,8 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
|
|||||||
: addressM(addressP),
|
: addressM(addressP),
|
||||||
descriptionM(descriptionP),
|
descriptionM(descriptionP),
|
||||||
modelM(modelP),
|
modelM(modelP),
|
||||||
modelTypeM(eSatipModelTypeMask),
|
modelTypeM(eSatipModelTypeNone),
|
||||||
|
quirkM(eSatipQuirkNone),
|
||||||
useCountM(0),
|
useCountM(0),
|
||||||
createdM(time(NULL)),
|
createdM(time(NULL)),
|
||||||
lastSeenM(0)
|
lastSeenM(0)
|
||||||
@ -24,6 +25,9 @@ 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";
|
||||||
|
// Grundig Sat Systems GSS.box DSI 400 has a session id bug
|
||||||
|
if (strstr(*descriptionM, "GSSBOX"))
|
||||||
|
quirkM |= eSatipQuirkSessionId;
|
||||||
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) {
|
||||||
@ -41,7 +45,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
|
|||||||
else
|
else
|
||||||
modelCountM[eSatipModuleDVBT2] = 1;
|
modelCountM[eSatipModuleDVBT2] = 1;
|
||||||
// Add model quirks here
|
// Add model quirks here
|
||||||
if (strstr(*addressM, "OctopusNet"))
|
if (strstr(*descriptionM, "OctopusNet"))
|
||||||
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
||||||
}
|
}
|
||||||
if (strstr(r, "DVBT")) {
|
if (strstr(r, "DVBT")) {
|
||||||
@ -51,7 +55,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *descriptionP, const
|
|||||||
else
|
else
|
||||||
modelCountM[eSatipModuleDVBT] = 1;
|
modelCountM[eSatipModuleDVBT] = 1;
|
||||||
// Add model quirks here
|
// Add model quirks here
|
||||||
if (strstr(*addressM, "OctopusNet"))
|
if (strstr(*descriptionM, "OctopusNet"))
|
||||||
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
|
||||||
}
|
}
|
||||||
r = strtok_r(NULL, ",", &s);
|
r = strtok_r(NULL, ",", &s);
|
||||||
|
8
server.h
8
server.h
@ -23,12 +23,19 @@ private:
|
|||||||
cString modelM;
|
cString modelM;
|
||||||
int modelCountM[eSatipModuleCount];
|
int modelCountM[eSatipModuleCount];
|
||||||
int modelTypeM;
|
int modelTypeM;
|
||||||
|
int quirkM;
|
||||||
int useCountM;
|
int useCountM;
|
||||||
time_t createdM;
|
time_t createdM;
|
||||||
cTimeMs lastSeenM;
|
cTimeMs lastSeenM;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum eSatipQuirk {
|
||||||
|
eSatipQuirkNone = 0x00,
|
||||||
|
eSatipQuirkSessionId = 0x01,
|
||||||
|
eSatipQuirkMask = 0x0F
|
||||||
|
};
|
||||||
enum eSatipModelType {
|
enum eSatipModelType {
|
||||||
|
eSatipModelTypeNone = 0x00,
|
||||||
eSatipModelTypeDVBS2 = 0x01,
|
eSatipModelTypeDVBS2 = 0x01,
|
||||||
eSatipModelTypeDVBT = 0x02,
|
eSatipModelTypeDVBT = 0x02,
|
||||||
eSatipModelTypeDVBT2 = 0x04,
|
eSatipModelTypeDVBT2 = 0x04,
|
||||||
@ -43,6 +50,7 @@ public:
|
|||||||
const char *Description() { return *descriptionM; }
|
const char *Description() { return *descriptionM; }
|
||||||
const char *Address() { return *addressM; }
|
const char *Address() { return *addressM; }
|
||||||
const char *Model(void) { return modelM; }
|
const char *Model(void) { return modelM; }
|
||||||
|
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
|
||||||
int ModelType(void) { return modelTypeM; }
|
int ModelType(void) { return modelTypeM; }
|
||||||
bool Match(int modelP) { return ((modelP & eSatipModelTypeMask) & modelTypeM); }
|
bool Match(int modelP) { return ((modelP & eSatipModelTypeMask) & modelTypeM); }
|
||||||
int Cable() { return Match(eSatipModelTypeDVBC) ? (Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : modelCountM[eSatipModuleDVBT]) : 0; } // an ugly hack
|
int Cable() { return Match(eSatipModelTypeDVBC) ? (Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : modelCountM[eSatipModuleDVBT]) : 0; } // an ugly hack
|
||||||
|
5
tuner.c
5
tuner.c
@ -240,7 +240,10 @@ bool cSatipTuner::Connect(void)
|
|||||||
// Session id is now known - disable header parsing
|
// Session id is now known - disable header parsing
|
||||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_HEADERFUNCTION, NULL);
|
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_HEADERFUNCTION, NULL);
|
||||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEHEADER, 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())
|
if (!ValidateLatestResponse())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user