mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Added initial support for x_ci parameter.
This commit is contained in:
parent
5fef77518e
commit
695dd53bfc
10
README
10
README
@ -67,8 +67,14 @@ S19.2E 3 Astra 1KR/1L/1M/2C
|
|||||||
=> Signal source = 3
|
=> Signal source = 3
|
||||||
|
|
||||||
A channel can be assigned into a specific SAT>IP frontend by giving the
|
A channel can be assigned into a specific SAT>IP frontend by giving the
|
||||||
identifier number in RID field of a channels.conf entry.
|
identifier number in RID field of a channels.conf entry:
|
||||||
Valid range: 1 ... 8
|
FE = RID % 100
|
||||||
|
Valid range: 1 ... 99
|
||||||
|
|
||||||
|
A channel can be assigned into a specific integrated CI slot by giving
|
||||||
|
the identifier number in RID field of a channels.conf entry:
|
||||||
|
CI# = (RID / 100) % 10
|
||||||
|
Valid range: 1 ... 9
|
||||||
|
|
||||||
Setup menu:
|
Setup menu:
|
||||||
|
|
||||||
|
9
device.c
9
device.c
@ -331,8 +331,8 @@ bool cSatipDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP)
|
|||||||
}
|
}
|
||||||
cSatipDiscover::GetInstance()->SetTransponder(server, channelP->Transponder());
|
cSatipDiscover::GetInstance()->SetTransponder(server, channelP->Transponder());
|
||||||
if (pTunerM && pTunerM->SetSource(server, *params, deviceIndexM)) {
|
if (pTunerM && pTunerM->SetSource(server, *params, deviceIndexM)) {
|
||||||
deviceNameM = cString::sprintf("%s %d %s", *DeviceType(), deviceIndexM, *cSatipDiscover::GetInstance()->GetServerString(server));
|
|
||||||
channelM = *channelP;
|
channelM = *channelP;
|
||||||
|
deviceNameM = cString::sprintf("%s %d %s", *DeviceType(), deviceIndexM, *cSatipDiscover::GetInstance()->GetServerString(server));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -438,6 +438,13 @@ int cSatipDevice::GetPmtPid(void)
|
|||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cSatipDevice::GetCISlot(void)
|
||||||
|
{
|
||||||
|
int slot = channelM.Ca() ? (channelM.Rid() / 100) % 10 : 0;
|
||||||
|
debug11("%s slot=%d name=%s [device %u]", __PRETTY_FUNCTION__, slot, channelM.Name(), deviceIndexM);
|
||||||
|
return slot;
|
||||||
|
}
|
||||||
|
|
||||||
uchar *cSatipDevice::GetData(int *availableP)
|
uchar *cSatipDevice::GetData(int *availableP)
|
||||||
{
|
{
|
||||||
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
|
1
device.h
1
device.h
@ -109,6 +109,7 @@ public:
|
|||||||
virtual void WriteData(u_char *bufferP, int lengthP);
|
virtual void WriteData(u_char *bufferP, int lengthP);
|
||||||
virtual int GetId(void);
|
virtual int GetId(void);
|
||||||
virtual int GetPmtPid(void);
|
virtual int GetPmtPid(void);
|
||||||
|
virtual int GetCISlot(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __SATIP_DEVICE_H
|
#endif // __SATIP_DEVICE_H
|
||||||
|
@ -15,6 +15,7 @@ public:
|
|||||||
virtual void WriteData(u_char *bufferP, int lengthP) = 0;
|
virtual void WriteData(u_char *bufferP, int lengthP) = 0;
|
||||||
virtual int GetId(void) = 0;
|
virtual int GetId(void) = 0;
|
||||||
virtual int GetPmtPid(void) = 0;
|
virtual int GetPmtPid(void) = 0;
|
||||||
|
virtual int GetCISlot(void) = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cSatipDeviceIf(const cSatipDeviceIf&);
|
cSatipDeviceIf(const cSatipDeviceIf&);
|
||||||
|
2
log.h
2
log.h
@ -32,7 +32,7 @@
|
|||||||
#define debug9(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug9) ? dsyslog("SATIP9: " x) : void() )
|
#define debug9(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug9) ? dsyslog("SATIP9: " x) : void() )
|
||||||
// 0x0200: RTCP packets
|
// 0x0200: RTCP packets
|
||||||
#define debug10(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug10) ? dsyslog("SATIP10: " x) : void() )
|
#define debug10(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug10) ? dsyslog("SATIP10: " x) : void() )
|
||||||
// 0x0400: PMT
|
// 0x0400: CI
|
||||||
#define debug11(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug11) ? dsyslog("SATIP11: " x) : void() )
|
#define debug11(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug11) ? dsyslog("SATIP11: " x) : void() )
|
||||||
// 0x0800: TBD
|
// 0x0800: TBD
|
||||||
#define debug12(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug12) ? dsyslog("SATIP12: " x) : void() )
|
#define debug12(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug12) ? dsyslog("SATIP12: " x) : void() )
|
||||||
|
4
param.c
4
param.c
@ -191,8 +191,8 @@ cString GetTransponderUrlParameters(const cChannel *channelP)
|
|||||||
ST("C *") q += PrintUrlString(q, STBUFLEFT, dtp.System(), SatipSystemValuesCable);
|
ST("C *") q += PrintUrlString(q, STBUFLEFT, dtp.System(), SatipSystemValuesCable);
|
||||||
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.System(), SatipSystemValuesTerrestrial);
|
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.System(), SatipSystemValuesTerrestrial);
|
||||||
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.Transmission(), SatipTransmissionValues);
|
ST(" T*") q += PrintUrlString(q, STBUFLEFT, dtp.Transmission(), SatipTransmissionValues);
|
||||||
if (channelP->Rid() > 0)
|
if ((channelP->Rid() % 100) > 0)
|
||||||
q += snprintf(q, STBUFLEFT, "&fe=%d", channelP->Rid());
|
q += snprintf(q, STBUFLEFT, "&fe=%d", channelP->Rid() % 100);
|
||||||
#undef ST
|
#undef ST
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
2
server.c
2
server.c
@ -47,7 +47,7 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
|
|||||||
info("Malfunctioning '%s' server detected! Please, fix the firmware.", *descriptionM);
|
info("Malfunctioning '%s' server detected! Please, fix the firmware.", *descriptionM);
|
||||||
// These devices support the X_PMT protocol extension
|
// These devices support the X_PMT protocol extension
|
||||||
if (strstr(*descriptionM, "OctopusNet")) // Digital Devices OctopusNet
|
if (strstr(*descriptionM, "OctopusNet")) // Digital Devices OctopusNet
|
||||||
quirkM |= eSatipQuirkUseXPMT;
|
quirkM |= eSatipQuirkUseXCI;
|
||||||
}
|
}
|
||||||
char *s, *p = strdup(*modelM);
|
char *s, *p = strdup(*modelM);
|
||||||
char *r = strtok_r(p, ",", &s);
|
char *r = strtok_r(p, ",", &s);
|
||||||
|
2
server.h
2
server.h
@ -37,7 +37,7 @@ public:
|
|||||||
eSatipQuirkSessionId = 0x01,
|
eSatipQuirkSessionId = 0x01,
|
||||||
eSatipQuirkPlayPids = 0x02,
|
eSatipQuirkPlayPids = 0x02,
|
||||||
eSatipQuirkForceLock = 0x04,
|
eSatipQuirkForceLock = 0x04,
|
||||||
eSatipQuirkUseXPMT = 0x08,
|
eSatipQuirkUseXCI = 0x08,
|
||||||
eSatipQuirkMask = 0x0F
|
eSatipQuirkMask = 0x0F
|
||||||
};
|
};
|
||||||
enum eSatipModelType {
|
enum eSatipModelType {
|
||||||
|
2
setup.c
2
setup.c
@ -104,7 +104,7 @@ cSatipServerInfo::cSatipServerInfo(cSatipServer *serverP)
|
|||||||
addressM(serverP ? serverP->Address() : "---"),
|
addressM(serverP ? serverP->Address() : "---"),
|
||||||
modelM(serverP ? serverP->Model() : "---"),
|
modelM(serverP ? serverP->Model() : "---"),
|
||||||
descriptionM(serverP ? serverP->Description() : "---"),
|
descriptionM(serverP ? serverP->Description() : "---"),
|
||||||
ciExtensionM(serverP && serverP->Quirk(cSatipServer::eSatipQuirkUseXPMT) ? trVDR("yes") : trVDR("no")),
|
ciExtensionM(serverP && serverP->Quirk(cSatipServer::eSatipQuirkUseXCI) ? trVDR("yes") : trVDR("no")),
|
||||||
createdM(serverP ? serverP->Created() : 0)
|
createdM(serverP ? serverP->Created() : 0)
|
||||||
{
|
{
|
||||||
SetMenuCategory(mcSetupPlugins);
|
SetMenuCategory(mcSetupPlugins);
|
||||||
|
10
tuner.c
10
tuner.c
@ -391,7 +391,7 @@ bool cSatipTuner::UpdatePids(bool forceP)
|
|||||||
if (((forceP && pidsM.Size()) || (pidUpdateCacheM.TimedOut() && (addPidsM.Size() || delPidsM.Size()))) &&
|
if (((forceP && pidsM.Size()) || (pidUpdateCacheM.TimedOut() && (addPidsM.Size() || delPidsM.Size()))) &&
|
||||||
!isempty(*streamAddrM) && (streamIdM > 0)) {
|
!isempty(*streamAddrM) && (streamIdM > 0)) {
|
||||||
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
|
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
|
||||||
bool usexpmt = (SatipConfig.GetCIExtension() && !!(currentServerM && currentServerM->Quirk(cSatipServer::eSatipQuirkUseXPMT)));
|
bool useci = (SatipConfig.GetCIExtension() && !!(currentServerM && currentServerM->Quirk(cSatipServer::eSatipQuirkUseXCI)));
|
||||||
bool usedummy = !!(currentServerM && currentServerM->Quirk(cSatipServer::eSatipQuirkPlayPids));
|
bool usedummy = !!(currentServerM && currentServerM->Quirk(cSatipServer::eSatipQuirkPlayPids));
|
||||||
if (forceP || usedummy) {
|
if (forceP || usedummy) {
|
||||||
if (pidsM.Size())
|
if (pidsM.Size())
|
||||||
@ -405,7 +405,7 @@ bool cSatipTuner::UpdatePids(bool forceP)
|
|||||||
if (delPidsM.Size())
|
if (delPidsM.Size())
|
||||||
uri = cString::sprintf("%s%sdelpids=%s", *uri, addPidsM.Size() ? "&" : "?", *delPidsM.ListPids());
|
uri = cString::sprintf("%s%sdelpids=%s", *uri, addPidsM.Size() ? "&" : "?", *delPidsM.ListPids());
|
||||||
}
|
}
|
||||||
if (usexpmt) {
|
if (useci) {
|
||||||
// CI extension parameters:
|
// CI extension parameters:
|
||||||
// - x_pmt : specifies the PMT of the service you want the CI to decode
|
// - x_pmt : specifies the PMT of the service you want the CI to decode
|
||||||
// - x_ci : specfies which CI slot (1..n) to use
|
// - x_ci : specfies which CI slot (1..n) to use
|
||||||
@ -413,8 +413,12 @@ bool cSatipTuner::UpdatePids(bool forceP)
|
|||||||
// CI slot released automatically if the stream is released,
|
// CI slot released automatically if the stream is released,
|
||||||
// but not when used retuning to another channel
|
// but not when used retuning to another channel
|
||||||
int pid = deviceM->GetPmtPid();
|
int pid = deviceM->GetPmtPid();
|
||||||
if ((pid > 0) && (pid != pmtPidM))
|
if ((pid > 0) && (pid != pmtPidM)) {
|
||||||
|
int slot = deviceM->GetCISlot();
|
||||||
uri = cString::sprintf("%s&x_pmt=%d", *uri, pid);
|
uri = cString::sprintf("%s&x_pmt=%d", *uri, pid);
|
||||||
|
if (slot > 0)
|
||||||
|
uri = cString::sprintf("%s&x_ci=%d", *uri, slot);
|
||||||
|
}
|
||||||
pmtPidM = pid;
|
pmtPidM = pid;
|
||||||
}
|
}
|
||||||
if (!rtspM.Play(*uri))
|
if (!rtspM.Play(*uri))
|
||||||
|
Loading…
Reference in New Issue
Block a user