mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 11:37:42 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6c4c8a10b7 | ||
|
8b43cdc634 | ||
|
fe010ab72c |
7
HISTORY
7
HISTORY
@@ -130,3 +130,10 @@ VDR Plugin 'satip' Revision History
|
||||
(Thanks to Oliver Endriss).
|
||||
- Updated against SAT>IP protocol specification
|
||||
version 1.2.2.
|
||||
|
||||
2015-04-26: Version 2.2.2
|
||||
|
||||
- Added a more flexible OPER command in the SVDRP
|
||||
interface.
|
||||
- Added new ATTA and DETA SVDRP commands.
|
||||
- Set the default device count to two.
|
||||
|
2
README
2
README
@@ -42,7 +42,7 @@ make -C satip-X.Y.Z install
|
||||
Configuration:
|
||||
|
||||
The plugin accepts a "--devices" (-d) command-line parameter defaulting
|
||||
to one. This parameter defines how many simultaneous transponders can
|
||||
to two. This parameter defines how many simultaneous transponders can
|
||||
be received, if there are available SAT>IP tuners.
|
||||
|
||||
The plugin accepts also a "--server" (-s) command-line parameter, that
|
||||
|
1
config.c
1
config.c
@@ -17,6 +17,7 @@ cSatipConfig::cSatipConfig(void)
|
||||
ciExtensionM(0),
|
||||
eitScanM(1),
|
||||
useBytesM(1),
|
||||
detachedModeM(false),
|
||||
disableServerQuirksM(false),
|
||||
useSingleModelServersM(false)
|
||||
{
|
||||
|
3
config.h
3
config.h
@@ -19,6 +19,7 @@ private:
|
||||
unsigned int ciExtensionM;
|
||||
unsigned int eitScanM;
|
||||
unsigned int useBytesM;
|
||||
bool detachedModeM;
|
||||
bool disableServerQuirksM;
|
||||
bool useSingleModelServersM;
|
||||
int cicamsM[MAX_CICAM_COUNT];
|
||||
@@ -66,6 +67,7 @@ public:
|
||||
int GetCICAM(unsigned int indexP) const;
|
||||
unsigned int GetEITScan(void) const { return eitScanM; }
|
||||
unsigned int GetUseBytes(void) const { return useBytesM; }
|
||||
bool GetDetachedMode(void) const { return detachedModeM; }
|
||||
bool GetDisableServerQuirks(void) const { return disableServerQuirksM; }
|
||||
bool GetUseSingleModelServers(void) const { return useSingleModelServersM; }
|
||||
unsigned int GetDisabledSourcesCount(void) const;
|
||||
@@ -79,6 +81,7 @@ public:
|
||||
void SetCICAM(unsigned int indexP, int cicamP);
|
||||
void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; }
|
||||
void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; }
|
||||
void SetDetachedMode(bool onOffP) { detachedModeM = onOffP; }
|
||||
void SetDisableServerQuirks(bool onOffP) { disableServerQuirksM = onOffP; }
|
||||
void SetUseSingleModelServers(bool onOffP) { useSingleModelServersM = onOffP; }
|
||||
void SetDisabledSources(unsigned int indexP, int sourceP);
|
||||
|
4
device.c
4
device.c
@@ -219,6 +219,8 @@ bool cSatipDevice::ProvidesSource(int sourceP) const
|
||||
{
|
||||
cSource *s = Sources.Get(sourceP);
|
||||
debug9("%s (%c) desc='%s' [device %u]", __PRETTY_FUNCTION__, cSource::ToChar(sourceP), s ? s->Description() : "", deviceIndexM);
|
||||
if (SatipConfig.GetDetachedMode())
|
||||
return false;
|
||||
// source descriptions starting with '0' are disabled
|
||||
if (s && s->Description() && (*(s->Description()) == '0'))
|
||||
return false;
|
||||
@@ -501,6 +503,8 @@ void cSatipDevice::SkipData(int countP)
|
||||
bool cSatipDevice::GetTSPacket(uchar *&dataP)
|
||||
{
|
||||
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||
if (SatipConfig.GetDetachedMode())
|
||||
return false;
|
||||
if (tsBufferM) {
|
||||
if (cCamSlot *cs = CamSlot()) {
|
||||
if (cs->WantsTsData()) {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-satip 2.2.1\n"
|
||||
"Project-Id-Version: vdr-satip 2.2.2\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
"POT-Creation-Date: 2015-04-26 04:26+0300\n"
|
||||
"PO-Revision-Date: 2015-04-26 04:26+0300\n"
|
||||
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
||||
"Language-Team: Catalan <vdr@linuxtv.org>\n"
|
||||
"Language: ca\n"
|
||||
|
@@ -5,10 +5,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-satip 2.2.1\n"
|
||||
"Project-Id-Version: vdr-satip 2.2.2\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
"POT-Creation-Date: 2015-04-26 04:26+0300\n"
|
||||
"PO-Revision-Date: 2015-04-26 04:26+0300\n"
|
||||
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
||||
"Language-Team: German <vdr@linuxtv.org>\n"
|
||||
"Language: de\n"
|
||||
|
@@ -5,10 +5,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-satip 2.2.1\n"
|
||||
"Project-Id-Version: vdr-satip 2.2.2\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
"POT-Creation-Date: 2015-04-26 04:26+0300\n"
|
||||
"PO-Revision-Date: 2015-04-26 04:26+0300\n"
|
||||
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
||||
"Language-Team: Spanish <vdr@linuxtv.org>\n"
|
||||
"Language: es\n"
|
||||
|
@@ -5,10 +5,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-satip 2.2.1\n"
|
||||
"Project-Id-Version: vdr-satip 2.2.2\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
"POT-Creation-Date: 2015-04-26 04:26+0300\n"
|
||||
"PO-Revision-Date: 2015-04-26 04:26+0300\n"
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
||||
"Language: fi\n"
|
||||
|
44
satip.c
44
satip.c
@@ -27,7 +27,7 @@
|
||||
#define GITVERSION ""
|
||||
#endif
|
||||
|
||||
const char VERSION[] = "2.2.1" GITVERSION;
|
||||
const char VERSION[] = "2.2.2" GITVERSION;
|
||||
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
||||
|
||||
class cPluginSatip : public cPlugin {
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
};
|
||||
|
||||
cPluginSatip::cPluginSatip(void)
|
||||
: deviceCountM(1),
|
||||
: deviceCountM(2),
|
||||
serversM(NULL)
|
||||
{
|
||||
debug16("%s", __PRETTY_FUNCTION__);
|
||||
@@ -85,6 +85,7 @@ const char *cPluginSatip::CommandLineHelp(void)
|
||||
" -t <mode>, --trace=<mode> set the tracing mode\n"
|
||||
" -s <ipaddr>|<model>|<desc>, --server=<ipaddr1>|<model1>|<desc1>;<ipaddr2>|<model2>|<desc2>\n"
|
||||
" define hard-coded SAT>IP server(s)\n"
|
||||
" -D, --detach set the detached mode on\n"
|
||||
" -S, --single set the single model server mode on\n"
|
||||
" -n, --noquirks disable all the server quirks\n";
|
||||
}
|
||||
@@ -97,6 +98,7 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
||||
{ "devices", required_argument, NULL, 'd' },
|
||||
{ "trace", required_argument, NULL, 't' },
|
||||
{ "server", required_argument, NULL, 's' },
|
||||
{ "detach", no_argument, NULL, 'D' },
|
||||
{ "single", no_argument, NULL, 'S' },
|
||||
{ "noquirks", no_argument, NULL, 'n' },
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
@@ -104,7 +106,7 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
||||
|
||||
cString server;
|
||||
int c;
|
||||
while ((c = getopt_long(argc, argv, "d:t:s:Sn", long_options, NULL)) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "d:t:s:DSn", long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
deviceCountM = strtol(optarg, NULL, 0);
|
||||
@@ -115,6 +117,9 @@ bool cPluginSatip::ProcessArgs(int argc, char *argv[])
|
||||
case 's':
|
||||
server = optarg;
|
||||
break;
|
||||
case 'D':
|
||||
SatipConfig.SetDetachedMode(true);
|
||||
break;
|
||||
case 'S':
|
||||
SatipConfig.SetUseSingleModelServers(true);
|
||||
break;
|
||||
@@ -366,8 +371,12 @@ const char **cPluginSatip::SVDRPHelpPages(void)
|
||||
" Lists status information of SAT>IP devices.\n",
|
||||
"CONT\n"
|
||||
" Shows SAT>IP device count.\n",
|
||||
"OPER\n"
|
||||
" Toggles operating mode of SAT>IP devices.\n",
|
||||
"OPER [ off | low | normal | high ]\n"
|
||||
" Gets and(or sets operating mode of SAT>IP devices.\n",
|
||||
"ATTA\n"
|
||||
" Attach active SAT>IP servers.\n",
|
||||
"DETA\n"
|
||||
" Detachs active SAT>IP servers.\n",
|
||||
"TRAC [ <mode> ]\n"
|
||||
" Gets and/or sets used tracing mode.\n",
|
||||
NULL
|
||||
@@ -434,8 +443,19 @@ cString cPluginSatip::SVDRPCommand(const char *commandP, const char *optionP, in
|
||||
}
|
||||
else if (strcasecmp(commandP, "OPER") == 0) {
|
||||
cString mode;
|
||||
SatipConfig.ToggleOperatingMode();
|
||||
switch (SatipConfig.GetOperatingMode()) {
|
||||
unsigned int oper = SatipConfig.GetOperatingMode();
|
||||
if (optionP && *optionP) {
|
||||
if (strcasecmp(optionP, "off") == 0)
|
||||
oper = cSatipConfig::eOperatingModeOff;
|
||||
else if (strcasecmp(optionP, "low") == 0)
|
||||
oper = cSatipConfig::eOperatingModeLow;
|
||||
else if (strcasecmp(optionP, "normal") == 0)
|
||||
oper = cSatipConfig::eOperatingModeNormal;
|
||||
else if (strcasecmp(optionP, "high") == 0)
|
||||
oper = cSatipConfig::eOperatingModeHigh;
|
||||
SatipConfig.SetOperatingMode(oper);
|
||||
}
|
||||
switch (oper) {
|
||||
case cSatipConfig::eOperatingModeOff:
|
||||
mode = "off";
|
||||
break;
|
||||
@@ -454,6 +474,16 @@ cString cPluginSatip::SVDRPCommand(const char *commandP, const char *optionP, in
|
||||
}
|
||||
return cString::sprintf("SATIP operating mode: %s\n", *mode);
|
||||
}
|
||||
else if (strcasecmp(commandP, "ATTA") == 0) {
|
||||
SatipConfig.SetDetachedMode(false);
|
||||
info("SATIP servers attached");
|
||||
return cString("SATIP servers attached");
|
||||
}
|
||||
else if (strcasecmp(commandP, "DETA") == 0) {
|
||||
SatipConfig.SetDetachedMode(true);
|
||||
info("SATIP servers detached");
|
||||
return cString("SATIP servers detached");
|
||||
}
|
||||
else if (strcasecmp(commandP, "TRAC") == 0) {
|
||||
if (optionP && *optionP)
|
||||
SatipConfig.SetTraceMode(strtol(optionP, NULL, 0));
|
||||
|
20
setup.c
20
setup.c
@@ -330,7 +330,8 @@ eOSState cSatipMenuInfo::ProcessKey(eKeys keyP)
|
||||
// --- cSatipPluginSetup ------------------------------------------------------
|
||||
|
||||
cSatipPluginSetup::cSatipPluginSetup()
|
||||
: deviceCountM(0),
|
||||
: detachedModeM(SatipConfig.GetDetachedMode()),
|
||||
deviceCountM(0),
|
||||
operatingModeM(SatipConfig.GetOperatingMode()),
|
||||
ciExtensionM(SatipConfig.GetCIExtension()),
|
||||
eitScanM(SatipConfig.GetEITScan()),
|
||||
@@ -402,12 +403,15 @@ void cSatipPluginSetup::Setup(void)
|
||||
Add(new cOsdItem(tr("Active SAT>IP servers:"), osUnknown, false));
|
||||
helpM.Append("");
|
||||
|
||||
cSatipServers *servers = cSatipDiscover::GetInstance()->GetServers();
|
||||
deviceCountM = servers->Count();
|
||||
for (cSatipServer *s = servers->First(); s; s = servers->Next(s)) {
|
||||
Add(new cSatipServerItem(s));
|
||||
helpM.Append("");
|
||||
}
|
||||
detachedModeM = SatipConfig.GetDetachedMode();
|
||||
if (!detachedModeM) {
|
||||
cSatipServers *servers = cSatipDiscover::GetInstance()->GetServers();
|
||||
deviceCountM = servers->Count();
|
||||
for (cSatipServer *s = servers->First(); s; s = servers->Next(s)) {
|
||||
Add(new cSatipServerItem(s));
|
||||
helpM.Append("");
|
||||
}
|
||||
}
|
||||
|
||||
SetCurrent(Get(current));
|
||||
Display();
|
||||
@@ -480,7 +484,7 @@ eOSState cSatipPluginSetup::ProcessKey(eKeys keyP)
|
||||
if ((keyP == kNone) && (cSatipDiscover::GetInstance()->GetServers()->Count() != deviceCountM))
|
||||
Setup();
|
||||
|
||||
if ((keyP != kNone) && ((numDisabledSourcesM != oldNumDisabledSources) || (numDisabledFiltersM != oldNumDisabledFilters) || (operatingModeM != oldOperatingMode) || (ciExtensionM != oldCiExtension))) {
|
||||
if ((keyP != kNone) && ((numDisabledSourcesM != oldNumDisabledSources) || (numDisabledFiltersM != oldNumDisabledFilters) || (operatingModeM != oldOperatingMode) || (ciExtensionM != oldCiExtension) || (detachedModeM != SatipConfig.GetDetachedMode()))) {
|
||||
while ((numDisabledSourcesM < oldNumDisabledSources) && (oldNumDisabledSources > 0))
|
||||
disabledSourcesM[--oldNumDisabledSources] = cSource::stNone;
|
||||
while ((numDisabledFiltersM < oldNumDisabledFilters) && (oldNumDisabledFilters > 0))
|
||||
|
Reference in New Issue
Block a user