[SCM] kodi-pvr-hts/master: [API 5.1.1] add support for PVR_CONNECTION_STATE_CONNECTING

tiber-guest at users.alioth.debian.org tiber-guest at users.alioth.debian.org
Fri Nov 4 23:23:39 UTC 2016


The following commit has been merged in the master branch:
commit 81ce7dc26abec3aa098e4d4f9f05ad529919fec4
Author: Kai Sommerfeld <kai.sommerfeld at gmx.com>
Date:   Thu Mar 31 09:55:52 2016 +0200

    [API 5.1.1] add support for PVR_CONNECTION_STATE_CONNECTING

diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp
index 440c7e4..5c9e154 100644
--- a/src/HTSPConnection.cpp
+++ b/src/HTSPConnection.cpp
@@ -105,6 +105,19 @@ CHTSPConnection::~CHTSPConnection()
   StopThread(0);
 }
 
+void CHTSPConnection::Start()
+{
+  // Note: "connecting" must only be set one time, before the very first connection attempt, not on every reconnect.
+  SetState(PVR_CONNECTION_STATE_CONNECTING);
+  CreateThread();
+}
+
+void CHTSPConnection::Stop()
+{
+  StopThread(-1);
+  Disconnect();
+}
+
 /*
  * Info
  */
diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
index 2942de4..db9a47a 100644
--- a/src/Tvheadend.cpp
+++ b/src/Tvheadend.cpp
@@ -52,15 +52,15 @@ CTvheadend::~CTvheadend()
   {
     delete dmx;
   }
-  m_conn.StopThread(-1);
-  m_conn.Disconnect();
+
+  m_conn.Stop();
   StopThread();
 }
 
 void CTvheadend::Start ( void )
 {
   CreateThread();
-  m_conn.CreateThread();
+  m_conn.Start();
 }
 
 /* **************************************************************************
diff --git a/src/Tvheadend.h b/src/Tvheadend.h
index 51ed1b9..ca26a67 100644
--- a/src/Tvheadend.h
+++ b/src/Tvheadend.h
@@ -171,6 +171,8 @@ public:
   CHTSPConnection();
   ~CHTSPConnection();
 
+  void Start       ( void );
+  void Stop        ( void );
   void Disconnect  ( void );
   
   bool      SendMessage0    ( const char *method, htsmsg_t *m );

-- 
kodi-pvr-hts packaging



More information about the pkg-multimedia-commits mailing list