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

Frank Neumann fnu-guest at moszumanska.debian.org
Sat Nov 21 19:04:10 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 caa6d3874bec36adc6f3ada188c2d9d4e0a52665
Author: Frank Neumann <fnu at yavdr.org>
Date:   Sat Nov 21 19:57:50 2015 +0100

    Imported Upstream version 2.2.3
---
 HISTORY      |  7 +++++++
 device.c     | 19 ++++++++++++++++++-
 device.h     |  3 ++-
 deviceif.h   |  3 ++-
 discoverif.h |  2 +-
 msearch.h    |  2 +-
 po/ca_ES.po  |  2 +-
 po/de_DE.po  |  2 +-
 po/es_ES.po  |  2 +-
 po/fi_FI.po  |  2 +-
 pollerif.h   |  2 +-
 rtcp.c       |  2 +-
 rtcp.h       |  2 +-
 rtp.h        |  2 +-
 rtsp.h       |  2 +-
 satip.c      |  2 +-
 server.c     |  8 ++++++--
 setup.c      |  4 ++--
 tuner.c      | 24 ++++++++++++++++++++++--
 tuner.h      |  2 ++
 tunerif.h    |  2 +-
 21 files changed, 74 insertions(+), 22 deletions(-)

diff --git a/HISTORY b/HISTORY
index 381c04b..c2af5dd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -137,3 +137,10 @@ VDR Plugin 'satip' Revision History
   interface.
 - Added new ATTA and DETA SVDRP commands.
 - Set the default device count to two.
+
+2015-09-18: Version 2.2.3
+
+- Added a timeout for releasing idling devices.
+- Reset the RTSP connection after any failed connect.
+- Added tweaks for minisatip and Schwaiger MS41IP.
+- Updated for vdr-2.3.1 (Thanks to Klaus Schmidinger).
diff --git a/device.c b/device.c
index 1535c3f..ad96434 100644
--- a/device.c
+++ b/device.c
@@ -103,7 +103,12 @@ cString cSatipDevice::GetSatipStatus(void)
          bool live = (device == cDevice::ActualDevice());
          bool lock = device->HasLock();
          const cChannel *channel = device->GetCurrentlyTunedTransponder();
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
+         LOCK_TIMERS_READ;
+         for (const cTimer *timer = Timers->First(); timer; timer = Timers->Next(timer)) {
+#else
          for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
+#endif
              if (timer->Recording()) {
                 cRecordControl *control = cRecordControls::GetRecordControl(timer);
                 if (control && control->Device() == device)
@@ -128,13 +133,20 @@ cString cSatipDevice::GetSatipStatus(void)
 cString cSatipDevice::GetGeneralInformation(void)
 {
   debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
+  LOCK_CHANNELS_READ;
+#endif
   return cString::sprintf("SAT>IP device: %d\nCardIndex: %d\nStream: %s\nSignal: %s\nStream bitrate: %s\n%sChannel: %s",
                           deviceIndexM, CardIndex(),
                           pTunerM ? *pTunerM->GetInformation() : "",
                           pTunerM ? *pTunerM->GetSignalStatus() : "",
                           pTunerM ? *pTunerM->GetTunerStatistic() : "",
                           *GetBufferStatistic(),
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
+                          *Channels->GetByNumber(cDevice::CurrentChannel())->ToText());
+#else
                           *Channels.GetByNumber(cDevice::CurrentChannel())->ToText());
+#endif
 }
 
 cString cSatipDevice::GetPidsInformation(void)
@@ -350,7 +362,7 @@ bool cSatipDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP)
 
 bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP)
 {
-  debug12("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP->pid, typeP, onP, deviceIndexM);
+  debug12("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP ? handleP->pid : -1, typeP, onP, deviceIndexM);
   if (pTunerM && handleP && handleP->pid >= 0) {
      if (onP)
         return pTunerM->SetPid(handleP->pid, typeP, true);
@@ -460,6 +472,11 @@ int cSatipDevice::GetCISlot(void)
   return slot;
 }
 
+bool cSatipDevice::IsIdle(void)
+{
+  return !Receiving();
+}
+
 uchar *cSatipDevice::GetData(int *availableP)
 {
   debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
diff --git a/device.h b/device.h
index bfb7a08..ad18e2f 100644
--- a/device.h
+++ b/device.h
@@ -43,7 +43,7 @@ private:
 
   // constructor & destructor
 public:
-  cSatipDevice(unsigned int deviceIndexP);
+  explicit cSatipDevice(unsigned int deviceIndexP);
   virtual ~cSatipDevice();
   cString GetInformation(unsigned int pageP = SATIP_DEVICE_INFO_ALL);
 
@@ -110,6 +110,7 @@ public:
   virtual int GetId(void);
   virtual int GetPmtPid(void);
   virtual int GetCISlot(void);
+  virtual bool IsIdle(void);
 };
 
 #endif // __SATIP_DEVICE_H
diff --git a/deviceif.h b/deviceif.h
index 719f4c2..b67bfe1 100644
--- a/deviceif.h
+++ b/deviceif.h
@@ -16,9 +16,10 @@ public:
   virtual int GetId(void) = 0;
   virtual int GetPmtPid(void) = 0;
   virtual int GetCISlot(void) = 0;
+  virtual bool IsIdle(void) = 0;
 
 private:
-  cSatipDeviceIf(const cSatipDeviceIf&);
+  explicit cSatipDeviceIf(const cSatipDeviceIf&);
   cSatipDeviceIf& operator=(const cSatipDeviceIf&);
 };
 
diff --git a/discoverif.h b/discoverif.h
index b6218c5..3782b42 100644
--- a/discoverif.h
+++ b/discoverif.h
@@ -15,7 +15,7 @@ public:
   virtual void SetUrl(const char *urlP) = 0;
 
 private:
-  cSatipDiscoverIf(const cSatipDiscoverIf&);
+  explicit cSatipDiscoverIf(const cSatipDiscoverIf&);
   cSatipDiscoverIf& operator=(const cSatipDiscoverIf&);
 };
 
diff --git a/msearch.h b/msearch.h
index b27a008..db00c86 100644
--- a/msearch.h
+++ b/msearch.h
@@ -26,7 +26,7 @@ private:
   bool registeredM;
 
 public:
-  cSatipMsearch(cSatipDiscoverIf &discoverP);
+  explicit cSatipMsearch(cSatipDiscoverIf &discoverP);
   virtual ~cSatipMsearch();
   void Probe(void);
 
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 593e0ad..653f8fe 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -5,7 +5,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: vdr-satip 2.2.2\n"
+"Project-Id-Version: vdr-satip 2.2.3\n"
 "Report-Msgid-Bugs-To: <see README>\n"
 "POT-Creation-Date: 2015-04-26 04:26+0300\n"
 "PO-Revision-Date: 2015-04-26 04:26+0300\n"
diff --git a/po/de_DE.po b/po/de_DE.po
index 91b8148..b1794cd 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -5,7 +5,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: vdr-satip 2.2.2\n"
+"Project-Id-Version: vdr-satip 2.2.3\n"
 "Report-Msgid-Bugs-To: <see README>\n"
 "POT-Creation-Date: 2015-04-26 04:26+0300\n"
 "PO-Revision-Date: 2015-04-26 04:26+0300\n"
diff --git a/po/es_ES.po b/po/es_ES.po
index b4654c0..dbc27d3 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -5,7 +5,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: vdr-satip 2.2.2\n"
+"Project-Id-Version: vdr-satip 2.2.3\n"
 "Report-Msgid-Bugs-To: <see README>\n"
 "POT-Creation-Date: 2015-04-26 04:26+0300\n"
 "PO-Revision-Date: 2015-04-26 04:26+0300\n"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index ed7b86c..fbad1b1 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -5,7 +5,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: vdr-satip 2.2.2\n"
+"Project-Id-Version: vdr-satip 2.2.3\n"
 "Report-Msgid-Bugs-To: <see README>\n"
 "POT-Creation-Date: 2015-04-26 04:26+0300\n"
 "PO-Revision-Date: 2015-04-26 04:26+0300\n"
diff --git a/pollerif.h b/pollerif.h
index 79d4a96..3447871 100644
--- a/pollerif.h
+++ b/pollerif.h
@@ -17,7 +17,7 @@ public:
   virtual cString ToString(void) const = 0;
 
 private:
-  cSatipPollerIf(const cSatipPollerIf&);
+  explicit cSatipPollerIf(const cSatipPollerIf&);
   cSatipPollerIf& operator=(const cSatipPollerIf&);
 };
 
diff --git a/rtcp.c b/rtcp.c
index f88c805..c815287 100644
--- a/rtcp.c
+++ b/rtcp.c
@@ -36,7 +36,7 @@ int cSatipRtcp::GetFd(void)
 
 int cSatipRtcp::GetApplicationOffset(int *lengthP)
 {
-  debug16("%s (%d) [device %d]", __PRETTY_FUNCTION__, *lengthP, tunerM.GetId());
+  debug16("%s (%d) [device %d]", __PRETTY_FUNCTION__, lengthP ? *lengthP : -1, tunerM.GetId());
   if (!lengthP)
      return -1;
   int offset = 0;
diff --git a/rtcp.h b/rtcp.h
index 9b31241..59fb176 100644
--- a/rtcp.h
+++ b/rtcp.h
@@ -23,7 +23,7 @@ private:
   int GetApplicationOffset(int *lengthP);
 
 public:
-  cSatipRtcp(cSatipTunerIf &tunerP);
+  explicit cSatipRtcp(cSatipTunerIf &tunerP);
   virtual ~cSatipRtcp();
 
   // for internal poller interface
diff --git a/rtp.h b/rtp.h
index 5080e37..104a49c 100644
--- a/rtp.h
+++ b/rtp.h
@@ -28,7 +28,7 @@ private:
   int GetHeaderLength(unsigned char *bufferP, unsigned int lengthP);
 
 public:
-  cSatipRtp(cSatipTunerIf &tunerP);
+  explicit cSatipRtp(cSatipTunerIf &tunerP);
   virtual ~cSatipRtp();
   virtual void Close(void);
 
diff --git a/rtsp.h b/rtsp.h
index 3949524..1897ac6 100644
--- a/rtsp.h
+++ b/rtsp.h
@@ -50,7 +50,7 @@ private:
   cSatipRtsp& operator=(const cSatipRtsp&);
 
 public:
-  cSatipRtsp(cSatipTunerIf &tunerP);
+  explicit cSatipRtsp(cSatipTunerIf &tunerP);
   virtual ~cSatipRtsp();
 
   cString RtspUnescapeString(const char *strP);
diff --git a/satip.c b/satip.c
index 21d08ae..3453c48 100644
--- a/satip.c
+++ b/satip.c
@@ -27,7 +27,7 @@
 #define GITVERSION ""
 #endif
 
-       const char VERSION[]     = "2.2.2" GITVERSION;
+       const char VERSION[]     = "2.2.3" GITVERSION;
 static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
 
 class cPluginSatip : public cPlugin {
diff --git a/server.c b/server.c
index d3f6c67..b732b3b 100644
--- a/server.c
+++ b/server.c
@@ -108,7 +108,8 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
         quirksM = cString::sprintf("%s%sPlayPids", *quirksM, isempty(*quirksM) ? "" : ",");
         }
      // These devices contain a frontend locking bug:
-     if (strstr(*descriptionM, "fritzdvbc")             // Fritz!WLAN Repeater DVB-C
+     if (strstr(*descriptionM, "fritzdvbc") ||            // Fritz!WLAN Repeater DVB-C
+         strstr(*descriptionM, "Schwaiger Sat>IP Server") // Schwaiger MS41IP
         ) {
         quirkM |= eSatipQuirkForceLock;
         quirksM = cString::sprintf("%s%sForceLock", *quirksM, isempty(*quirksM) ? "" : ",");
@@ -116,8 +117,11 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
      debug3("%s description=%s quirks=%s", __PRETTY_FUNCTION__, *descriptionM, *quirksM);
      }
   // These devices support the X_PMT protocol extension
-  if (strstr(*descriptionM, "OctopusNet"))              // Digital Devices OctopusNet
+  if (strstr(*descriptionM, "OctopusNet") ||            // Digital Devices OctopusNet
+      strstr(*descriptionM, "minisatip")                // minisatip server
+     ) {
      hasCiM = true;
+     }
   char *s, *p = strdup(*modelM);
   char *r = strtok_r(p, ",", &s);
   while (r) {
diff --git a/setup.c b/setup.c
index e3eeeab..479ea97 100644
--- a/setup.c
+++ b/setup.c
@@ -94,7 +94,7 @@ private:
   void Setup(void);
 
 public:
-  cSatipServerInfo(cSatipServer *serverP);
+  explicit cSatipServerInfo(cSatipServer *serverP);
   virtual ~cSatipServerInfo();
   virtual eOSState ProcessKey(eKeys keyP);
 };
@@ -145,7 +145,7 @@ private:
   cSatipServer *serverM;
 
 public:
-  cSatipServerItem(cSatipServer *serverP);
+  explicit cSatipServerItem(cSatipServer *serverP);
   cSatipServer *Server(void) { return serverM; }
   virtual void SetMenuItem(cSkinDisplayMenu *displayMenuP, int indexP, bool currentP, bool selectableP);
   };
diff --git a/tuner.c b/tuner.c
index 07be861..c12a19e 100644
--- a/tuner.c
+++ b/tuner.c
@@ -91,6 +91,10 @@ cSatipTuner::~cSatipTuner()
 void cSatipTuner::Action(void)
 {
   debug1("%s Entering [device %d]", __PRETTY_FUNCTION__, deviceIdM);
+
+  bool lastIdleStatus = false;
+  cTimeMs idleCheck(eIdleCheckTimeoutMs);
+  cTimeMs tuning(eTuningTimeoutMs);
   reConnectM.Set(eConnectTimeoutMs);
   // Do the thread loop
   while (Running()) {
@@ -107,6 +111,7 @@ void cSatipTuner::Action(void)
           case tsSet:
                debug4("%s: tsSet [device %d]", __PRETTY_FUNCTION__, deviceIdM);
                if (Connect()) {
+                  tuning.Set(eTuningTimeoutMs);
                   RequestState(tsTuned, smInternal);
                   UpdatePids(true);
                   }
@@ -116,6 +121,8 @@ void cSatipTuner::Action(void)
           case tsTuned:
                debug4("%s: tsTuned [device %d]", __PRETTY_FUNCTION__, deviceIdM);
                reConnectM.Set(eConnectTimeoutMs);
+               idleCheck.Set(eIdleCheckTimeoutMs);
+               lastIdleStatus = false;
                // Read reception statistics via DESCRIBE and RTCP
                if (hasLockM || ReadReceptionStatus()) {
                   // Quirk for devices without valid reception data
@@ -127,6 +134,10 @@ void cSatipTuner::Action(void)
                   if (hasLockM)
                      RequestState(tsLocked, smInternal);
                   }
+               else if (tuning.TimedOut()) {
+                  error("Tuning timeout - retuning [device %d]", deviceIdM);
+                  RequestState(tsSet, smInternal);
+                  }
                break;
           case tsLocked:
                debug4("%s: tsLocked [device %d]", __PRETTY_FUNCTION__, deviceIdM);
@@ -145,6 +156,16 @@ void cSatipTuner::Action(void)
                   RequestState(tsSet, smInternal);
                   break;
                   }
+               if (idleCheck.TimedOut()) {
+                  bool currentIdleStatus = deviceM->IsIdle();
+                  if (lastIdleStatus && currentIdleStatus) {
+                     info("Idle timeout - releasing [device %d]", deviceIdM);
+                     RequestState(tsRelease, smInternal);
+                     }
+                  lastIdleStatus = currentIdleStatus;
+                  idleCheck.Set(eIdleCheckTimeoutMs);
+                  break;
+                  }
                break;
           default:
                error("Unknown tuner status %d [device %d]", currentStateM, deviceIdM);
@@ -209,8 +230,7 @@ bool cSatipTuner::Connect(void)
            return true;
            }
         }
-     else
-        rtspM.Reset();
+     rtspM.Reset();
      streamIdM = -1;
      error("Connect failed [device %d]", deviceIdM);
      }
diff --git a/tuner.h b/tuner.h
index 8ef0beb..1c7f655 100644
--- a/tuner.h
+++ b/tuner.h
@@ -83,6 +83,8 @@ private:
     eStatusUpdateTimeoutMs  = 1000,  // in milliseconds
     ePidUpdateIntervalMs    = 250,   // in milliseconds
     eConnectTimeoutMs       = 5000,  // in milliseconds
+    eIdleCheckTimeoutMs     = 15000, // in milliseconds
+    eTuningTimeoutMs        = 20000, // in milliseconds
     eMinKeepAliveIntervalMs = 30000  // in milliseconds
   };
   enum eTunerState { tsIdle, tsRelease, tsSet, tsTuned, tsLocked };
diff --git a/tunerif.h b/tunerif.h
index 3790bcd..f5ea6a6 100644
--- a/tunerif.h
+++ b/tunerif.h
@@ -19,7 +19,7 @@ public:
   virtual int GetId(void) = 0;
 
 private:
-  cSatipTunerIf(const cSatipTunerIf&);
+  explicit cSatipTunerIf(const cSatipTunerIf&);
   cSatipTunerIf& operator=(const cSatipTunerIf&);
 };
 

-- 
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