1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Enabled I/O throttling and tweaked buffer timeouts and tweaked max address string size to include a termination NULL byte.

This commit is contained in:
Rolf Ahrenberg 2013-03-11 17:59:59 +02:00
parent 41fe387018
commit 0caf746ef4
11 changed files with 19 additions and 12 deletions

View File

@ -199,3 +199,7 @@ VDR Plugin 'iptv' Revision History
- Fixed bugs found in the CURL implementation (Thanks - Fixed bugs found in the CURL implementation (Thanks
to Jeremy Hall). to Jeremy Hall).
- Fixed the channel editor. - Fixed the channel editor.
2013-xx-xx: Version 1.2.2
- Enabled I/O throttling and tweaked buffer timeouts.

View File

@ -27,7 +27,8 @@ cIptvDevice::cIptvDevice(unsigned int indexP)
isyslog("creating IPTV device %d (CardIndex=%d)", deviceIndexM, CardIndex()); isyslog("creating IPTV device %d (CardIndex=%d)", deviceIndexM, CardIndex());
tsBufferM = new cRingBufferLinear(bufsize + 1, TS_SIZE, false, tsBufferM = new cRingBufferLinear(bufsize + 1, TS_SIZE, false,
*cString::sprintf("IPTV %d", deviceIndexM)); *cString::sprintf("IPTV %d", deviceIndexM));
tsBufferM->SetTimeouts(10, 10); tsBufferM->SetTimeouts(100, 100);
tsBufferM->SetIoThrottle();
ResetBuffering(); ResetBuffering();
pUdpProtocolM = new cIptvProtocolUdp(); pUdpProtocolM = new cIptvProtocolUdp();
pCurlProtocolM = new cIptvProtocolCurl(); pCurlProtocolM = new cIptvProtocolCurl();

2
iptv.c
View File

@ -21,7 +21,7 @@
#define GITVERSION "" #define GITVERSION ""
#endif #endif
const char VERSION[] = "1.2.1" GITVERSION; const char VERSION[] = "1.2.2" GITVERSION;
static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
class cPluginIptv : public cPlugin { class cPluginIptv : public cPlugin {

View File

@ -5,7 +5,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 1.2.1\n" "Project-Id-Version: vdr-iptv 1.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-06-03 06:03+0300\n" "POT-Creation-Date: 2012-06-03 06:03+0300\n"
"PO-Revision-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n"

View File

@ -5,7 +5,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 1.2.1\n" "Project-Id-Version: vdr-iptv 1.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-06-03 06:03+0300\n" "POT-Creation-Date: 2012-06-03 06:03+0300\n"
"PO-Revision-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n"

View File

@ -6,7 +6,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 1.2.1\n" "Project-Id-Version: vdr-iptv 1.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-06-03 06:03+0300\n" "POT-Creation-Date: 2012-06-03 06:03+0300\n"
"PO-Revision-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n"

View File

@ -5,7 +5,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 1.2.1\n" "Project-Id-Version: vdr-iptv 1.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-06-03 06:03+0300\n" "POT-Creation-Date: 2012-06-03 06:03+0300\n"
"PO-Revision-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n"

View File

@ -5,7 +5,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 1.2.1\n" "Project-Id-Version: vdr-iptv 1.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-06-03 06:03+0300\n" "POT-Creation-Date: 2012-06-03 06:03+0300\n"
"PO-Revision-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n"

View File

@ -5,7 +5,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 1.2.1\n" "Project-Id-Version: vdr-iptv 1.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-06-03 06:03+0300\n" "POT-Creation-Date: 2012-06-03 06:03+0300\n"
"PO-Revision-Date: 2012-06-03 06:03+0300\n" "PO-Revision-Date: 2012-06-03 06:03+0300\n"

View File

@ -34,8 +34,10 @@ cIptvProtocolCurl::cIptvProtocolCurl()
pausedM(false) pausedM(false)
{ {
debug("cIptvProtocolCurl::%s()", __FUNCTION__); debug("cIptvProtocolCurl::%s()", __FUNCTION__);
if (ringBufferM) if (ringBufferM) {
ringBufferM->SetTimeouts(100, 0); ringBufferM->SetTimeouts(100, 0);
ringBufferM->SetIoThrottle();
}
Connect(); Connect();
} }
@ -444,9 +446,9 @@ int cIptvProtocolCurl::Read(unsigned char* bufferAddrP, unsigned int bufferLenP)
res = curl_multi_perform(multiM, &running_handles); res = curl_multi_perform(multiM, &running_handles);
} while (res == CURLM_CALL_MULTI_PERFORM); } 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(); 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__, debug("cIptvProtocolCurl::%s(continue): free=%d available=%d", __FUNCTION__,
ringBufferM->Free(), ringBufferM->Available()); ringBufferM->Free(), ringBufferM->Available());
pausedM = false; pausedM = false;

View File

@ -20,7 +20,7 @@ private:
int sidScanM; int sidScanM;
int pidScanM; int pidScanM;
int protocolM; int protocolM;
char addressM[NAME_MAX]; char addressM[NAME_MAX + 1];
int parameterM; int parameterM;
public: public: