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

Updated against SAT>IP protocol specification version 1.2.1.

This commit is contained in:
Rolf Ahrenberg 2014-11-20 22:30:18 +02:00
parent 0896df33e6
commit 524b21e042
6 changed files with 55 additions and 28 deletions

View File

@ -83,3 +83,5 @@ VDR Plugin 'satip' Revision History
- Refactored input thread to increase performance.
- Added new STAT command into the SVDRP interface.
- Refactored tuner implementation.
- Updated against SAT>IP protocol specification
version 1.2.1.

4
README
View File

@ -109,10 +109,6 @@ Notes:
- The stream id "-1" states about unsuccessful tuning. This might be a
result of invalid channel parameters or lack of free SAT>IP tuners.
- SAT>IP specification 1.2 doesn't support DVB-C/DVB-C2 receivers yet,
but DVB-C (KABEL>IP) is supported for Digital Devices Octopus Net
devices.
- If the plugin doesn't detect your SAT>IP network device, make sure
your setup doesn't have firewalled the UDP port 1900.

19
param.c
View File

@ -116,6 +116,13 @@ static const tSatipParameterMap SatipRollOffValues[] = {
{ -1, NULL }
};
static const tSatipParameterMap SatipInversionValues[] = {
{ INVERSION_AUTO, "" },
{ INVERSION_OFF, "&specinv=0" },
{ INVERSION_ON, "&specinv=1" },
{ -1, NULL }
};
static int SatipUserIndex(int valueP, const tSatipParameterMap *mapP)
{
const tSatipParameterMap *map = mapP;
@ -138,6 +145,8 @@ cString GetTransponderUrlParameters(const cChannel *channelP)
if (channelP) {
char buffer[255];
cDvbTransponderParameters dtp(channelP->Parameters());
int DataSlice = 0;
int C2TuningFrequencyType = 0;
#if defined(APIVERSNUM) && APIVERSNUM < 20106
int Pilot = PILOT_AUTO;
int T2SystemId = 0;
@ -160,17 +169,23 @@ cString GetTransponderUrlParameters(const cChannel *channelP)
#define STBUFLEFT (sizeof(buffer) - (q - buffer))
q += snprintf(q, STBUFLEFT, "freq=%s", *dtoa(freq, "%lg"));
ST(" S *") q += snprintf(q, STBUFLEFT, "&src=%d", ((src > 0) && (src <= 255)) ? src : 1);
ST("CS *") q += snprintf(q, STBUFLEFT, "&sr=%d", channelP->Srate());
ST(" S *") q += snprintf(q, STBUFLEFT, "&sr=%d", channelP->Srate());
ST("C 1") q += snprintf(q, STBUFLEFT, "&sr=%d", channelP->Srate());
ST(" S *") q += snprintf(q, STBUFLEFT, "&pol=%c", tolower(dtp.Polarization()));
ST("C T2") q += snprintf(q, STBUFLEFT, "&plp=%d", dtp.StreamId());
ST(" T2") q += snprintf(q, STBUFLEFT, "&t2id=%d", T2SystemId);
ST("C 2") q += snprintf(q, STBUFLEFT, "&c2tft=%d", C2TuningFrequencyType);
ST("C 2") q += snprintf(q, STBUFLEFT, "&ds=%d", DataSlice);
ST("C 1") q += PrintUrlString(q, STBUFLEFT, dtp.Inversion(), SatipInversionValues);
ST(" T2") q += PrintUrlString(q, STBUFLEFT, SisoMiso, SatipSisoMisoValues);
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.Bandwidth(), SatipBandwidthValues);
ST("C 2") q += PrintUrlString(q, STBUFLEFT, dtp.Bandwidth(), SatipBandwidthValues);
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.Guard(), SatipGuardValues);
ST("CST*") q += PrintUrlString(q, STBUFLEFT, dtp.CoderateH(), SatipCodeRateValues);
ST(" S 2") q += PrintUrlString(q, STBUFLEFT, Pilot, SatipPilotValues);
ST(" S 2") q += PrintUrlString(q, STBUFLEFT, dtp.Modulation(), SatipModulationValues);
ST("C T*") q += PrintUrlString(q, STBUFLEFT, dtp.Modulation(), SatipModulationValues);
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.Modulation(), SatipModulationValues);
ST("C 1") q += PrintUrlString(q, STBUFLEFT, dtp.Modulation(), SatipModulationValues);
ST(" S 2") q += PrintUrlString(q, STBUFLEFT, dtp.RollOff(), SatipRollOffValues);
ST(" S *") q += PrintUrlString(q, STBUFLEFT, dtp.System(), SatipSystemValuesSat);
ST("C *") q += PrintUrlString(q, STBUFLEFT, dtp.System(), SatipSystemValuesCable);

View File

@ -50,7 +50,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
modelCountM[eSatipModuleDVBS2] = 1;
}
if (strstr(r, "DVBT2")) {
modelTypeM |= cSatipServer::eSatipModelTypeDVBT | cSatipServer::eSatipModelTypeDVBT2;
modelTypeM |= cSatipServer::eSatipModelTypeDVBT2;
if (char *c = strstr(r, "-"))
modelCountM[eSatipModuleDVBT2] = atoi(++c);
else
@ -72,6 +72,14 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
modelCountM[eSatipModuleDVBC] = modelCountM[eSatipModuleDVBT];
}
if (strstr(r, "DVBC2")) {
modelTypeM |= cSatipServer::eSatipModelTypeDVBC2;
if (char *c = strstr(r, "-"))
modelCountM[eSatipModuleDVBC2] = atoi(++c);
else
modelCountM[eSatipModuleDVBC2] = 1;
// Add model quirks here
}
if (strstr(r, "DVBC")) {
modelTypeM |= cSatipServer::eSatipModelTypeDVBC;
if (char *c = strstr(r, "-"))
@ -213,8 +221,9 @@ int cSatipServers::NumProvidedSystems(void)
// DVB-T2: qpsk, qam16, qam64, qam256
// DVB-T: qpsk, qam16, qam64
count += s->Terrestrial2() ? s->Terrestrial2() * 4 : s->Terrestrial() * 3;
// DVB-C2: qam16, qam32, qam64, qam128, qam256
// DVB-C: qam64, qam128, qam256
count += s->Cable() * 3;
count += s->Cable2() ? s->Cable2() * 5 : s->Cable() * 3;
}
return count;
}

View File

@ -17,6 +17,7 @@ private:
eSatipModuleDVBT,
eSatipModuleDVBT2,
eSatipModuleDVBC,
eSatipModuleDVBC2,
eSatipModuleCount
};
cString addressM;
@ -44,7 +45,8 @@ public:
eSatipModelTypeDVBT = 0x02,
eSatipModelTypeDVBT2 = 0x04,
eSatipModelTypeDVBC = 0x08,
eSatipModelTypeMask = 0x0F
eSatipModelTypeDVBC2 = 0x10,
eSatipModelTypeMask = 0xFF
};
cSatipServer(const char *addressP, const char *modelP, const char *descriptionP);
virtual ~cSatipServer();
@ -60,6 +62,7 @@ public:
int ModelType(void) { return modelTypeM; }
bool Match(int modelP) { return ((modelP & eSatipModelTypeMask) & modelTypeM); }
int Cable() { return Match(eSatipModelTypeDVBC) ? modelCountM[eSatipModuleDVBC] : 0; }
int Cable2() { return Match(eSatipModelTypeDVBC2) ? modelCountM[eSatipModuleDVBC2] : 0; }
int Satellite() { return Match(eSatipModelTypeDVBS2) ? modelCountM[eSatipModuleDVBS2] : 0; }
int Terrestrial() { return Match(eSatipModelTypeDVBT) ? modelCountM[eSatipModuleDVBT] : 0; }
int Terrestrial2() { return Match(eSatipModelTypeDVBT2) ? modelCountM[eSatipModuleDVBT2] : 0; }

View File

@ -265,6 +265,8 @@ void cSatipTuner::ProcessApplicationData(u_char *bufferP, int lengthP)
// ver=<major>.<minor>;src=<srcID>;tuner=<feID>,<level>,<lock>,<quality>,<frequency>,<polarisation>,<system>,<type>,<pilots>,<roll_off>,<symbol_rate>,<fec_inner>;pids=<pid0>,...,<pidn>
// DVB-T2:
// ver=1.1;tuner=<feID>,<level>,<lock>,<quality>,<freq>,<bw>,<msys>,<tmode>,<mtype>,<gi>,<fec>,<plp>,<t2id>,<sm>;pids=<pid0>,...,<pidn>
// DVB-C2:
// ver=1.2;tuner=<feID>,<level>,<lock>,<quality>,<freq>,<bw>,<msys>,<mtype>,<sr>,<c2tft>,<ds>,<plp>,<specinv>;pids=<pid0>,...,<pidn>
if (lengthP > 0) {
char *s = strndup((char *)bufferP, lengthP);
//debug("cSatipTuner::%s(%s) [device %d]", __FUNCTION__, s, deviceIdM);