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

Removed unnecessary TS buffer settings.

This commit is contained in:
Rolf Ahrenberg 2014-04-05 19:01:36 +03:00
parent 688c7db1fc
commit dc9f9f2b86
17 changed files with 14 additions and 197 deletions

View File

@ -251,3 +251,4 @@ VDR Plugin 'iptv' Revision History
2014-04-12: Version 2.1.3 2014-04-12: Version 2.1.3
- Updated the section filtering options. - Updated the section filtering options.
- Removed unnecessary TS buffer settings.

View File

@ -24,6 +24,8 @@
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0])) #define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
#define IPTV_BUFFER_SIZE MEGABYTE(1)
#define IPTV_DVR_FILENAME "/tmp/vdr-iptv%d.dvr" #define IPTV_DVR_FILENAME "/tmp/vdr-iptv%d.dvr"
#define IPTV_SOURCE_CHARACTER 'I' #define IPTV_SOURCE_CHARACTER 'I'

View File

@ -10,9 +10,7 @@
cIptvConfig IptvConfig; cIptvConfig IptvConfig;
cIptvConfig::cIptvConfig(void) cIptvConfig::cIptvConfig(void)
: tsBufferSizeM(2), : protocolBasePortM(4321),
tsBufferPrefillRatioM(0),
protocolBasePortM(4321),
useBytesM(1), useBytesM(1),
sectionFilteringM(1) sectionFilteringM(1)
{ {

View File

@ -14,8 +14,6 @@
class cIptvConfig class cIptvConfig
{ {
private: private:
unsigned int tsBufferSizeM;
unsigned int tsBufferPrefillRatioM;
unsigned int protocolBasePortM; unsigned int protocolBasePortM;
unsigned int useBytesM; unsigned int useBytesM;
unsigned int sectionFilteringM; unsigned int sectionFilteringM;
@ -25,8 +23,6 @@ private:
public: public:
cIptvConfig(); cIptvConfig();
unsigned int GetTsBufferSize(void) const { return tsBufferSizeM; }
unsigned int GetTsBufferPrefillRatio(void) const { return tsBufferPrefillRatioM; }
unsigned int GetProtocolBasePort(void) const { return protocolBasePortM; } unsigned int GetProtocolBasePort(void) const { return protocolBasePortM; }
unsigned int GetUseBytes(void) const { return useBytesM; } unsigned int GetUseBytes(void) const { return useBytesM; }
unsigned int GetSectionFiltering(void) const { return sectionFilteringM; } unsigned int GetSectionFiltering(void) const { return sectionFilteringM; }
@ -34,8 +30,6 @@ public:
const char *GetResourceDirectory(void) const { return resourceDirectoryM; } const char *GetResourceDirectory(void) const { return resourceDirectoryM; }
unsigned int GetDisabledFiltersCount(void) const; unsigned int GetDisabledFiltersCount(void) const;
int GetDisabledFilters(unsigned int indexP) const; int GetDisabledFilters(unsigned int indexP) const;
void SetTsBufferSize(unsigned int sizeP) { tsBufferSizeM = sizeP; }
void SetTsBufferPrefillRatio(unsigned int ratioP) { tsBufferPrefillRatioM = ratioP; }
void SetProtocolBasePort(unsigned int portNumberP) { protocolBasePortM = portNumberP; } void SetProtocolBasePort(unsigned int portNumberP) { protocolBasePortM = portNumberP; }
void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; } void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; }
void SetSectionFiltering(unsigned int onOffP) { sectionFilteringM = onOffP; } void SetSectionFiltering(unsigned int onOffP) { sectionFilteringM = onOffP; }

View File

@ -22,7 +22,7 @@ cIptvDevice::cIptvDevice(unsigned int indexP)
pidScanEnabledM(false), pidScanEnabledM(false),
channelM() channelM()
{ {
unsigned int bufsize = (unsigned int)MEGABYTE(IptvConfig.GetTsBufferSize()); unsigned int bufsize = (unsigned int)IPTV_BUFFER_SIZE;
bufsize -= (bufsize % TS_SIZE); bufsize -= (bufsize % TS_SIZE);
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,
@ -32,7 +32,6 @@ cIptvDevice::cIptvDevice(unsigned int indexP)
tsBufferM->SetIoThrottle(); tsBufferM->SetIoThrottle();
pIptvStreamerM = new cIptvStreamer(*this, tsBufferM->Free()); pIptvStreamerM = new cIptvStreamer(*this, tsBufferM->Free());
} }
ResetBuffering();
pUdpProtocolM = new cIptvProtocolUdp(); pUdpProtocolM = new cIptvProtocolUdp();
pCurlProtocolM = new cIptvProtocolCurl(); pCurlProtocolM = new cIptvProtocolCurl();
pHttpProtocolM = new cIptvProtocolHttp(); pHttpProtocolM = new cIptvProtocolHttp();
@ -305,7 +304,7 @@ bool cIptvDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP)
bool cIptvDevice::SetPid(cPidHandle *handleP, int typeP, bool onP) bool cIptvDevice::SetPid(cPidHandle *handleP, int typeP, bool onP)
{ {
debug("cIptvDevice::%s(%d): pid=%d type=%d on=%d", __FUNCTION__, deviceIndexM, handleP->pid, typeP, onP); debug("cIptvDevice::%s(%d): pid=%d type=%d on=%d", __FUNCTION__, deviceIndexM, handleP ? handleP->pid : -1, typeP, onP);
if (pIptvStreamerM && handleP) if (pIptvStreamerM && handleP)
return pIptvStreamerM->SetPid(handleP->pid, typeP, onP); return pIptvStreamerM->SetPid(handleP->pid, typeP, onP);
return true; return true;
@ -337,7 +336,6 @@ bool cIptvDevice::OpenDvr(void)
debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM); debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM);
isPacketDeliveredM = false; isPacketDeliveredM = false;
tsBufferM->Clear(); tsBufferM->Clear();
ResetBuffering();
if (pIptvStreamerM) if (pIptvStreamerM)
pIptvStreamerM->Open(); pIptvStreamerM->Open();
if (sidScanEnabledM && pSidScannerM && IptvConfig.GetSectionFiltering()) if (sidScanEnabledM && pSidScannerM && IptvConfig.GetSectionFiltering())
@ -363,7 +361,7 @@ void cIptvDevice::CloseDvr(void)
bool cIptvDevice::HasLock(int timeoutMsP) const bool cIptvDevice::HasLock(int timeoutMsP) const
{ {
//debug("cIptvDevice::%s(%d): timeoutMs=%d", __FUNCTION__, deviceIndexM, timeoutMsP); //debug("cIptvDevice::%s(%d): timeoutMs=%d", __FUNCTION__, deviceIndexM, timeoutMsP);
return (!IsBuffering()); return (pIptvStreamerM && pIptvStreamerM->Active());
} }
bool cIptvDevice::HasInternalCam(void) bool cIptvDevice::HasInternalCam(void)
@ -372,25 +370,6 @@ bool cIptvDevice::HasInternalCam(void)
return false; return false;
} }
void cIptvDevice::ResetBuffering(void)
{
debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM);
// Pad prefill to multiple of TS_SIZE
tsBufferPrefillM = (unsigned int)MEGABYTE(IptvConfig.GetTsBufferSize()) *
IptvConfig.GetTsBufferPrefillRatio() / 100;
tsBufferPrefillM -= (tsBufferPrefillM % TS_SIZE);
}
bool cIptvDevice::IsBuffering(void) const
{
//debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM);
if (tsBufferPrefillM && tsBufferM && tsBufferM->Available() < tsBufferPrefillM)
return true;
else
tsBufferPrefillM = 0;
return false;
}
void cIptvDevice::WriteData(uchar *bufferP, int lengthP) void cIptvDevice::WriteData(uchar *bufferP, int lengthP)
{ {
//debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM); //debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM);
@ -420,7 +399,7 @@ unsigned int cIptvDevice::CheckData(void)
uchar *cIptvDevice::GetData(int *availableP) uchar *cIptvDevice::GetData(int *availableP)
{ {
//debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM); //debug("cIptvDevice::%s(%d)", __FUNCTION__, deviceIndexM);
if (isOpenDvrM && tsBufferM && !IsBuffering()) { if (isOpenDvrM && tsBufferM) {
int count = 0; int count = 0;
if (isPacketDeliveredM) if (isPacketDeliveredM)
SkipData(TS_SIZE); SkipData(TS_SIZE);
@ -434,7 +413,7 @@ uchar *cIptvDevice::GetData(int *availableP)
} }
} }
tsBufferM->Del(count); tsBufferM->Del(count);
error("Skipped %d bytes to sync on TS packet", count); info("Skipped %d bytes to sync on TS packet", count);
return NULL; return NULL;
} }
isPacketDeliveredM = true; isPacketDeliveredM = true;

View File

@ -40,7 +40,6 @@ private:
bool sidScanEnabledM; bool sidScanEnabledM;
bool pidScanEnabledM; bool pidScanEnabledM;
cRingBufferLinear *tsBufferM; cRingBufferLinear *tsBufferM;
mutable int tsBufferPrefillM;
cChannel channelM; cChannel channelM;
cIptvProtocolUdp *pUdpProtocolM; cIptvProtocolUdp *pUdpProtocolM;
cIptvProtocolCurl *pCurlProtocolM; cIptvProtocolCurl *pCurlProtocolM;
@ -69,11 +68,6 @@ private:
cString GetPidsInformation(void); cString GetPidsInformation(void);
cString GetFiltersInformation(void); cString GetFiltersInformation(void);
// for channel parsing & buffering
private:
void ResetBuffering(void);
bool IsBuffering(void) const;
// for channel info // for channel info
public: public:
virtual cString DeviceType(void) const; virtual cString DeviceType(void) const;

6
iptv.c
View File

@ -192,11 +192,7 @@ bool cPluginIptv::SetupParse(const char *nameP, const char *valueP)
{ {
debug("cPluginIptv::%s()", __FUNCTION__); debug("cPluginIptv::%s()", __FUNCTION__);
// Parse your own setup parameters and store their values. // Parse your own setup parameters and store their values.
if (!strcasecmp(nameP, "TsBufferSize")) if (!strcasecmp(nameP, "ExtProtocolBasePort"))
IptvConfig.SetTsBufferSize(atoi(valueP));
else if (!strcasecmp(nameP, "TsBufferPrefill"))
IptvConfig.SetTsBufferPrefillRatio(atoi(valueP));
else if (!strcasecmp(nameP, "ExtProtocolBasePort"))
IptvConfig.SetProtocolBasePort(atoi(valueP)); IptvConfig.SetProtocolBasePort(atoi(valueP));
else if (!strcasecmp(nameP, "SectionFiltering")) else if (!strcasecmp(nameP, "SectionFiltering"))
IptvConfig.SetSectionFiltering(atoi(valueP)); IptvConfig.SetSectionFiltering(atoi(valueP));

View File

@ -53,24 +53,6 @@ msgstr "Bits/Bytes"
msgid "IPTV information not available!" msgid "IPTV information not available!"
msgstr "IPTV Informationen nicht verfügbar!" msgstr "IPTV Informationen nicht verfügbar!"
msgid "TS buffer size [MB]"
msgstr "TS Puffergröße [MB]"
msgid ""
"Define a ringbuffer size for transport streams in megabytes.\n"
"\n"
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
msgstr ""
msgid "TS buffer prefill ratio [%]"
msgstr "TS Puffer-Preload [%]"
msgid ""
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
"\n"
"This is useful if streaming media over a slow or unreliable connection."
msgstr ""
msgid "Protocol base port" msgid "Protocol base port"
msgstr "Protokoll Basisport" msgstr "Protokoll Basisport"

View File

@ -52,30 +52,6 @@ msgstr "Bitit/tavut"
msgid "IPTV information not available!" msgid "IPTV information not available!"
msgstr "IPTV-tietoja ei saatavilla!" msgstr "IPTV-tietoja ei saatavilla!"
msgid "TS buffer size [MB]"
msgstr "TS-puskurin koko [MB]"
msgid ""
"Define a ringbuffer size for transport streams in megabytes.\n"
"\n"
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
msgstr ""
"Määritä rengaspuskurin koko TS-lähetteelle megatavuina.\n"
"\n"
"Pienempi rengaspuskuri vähentää muistinkulutusta, mutta on virhealttiimpi puskurin ylivuodolle."
msgid "TS buffer prefill ratio [%]"
msgstr "TS-puskurin esitäyttöaste [%]"
msgid ""
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
"\n"
"This is useful if streaming media over a slow or unreliable connection."
msgstr ""
"Määrittele TS-rengaspuskurin esitäyttöaste, jonka jälkeen lähetettä aletaan siirtämään eteenpäin VDR:lle.\n"
"\n"
"Puskurin esitäyttö parantaa suoratoistoa hitailla ja epäluotettavilla yhteyksillä."
msgid "Protocol base port" msgid "Protocol base port"
msgstr "Protokollan perusportti" msgstr "Protokollan perusportti"

View File

@ -54,30 +54,6 @@ msgstr "Bits/Bytes"
msgid "IPTV information not available!" msgid "IPTV information not available!"
msgstr "Information sur IPTV non disponible !" msgstr "Information sur IPTV non disponible !"
msgid "TS buffer size [MB]"
msgstr "Taille du buffer TS [MB]"
msgid ""
"Define a ringbuffer size for transport streams in megabytes.\n"
"\n"
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
msgstr ""
"Définit la taille du ringbuffer pour le transport du flux en megabytes.\n"
"\n"
"Une taille plus petite taille aide la consommation de mémoire, mais c'est sujet à plus de débordement de tampon."
msgid "TS buffer prefill ratio [%]"
msgstr "Taux du buffer de pré-remplissage TS [%]"
msgid ""
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
"\n"
"This is useful if streaming media over a slow or unreliable connection."
msgstr ""
"Définit le ratio de pré-remplissage du ringbuffer pour le transport du flux avant transfert dans VDR.\n"
"\n"
"Cette option est utile si le streaming est sur une connexion lente ou peu fiables."
msgid "Protocol base port" msgid "Protocol base port"
msgstr "Port de base du protocole" msgstr "Port de base du protocole"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-iptv 2.1.3\n" "Project-Id-Version: vdr-iptv 2.1.3\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-12 04:12+0300\n" "POT-Creation-Date: 2014-04-12 04:12+0200\n"
"PO-Revision-Date: 2014-04-12 04:12+0200\n" "PO-Revision-Date: 2014-04-12 04:12+0200\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian <vdr@linuxtv.org>\n" "Language-Team: Italian <vdr@linuxtv.org>\n"
@ -53,30 +53,6 @@ msgstr "Bits/bytes"
msgid "IPTV information not available!" msgid "IPTV information not available!"
msgstr "Informazione IPTV non disponibile!" msgstr "Informazione IPTV non disponibile!"
msgid "TS buffer size [MB]"
msgstr "Dimensione buffer TS [MB]"
msgid ""
"Define a ringbuffer size for transport streams in megabytes.\n"
"\n"
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
msgstr ""
"Definisci una dimensione del buffer in MB per i flussi di trasporto.\n"
"\n"
"Dimensioni più piccole aiutano il consumo di memoria, ma sono più inclini a generare buffer overflows."
msgid "TS buffer prefill ratio [%]"
msgstr "Riempimento buffer TS [%]"
msgid ""
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
"\n"
"This is useful if streaming media over a slow or unreliable connection."
msgstr ""
"Definisci un rapporto di riempimento del buffer per i flussi di trasporto prima che i dati siano trasferiti a VDR.\n"
"\n"
"Questo è utile se si trasmette dati su una connessione lenta oppure inaffidabile."
msgid "Protocol base port" msgid "Protocol base port"
msgstr "Porta base protocollo" msgstr "Porta base protocollo"

View File

@ -53,30 +53,6 @@ msgstr "Bits/Bytes"
msgid "IPTV information not available!" msgid "IPTV information not available!"
msgstr "IPTV informatie niet beschikbaar!" msgstr "IPTV informatie niet beschikbaar!"
msgid "TS buffer size [MB]"
msgstr "TS buffergrootte [MB]"
msgid ""
"Define a ringbuffer size for transport streams in megabytes.\n"
"\n"
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
msgstr ""
"Stel de grootte van de ringbuffer vast voor transportstreams in megabytes.\n"
"\n"
"Bij lage waarden zapt VDR sneller maar kunnen leiden tot bufferoverschreidingen en dus dropouts."
msgid "TS buffer prefill ratio [%]"
msgstr "TS buffer-preload [%]"
msgid ""
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
"\n"
"This is useful if streaming media over a slow or unreliable connection."
msgstr ""
"Stel een 'prefil ratio' in voor de ringbuffer voor transportstreams voor de data naar VDR wordt verstuurd.\n"
"\n"
"Dit is aan te bevelen bij onbetrouwbare of langzame verbindingen."
msgid "Protocol base port" msgid "Protocol base port"
msgstr "Protocol basispoort" msgstr "Protocol basispoort"

View File

@ -54,24 +54,6 @@ msgstr "Биты / байт"
msgid "IPTV information not available!" msgid "IPTV information not available!"
msgstr "IPTV информация отсутствует!" msgstr "IPTV информация отсутствует!"
msgid "TS buffer size [MB]"
msgstr "Размер TS буфера [MB]"
msgid ""
"Define a ringbuffer size for transport streams in megabytes.\n"
"\n"
"Smaller sizes help memory consumption, but are more prone to buffer overflows."
msgstr ""
msgid "TS buffer prefill ratio [%]"
msgstr "Предварительный буфер TS [%]"
msgid ""
"Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n"
"\n"
"This is useful if streaming media over a slow or unreliable connection."
msgstr ""
msgid "Protocol base port" msgid "Protocol base port"
msgstr "Базисный порт протокола" msgstr "Базисный порт протокола"

View File

@ -31,8 +31,7 @@ cIptvProtocolCurl::cIptvProtocolCurl()
handleM(NULL), handleM(NULL),
multiM(NULL), multiM(NULL),
headerListM(NULL), headerListM(NULL),
ringBufferM(new cRingBufferLinear(MEGABYTE(IptvConfig.GetTsBufferSize()), ringBufferM(new cRingBufferLinear(IPTV_BUFFER_SIZE, 7 * TS_SIZE, false, "IPTV CURL")),
7 * TS_SIZE, false, "IPTV CURL")),
rtspControlM(""), rtspControlM(""),
modeM(eModeUnknown), modeM(eModeUnknown),
timeoutM(), timeoutM(),
@ -522,7 +521,7 @@ int cIptvProtocolCurl::Read(unsigned char* bufferAddrP, unsigned int bufferLenP)
// Use 20% threshold before continuing to filling up the buffer. // Use 20% threshold before continuing to filling up the buffer.
mutexM.Lock(); mutexM.Lock();
if (pausedM && (ringBufferM->Available() < (MEGABYTE(IptvConfig.GetTsBufferSize()) / 5))) { if (pausedM && (ringBufferM->Available() < (IPTV_BUFFER_SIZE / 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;

12
setup.c
View File

@ -113,8 +113,6 @@ eOSState cIptvMenuInfo::ProcessKey(eKeys keyP)
cIptvPluginSetup::cIptvPluginSetup() cIptvPluginSetup::cIptvPluginSetup()
{ {
debug("cIptvPluginSetup::%s()", __FUNCTION__); debug("cIptvPluginSetup::%s()", __FUNCTION__);
tsBufferSizeM = IptvConfig.GetTsBufferSize();
tsBufferPrefillM = IptvConfig.GetTsBufferPrefillRatio();
protocolBasePortM = IptvConfig.GetProtocolBasePort(); protocolBasePortM = IptvConfig.GetProtocolBasePort();
sectionFilteringM = IptvConfig.GetSectionFiltering(); sectionFilteringM = IptvConfig.GetSectionFiltering();
numDisabledFiltersM = IptvConfig.GetDisabledFiltersCount(); numDisabledFiltersM = IptvConfig.GetDisabledFiltersCount();
@ -136,12 +134,6 @@ void cIptvPluginSetup::Setup(void)
Clear(); Clear();
helpM.Clear(); helpM.Clear();
Add(new cMenuEditIntItem(tr("TS buffer size [MB]"), &tsBufferSizeM, 1, 4));
helpM.Append(tr("Define a ringbuffer size for transport streams in megabytes.\n\nSmaller sizes help memory consumption, but are more prone to buffer overflows."));
Add(new cMenuEditIntItem(tr("TS buffer prefill ratio [%]"), &tsBufferPrefillM, 0, 40));
helpM.Append(tr("Define a prefill ratio of the ringbuffer for transport streams before data is transferred to VDR.\n\nThis is useful if streaming media over a slow or unreliable connection."));
Add(new cMenuEditIntItem(tr("Protocol base port"), &protocolBasePortM, 0, 0xFFFF - MAXDEVICES * 2)); Add(new cMenuEditIntItem(tr("Protocol base port"), &protocolBasePortM, 0, 0xFFFF - MAXDEVICES * 2));
helpM.Append(tr("Define a base port used by CURL/EXT protocol.\n\nThe port range is defined by the number of IPTV devices. This setting sets the port which is listened for connections from external applications when using the CURL/EXT protocol.")); helpM.Append(tr("Define a base port used by CURL/EXT protocol.\n\nThe port range is defined by the number of IPTV devices. This setting sets the port which is listened for connections from external applications when using the CURL/EXT protocol."));
@ -217,14 +209,10 @@ void cIptvPluginSetup::StoreFilters(const char *nameP, int *valuesP)
void cIptvPluginSetup::Store(void) void cIptvPluginSetup::Store(void)
{ {
// Store values into setup.conf // Store values into setup.conf
SetupStore("TsBufferSize", tsBufferSizeM);
SetupStore("TsBufferPrefill", tsBufferPrefillM);
SetupStore("ExtProtocolBasePort", protocolBasePortM); SetupStore("ExtProtocolBasePort", protocolBasePortM);
SetupStore("SectionFiltering", sectionFilteringM); SetupStore("SectionFiltering", sectionFilteringM);
StoreFilters("DisabledFilters", disabledFilterIndexesM); StoreFilters("DisabledFilters", disabledFilterIndexesM);
// Update global config // Update global config
IptvConfig.SetTsBufferSize(tsBufferSizeM);
IptvConfig.SetTsBufferPrefillRatio(tsBufferPrefillM);
IptvConfig.SetProtocolBasePort(protocolBasePortM); IptvConfig.SetProtocolBasePort(protocolBasePortM);
IptvConfig.SetSectionFiltering(sectionFilteringM); IptvConfig.SetSectionFiltering(sectionFilteringM);
for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i) for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i)

View File

@ -15,8 +15,6 @@
class cIptvPluginSetup : public cMenuSetupPage class cIptvPluginSetup : public cMenuSetupPage
{ {
private: private:
int tsBufferSizeM;
int tsBufferPrefillM;
int protocolBasePortM; int protocolBasePortM;
int sectionFilteringM; int sectionFilteringM;
int numDisabledFiltersM; int numDisabledFiltersM;

View File

@ -192,7 +192,7 @@ cString cIptvBufferStatistics::GetBufferStatistic()
uint64_t elapsed = timerM.Elapsed(); /* in milliseconds */ uint64_t elapsed = timerM.Elapsed(); /* in milliseconds */
timerM.Set(); timerM.Set();
long bitrate = elapsed ? (long)(1000.0L * dataBytesM / KILOBYTE(1) / elapsed) : 0L; long bitrate = elapsed ? (long)(1000.0L * dataBytesM / KILOBYTE(1) / elapsed) : 0L;
long totalSpace = MEGABYTE(IptvConfig.GetTsBufferSize()); long totalSpace = IPTV_BUFFER_SIZE;
float percentage = (float)((float)usedSpaceM / (float)totalSpace * 100.0); float percentage = (float)((float)usedSpaceM / (float)totalSpace * 100.0);
long totalKilos = totalSpace / KILOBYTE(1); long totalKilos = totalSpace / KILOBYTE(1);
long usedKilos = usedSpaceM / KILOBYTE(1); long usedKilos = usedSpaceM / KILOBYTE(1);