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
to Jeremy Hall).
- 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());
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();

2
iptv.c
View File

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

View File

@ -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: <see README>\n"
"POT-Creation-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 ""
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"
"POT-Creation-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 ""
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"
"POT-Creation-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 ""
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"
"POT-Creation-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 ""
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"
"POT-Creation-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 ""
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"
"POT-Creation-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)
{
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;

View File

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