mirror of
				https://github.com/rofafor/vdr-plugin-iptv.git
				synced 2023-10-10 11:37:03 +00: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:
		
							
								
								
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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. | ||||
|   | ||||
							
								
								
									
										3
									
								
								device.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								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(); | ||||
|   | ||||
							
								
								
									
										2
									
								
								iptv.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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 { | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user