diff --git a/HISTORY b/HISTORY index 17efc1e..c548056 100644 --- a/HISTORY +++ b/HISTORY @@ -199,3 +199,7 @@ VDR Plugin 'iptv' Revision History - Fixed bugs found in the CURL implementation (Thanks to Jeremy Hall). - Fixed the channel editor. + +2013-xx-xx: Version 1.2.2 + +- Enabled I/O throttling and tweaked buffer timeouts. diff --git a/device.c b/device.c index bd59212..4aa52ee 100644 --- a/device.c +++ b/device.c @@ -27,7 +27,8 @@ cIptvDevice::cIptvDevice(unsigned int indexP) isyslog("creating IPTV device %d (CardIndex=%d)", deviceIndexM, CardIndex()); tsBufferM = new cRingBufferLinear(bufsize + 1, TS_SIZE, false, *cString::sprintf("IPTV %d", deviceIndexM)); - tsBufferM->SetTimeouts(10, 10); + tsBufferM->SetTimeouts(100, 100); + tsBufferM->SetIoThrottle(); ResetBuffering(); pUdpProtocolM = new cIptvProtocolUdp(); pCurlProtocolM = new cIptvProtocolCurl(); diff --git a/iptv.c b/iptv.c index 9826e43..6e86c20 100644 --- a/iptv.c +++ b/iptv.c @@ -21,7 +21,7 @@ #define GITVERSION "" #endif - const char VERSION[] = "1.2.1" GITVERSION; + const char VERSION[] = "1.2.2" GITVERSION; static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); class cPluginIptv : public cPlugin { diff --git a/po/de_DE.po b/po/de_DE.po index 631b099..3a339a2 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 1.2.1\n" +"Project-Id-Version: vdr-iptv 1.2.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index c3a29da..bc2a6dc 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 1.2.1\n" +"Project-Id-Version: vdr-iptv 1.2.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index 1e15465..dc5c5f9 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -6,7 +6,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 1.2.1\n" +"Project-Id-Version: vdr-iptv 1.2.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n" diff --git a/po/it_IT.po b/po/it_IT.po index 9113ddf..629d575 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 1.2.1\n" +"Project-Id-Version: vdr-iptv 1.2.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n" diff --git a/po/nl_NL.po b/po/nl_NL.po index 1a33d68..4ff8715 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 1.2.1\n" +"Project-Id-Version: vdr-iptv 1.2.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index 91015b5..24698fc 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 1.2.1\n" +"Project-Id-Version: vdr-iptv 1.2.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n" diff --git a/protocolcurl.c b/protocolcurl.c index 74343c3..c17fe2e 100644 --- a/protocolcurl.c +++ b/protocolcurl.c @@ -34,8 +34,10 @@ cIptvProtocolCurl::cIptvProtocolCurl() pausedM(false) { debug("cIptvProtocolCurl::%s()", __FUNCTION__); - if (ringBufferM) + if (ringBufferM) { ringBufferM->SetTimeouts(100, 0); + ringBufferM->SetIoThrottle(); + } Connect(); } @@ -444,9 +446,9 @@ int cIptvProtocolCurl::Read(unsigned char* bufferAddrP, unsigned int bufferLenP) res = curl_multi_perform(multiM, &running_handles); } while (res == CURLM_CALL_MULTI_PERFORM); - // Shall we continue filling up the buffer? + // Use 20% threshold before continuing to filling up the buffer. mutexM.Lock(); - if (pausedM && (ringBufferM->Free() > ringBufferM->Available())) { + if (pausedM && (ringBufferM->Available() < (MEGABYTE(IptvConfig.GetTsBufferSize()) / 5))) { debug("cIptvProtocolCurl::%s(continue): free=%d available=%d", __FUNCTION__, ringBufferM->Free(), ringBufferM->Available()); pausedM = false; diff --git a/source.h b/source.h index 9f2f6ee..5e8ca13 100644 --- a/source.h +++ b/source.h @@ -20,7 +20,7 @@ private: int sidScanM; int pidScanM; int protocolM; - char addressM[NAME_MAX]; + char addressM[NAME_MAX + 1]; int parameterM; public: