[vdr-plugin-satip] 01/03: Imported Upstream version 2.2.2

Frank Neumann fnu-guest at moszumanska.debian.org
Sun Apr 26 10:40:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

fnu-guest pushed a commit to branch master
in repository vdr-plugin-satip.

commit d084f4a00c503c56c709a39b36aaa140d74d51ea
Author: Frank Neumann <fnu at yavdr.org>
Date:   Sun Apr 26 12:37:58 2015 +0200

    Imported Upstream version 2.2.2
---
 HISTORY     |  7 +++++++
 README      |  2 +-
 config.c    |  1 +
 config.h    |  3 +++
 device.c    |  4 ++++
 po/ca_ES.po |  6 +++---
 po/de_DE.po |  6 +++---
 po/es_ES.po |  6 +++---
 po/fi_FI.po |  6 +++---
 satip.c     | 44 +++++++++++++++++++++++++++++++++++++-------
 setup.c     | 20 ++++++++++++--------
 setup.h     |  1 +
 12 files changed, 78 insertions(+), 28 deletions(-)

diff --git a/HISTORY b/HISTORY
index 9cee659..381c04b 100644
--- a/HISTORY
+++ b/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.
diff --git a/README b/README
index 7a44ccf..49b0b38 100644
--- a/README
+++ b/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
diff --git a/config.c b/config.c
index a0688cc..050453c 100644
--- a/config.c
+++ b/config.c
@@ -17,6 +17,7 @@ cSatipConfig::cSatipConfig(void)
   ciExtensionM(0),
   eitScanM(1),
   useBytesM(1),
+  detachedModeM(false),
   disableServerQuirksM(false),
   useSingleModelServersM(false)
 {
diff --git a/config.h b/config.h
index 5b11614..b7745cf 100644
--- a/config.h
+++ b/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);
diff --git a/device.c b/device.c
index 6eb25cf..1535c3f 100644
--- a/device.c
+++ b/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()) {
diff --git a/po/ca_ES.po b/po/ca_ES.po
index a39cc70..593e0ad 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -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 at gmail.com>\n"
 "Language-Team: Catalan <vdr at linuxtv.org>\n"
 "Language: ca\n"
diff --git a/po/de_DE.po b/po/de_DE.po
index 1f5be1e..91b8148 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -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 at yavdr.org>\n"
 "Language-Team: German <vdr at linuxtv.org>\n"
 "Language: de\n"
diff --git a/po/es_ES.po b/po/es_ES.po
index 4e0d772..b4654c0 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -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 at gmail.com>\n"
 "Language-Team: Spanish <vdr at linuxtv.org>\n"
 "Language: es\n"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 94608f5..ed7b86c 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -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 at linuxtv.org>\n"
 "Language: fi\n"
diff --git a/satip.c b/satip.c
index 6b58e72..21d08ae 100644
--- a/satip.c
+++ b/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));
diff --git a/setup.c b/setup.c
index 1319eb8..e3eeeab 100644
--- a/setup.c
+++ b/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))
diff --git a/setup.h b/setup.h
index f2489da..d8dcd66 100644
--- a/setup.h
+++ b/setup.h
@@ -15,6 +15,7 @@
 class cSatipPluginSetup : public cMenuSetupPage
 {
 private:
+  bool detachedModeM;
   int deviceCountM;
   int operatingModeM;
   const char *operatingModeTextsM[cSatipConfig::eOperatingModeCount];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-satip.git



More information about the pkg-vdr-dvb-changes mailing list