mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Removed [PS]idScanner setup options and added a timeout mechanism for pid scanner.
This commit is contained in:
parent
89e3aba59e
commit
a03bd6309c
8
config.c
8
config.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: config.c,v 1.20 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
* $Id: config.c,v 1.21 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -16,9 +16,7 @@ cIptvConfig::cIptvConfig(void)
|
||||
tsBufferPrefillRatio(0),
|
||||
extProtocolBasePort(4321),
|
||||
useBytes(1),
|
||||
sectionFiltering(1),
|
||||
sidScanning(1),
|
||||
pidScanning(0)
|
||||
sectionFiltering(1)
|
||||
{
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
|
||||
disabledFilters[i] = -1;
|
||||
@ -29,7 +27,7 @@ unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
|
||||
{
|
||||
unsigned int n = 0;
|
||||
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
|
||||
n++;
|
||||
n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
8
config.h
8
config.h
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: config.h,v 1.19 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
* $Id: config.h,v 1.20 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_CONFIG_H
|
||||
@ -21,8 +21,6 @@ private:
|
||||
unsigned int extProtocolBasePort;
|
||||
unsigned int useBytes;
|
||||
unsigned int sectionFiltering;
|
||||
unsigned int sidScanning;
|
||||
unsigned int pidScanning;
|
||||
int disabledFilters[SECTION_FILTER_TABLE_SIZE];
|
||||
char configDirectory[255];
|
||||
|
||||
@ -34,8 +32,6 @@ public:
|
||||
unsigned int GetExtProtocolBasePort(void) const { return extProtocolBasePort; }
|
||||
unsigned int GetUseBytes(void) const { return useBytes; }
|
||||
unsigned int GetSectionFiltering(void) const { return sectionFiltering; }
|
||||
unsigned int GetSidScanning(void) const { return sidScanning; }
|
||||
unsigned int GetPidScanning(void) const { return pidScanning; }
|
||||
const char *GetConfigDirectory(void) const { return configDirectory; }
|
||||
unsigned int GetDisabledFiltersCount(void) const;
|
||||
int GetDisabledFilters(unsigned int Index) const;
|
||||
@ -44,8 +40,6 @@ public:
|
||||
void SetExtProtocolBasePort(unsigned int PortNumber) { extProtocolBasePort = PortNumber; }
|
||||
void SetUseBytes(unsigned int On) { useBytes = On; }
|
||||
void SetSectionFiltering(unsigned int On) { sectionFiltering = On; }
|
||||
void SetSidScanning(unsigned int On) { sidScanning = On; }
|
||||
void SetPidScanning(unsigned int On) { pidScanning = On; }
|
||||
void SetDisabledFilters(unsigned int Index, int Number);
|
||||
void SetConfigDirectory(const char *directoryP);
|
||||
};
|
||||
|
33
device.c
33
device.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.c,v 1.82 2008/01/31 22:28:53 rahrenbe Exp $
|
||||
* $Id: device.c,v 1.83 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -186,6 +186,27 @@ cString cIptvDevice::GetChannelSettings(const char *IptvParam, int *Parameter, i
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
else if (sscanf(IptvParam, "%a[^|]|P%dS%d|%a[^|]|%a[^|]|%u", &tag, PidScan, SidScan, &proto, &loc, Parameter) == 6) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
// check if IPTV tag
|
||||
if (strncasecmp(*tagstr, "IPTV", 4) == 0) {
|
||||
// check if protocol is supported and update the pointer
|
||||
if (strncasecmp(*protostr, "UDP", 3) == 0)
|
||||
*Protocol = pUdpProtocol;
|
||||
else if (strncasecmp(*protostr, "HTTP", 4) == 0)
|
||||
*Protocol = pHttpProtocol;
|
||||
else if (strncasecmp(*protostr, "FILE", 4) == 0)
|
||||
*Protocol = pFileProtocol;
|
||||
else if (strncasecmp(*protostr, "EXT", 3) == 0)
|
||||
*Protocol = pExtProtocol;
|
||||
else
|
||||
return NULL;
|
||||
// return location
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
// compatibility mode for old channels.conf format
|
||||
else if (sscanf(IptvParam, "%a[^|]|%a[^|]|%a[^|]|%u", &tag, &proto, &loc, Parameter) == 4) {
|
||||
cString tagstr(tag, true);
|
||||
@ -264,9 +285,9 @@ bool cIptvDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||
sidScanEnabled = sidscan ? true : false;
|
||||
pidScanEnabled = pidscan ? true : false;
|
||||
pIptvStreamer->Set(location, parameter, deviceIndex, protocol);
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetChannel(Channel);
|
||||
if (pidScanEnabled && pPidScanner && IptvConfig.GetPidScanning())
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->SetChannel(Channel);
|
||||
return true;
|
||||
}
|
||||
@ -346,7 +367,7 @@ bool cIptvDevice::OpenDvr(void)
|
||||
mutex.Unlock();
|
||||
ResetBuffering();
|
||||
pIptvStreamer->Open();
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetStatus(true);
|
||||
isOpenDvr = true;
|
||||
return true;
|
||||
@ -355,7 +376,7 @@ bool cIptvDevice::OpenDvr(void)
|
||||
void cIptvDevice::CloseDvr(void)
|
||||
{
|
||||
debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex);
|
||||
if (pidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning())
|
||||
if (pidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||
pSidScanner->SetStatus(false);
|
||||
if (pIptvStreamer)
|
||||
pIptvStreamer->Close();
|
||||
@ -416,7 +437,7 @@ bool cIptvDevice::GetTSPacket(uchar *&Data)
|
||||
// Update pid statistics
|
||||
AddPidStatistic(ts_pid(p), payload(p));
|
||||
// Analyze incomplete streams with built-in pid analyzer
|
||||
if (pidScanEnabled && pPidScanner && IptvConfig.GetPidScanning())
|
||||
if (pidScanEnabled && pPidScanner)
|
||||
pPidScanner->Process(p);
|
||||
// Run the data through all filters
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
|
6
iptv.c
6
iptv.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: iptv.c,v 1.35 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
* $Id: iptv.c,v 1.36 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -190,10 +190,6 @@ bool cPluginIptv::SetupParse(const char *Name, const char *Value)
|
||||
IptvConfig.SetExtProtocolBasePort(atoi(Value));
|
||||
else if (!strcasecmp(Name, "SectionFiltering"))
|
||||
IptvConfig.SetSectionFiltering(atoi(Value));
|
||||
else if (!strcasecmp(Name, "SidScanning"))
|
||||
IptvConfig.SetSidScanning(atoi(Value));
|
||||
else if (!strcasecmp(Name, "PidScanning"))
|
||||
IptvConfig.SetPidScanning(atoi(Value));
|
||||
else if (!strcasecmp(Name, "DisabledFilters")) {
|
||||
int DisabledFilters[SECTION_FILTER_TABLE_SIZE];
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(DisabledFilters); ++i)
|
||||
|
22
pidscanner.c
22
pidscanner.c
@ -3,14 +3,17 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: pidscanner.c,v 1.1 2008/01/30 22:41:59 rahrenbe Exp $
|
||||
* $Id: pidscanner.c,v 1.2 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "pidscanner.h"
|
||||
|
||||
#define PIDSCANNER_TIMEOUT_IN_MS 60000 /* 60s */
|
||||
|
||||
cPidScanner::cPidScanner(void)
|
||||
: process(true),
|
||||
: timeout(0),
|
||||
process(true),
|
||||
Vpid(0xFFFF),
|
||||
Apid(0xFFFF),
|
||||
numVpids(0),
|
||||
@ -31,6 +34,10 @@ void cPidScanner::Process(const uint8_t* buf)
|
||||
if (!process)
|
||||
return;
|
||||
|
||||
// Stop scanning after defined timeout
|
||||
if (timeout.TimedOut())
|
||||
process = false;
|
||||
|
||||
if (buf[0] != 0x47) {
|
||||
error("Not TS packet: 0x%X\n", buf[0]);
|
||||
return;
|
||||
@ -81,15 +88,21 @@ void cPidScanner::Process(const uint8_t* buf)
|
||||
return;
|
||||
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
|
||||
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
|
||||
int Ppid = 0;
|
||||
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
|
||||
int Dpids[MAXDPIDS + 1] = { 0 };
|
||||
int Spids[MAXSPIDS + 1] = { 0 };
|
||||
char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" };
|
||||
char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
||||
char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||
int Tpid = 0;
|
||||
int Ppid = IptvChannel->Ppid();
|
||||
int Tpid = IptvChannel->Tpid();
|
||||
Apids[0] = Apid;
|
||||
for (unsigned int i = 1; i < MAXAPIDS; ++i)
|
||||
Apids[i] = IptvChannel->Apid(i);
|
||||
for (unsigned int i = 0; i < MAXDPIDS; ++i)
|
||||
Dpids[i] = IptvChannel->Dpid(i);
|
||||
for (unsigned int i = 0; i < MAXSPIDS; ++i)
|
||||
Spids[i] = IptvChannel->Spid(i);
|
||||
IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
|
||||
Channels.Unlock();
|
||||
process = false;
|
||||
@ -113,4 +126,5 @@ void cPidScanner::SetChannel(const cChannel *Channel)
|
||||
Apid = 0xFFFF;
|
||||
numApids = 0;
|
||||
process = true;
|
||||
timeout.Set(PIDSCANNER_TIMEOUT_IN_MS);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: pidscanner.h,v 1.1 2008/01/30 22:41:59 rahrenbe Exp $
|
||||
* $Id: pidscanner.h,v 1.2 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __PIDSCANNER_H
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
class cPidScanner {
|
||||
private:
|
||||
cTimeMs timeout;
|
||||
cChannel channel;
|
||||
bool process;
|
||||
int Vpid;
|
||||
|
24
po/de_DE.po
24
po/de_DE.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-02-01 00:24+0200\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2007-10-29 21:19+0100\n"
|
||||
"Last-Translator: Tobias Grimm <tg@e-tobi.net>\n"
|
||||
"Language-Team: German\n"
|
||||
@ -73,8 +73,8 @@ msgstr "Port"
|
||||
msgid "Scan Sid"
|
||||
msgstr "Scanne SID"
|
||||
|
||||
msgid "Scan Pid"
|
||||
msgstr "Scanne PID"
|
||||
msgid "Scan pids"
|
||||
msgstr "Scanne PIDS"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Nid"
|
||||
@ -136,15 +136,6 @@ msgid ""
|
||||
"The 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 EXT protocol."
|
||||
msgstr ""
|
||||
|
||||
msgid "Scan Pid automatically"
|
||||
msgstr "Scanne PID automatisch"
|
||||
|
||||
msgid ""
|
||||
"Define whether program ids shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Automatic Pid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Benutze Abschnittsfilterung"
|
||||
|
||||
@ -155,15 +146,6 @@ msgid ""
|
||||
"Enabling this feature does not affect streams that do not contain section data."
|
||||
msgstr ""
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Scanne SID automatisch"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Deaktiviere Filter"
|
||||
|
||||
|
30
po/fi_FI.po
30
po/fi_FI.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-02-01 00:24+0200\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@ -72,8 +72,8 @@ msgstr "Portti"
|
||||
msgid "Scan Sid"
|
||||
msgstr "Etsi palvelu-ID"
|
||||
|
||||
msgid "Scan Pid"
|
||||
msgstr "Etsi ohjelmatunnisteet"
|
||||
msgid "Scan pids"
|
||||
msgstr "Etsi pidit"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Verkko-ID"
|
||||
@ -144,18 +144,6 @@ msgstr ""
|
||||
"\n"
|
||||
"Porttiavaruuden koko määräytyy käytettyjen IPTV-laitteiden mukaan. Laajennos lukee EXT-protokollan yhteydessä perusportista dataa, jota ulkoiset ohjelmistot tarjoavat."
|
||||
|
||||
msgid "Scan Pid automatically"
|
||||
msgstr "Etsi ohjelmatunnisteet automaattisesti"
|
||||
|
||||
msgid ""
|
||||
"Define whether program ids shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Automatic Pid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
"Määrittele etsitäänkö ohjelmatunnisteet (PID) automaattisesti.\n"
|
||||
"\n"
|
||||
"Automaattinen ohjelmatunnisteiden etsintä auttaa VDR:ää havaitsemaan ohjelmatunnisteiden muutokset lähetteestä."
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Käytä sektioiden suodatusta"
|
||||
|
||||
@ -170,18 +158,6 @@ msgstr ""
|
||||
"IPTV-laajennos voi suodattaa lähetteestä VDR:lle tarjottavia sektioita, joita käytetään esim. ohjelmaoppaan ja ohjelmatunnisteiden (PID) päivittämiseen.\n"
|
||||
"Toiminto ei vaikuta lähetteeseen, jossa ei ole sektioita."
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Etsi palvelu-ID automaattisesti"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
"Määrittele etsitäänkö palvelutunniste (SID) automaattisesti.\n"
|
||||
"\n"
|
||||
"Asetus vaatii suodatuksen käyttöönoton sektioille. Automaattinen palvelutunnisteen etsintä auttaa VDR:ää havaitsemaan ohjelmatunnisteiden (PID) muutokset lähetteestä."
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Poista suodattimia käytöstä"
|
||||
|
||||
|
25
po/fr_FR.po
25
po/fr_FR.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-02-01 00:24+0200\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2008-01-26 13:14+0100\n"
|
||||
"Last-Translator: NIVAL Michaël <mnival@club-internet.fr>\n"
|
||||
"Language-Team: French\n"
|
||||
@ -74,7 +74,7 @@ msgstr "Port"
|
||||
msgid "Scan Sid"
|
||||
msgstr "Scanne les SID"
|
||||
|
||||
msgid "Scan Pid"
|
||||
msgid "Scan pids"
|
||||
msgstr "Scanne les PID"
|
||||
|
||||
msgid "Nid"
|
||||
@ -146,15 +146,6 @@ msgstr ""
|
||||
"\n"
|
||||
"La plage de port est défini par le nombre de dispositif IPTV. Ce paramètre défini le port qui est écouté pour les connexions à partir d'applications externes en utilisant le protocole EXT."
|
||||
|
||||
msgid "Scan Pid automatically"
|
||||
msgstr "Scanne les PID automatiquement"
|
||||
|
||||
msgid ""
|
||||
"Define whether program ids shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Automatic Pid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Utiliser le filtrage de section"
|
||||
|
||||
@ -169,18 +160,6 @@ msgstr ""
|
||||
"La section filtrage signifie que le plugin IPTV essayera d'analyser et de fournir à VDR des données secondaires disponible sur le flux. VDR peut alors utiliser ces données pour fournir des fonctionnalitées supplémentaires tel que la détection de changement de pid et d'EPG etc.\n"
|
||||
"L'activation de cette fonctionnalité n'a pas d'incidence sur les flux qui ne contiennent pas de données de la section."
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Scanne les SID automatiquement"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
"Définit si le service id seront automatiquement analysé.\n"
|
||||
"\n"
|
||||
"Requiert la section de filtrage. Le balayage automatique de Sid permet à VDR de détecter les changement de pids du flux."
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Désactiver les filtres"
|
||||
|
||||
|
24
po/it_IT.po
24
po/it_IT.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iptv 0.0.6\n"
|
||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
|
||||
"POT-Creation-Date: 2008-02-01 00:24+0200\n"
|
||||
"POT-Creation-Date: 2008-02-01 23:43+0200\n"
|
||||
"PO-Revision-Date: 2008-01-13 16:46+0100\n"
|
||||
"Last-Translator: Gringo <vdr-italian@tiscali.it>\n"
|
||||
"Language-Team: Italian\n"
|
||||
@ -73,8 +73,8 @@ msgstr "Porta"
|
||||
msgid "Scan Sid"
|
||||
msgstr "Scansione Sid"
|
||||
|
||||
msgid "Scan Pid"
|
||||
msgstr "Scansione Pid"
|
||||
msgid "Scan pids"
|
||||
msgstr "Scansione Pids"
|
||||
|
||||
msgid "Nid"
|
||||
msgstr "Nid"
|
||||
@ -136,15 +136,6 @@ msgid ""
|
||||
"The 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 EXT protocol."
|
||||
msgstr ""
|
||||
|
||||
msgid "Scan Pid automatically"
|
||||
msgstr "Scansione Pid automatica"
|
||||
|
||||
msgid ""
|
||||
"Define whether program ids shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Automatic Pid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
|
||||
msgid "Use section filtering"
|
||||
msgstr "Utilizza sezione filtri"
|
||||
|
||||
@ -155,15 +146,6 @@ msgid ""
|
||||
"Enabling this feature does not affect streams that do not contain section data."
|
||||
msgstr ""
|
||||
|
||||
msgid "Scan Sid automatically"
|
||||
msgstr "Scansione Sid automatica"
|
||||
|
||||
msgid ""
|
||||
"Define whether the service id shall be scanned automatically.\n"
|
||||
"\n"
|
||||
"Requires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable filters"
|
||||
msgstr "Disabilita filtri"
|
||||
|
||||
|
46
setup.c
46
setup.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.c,v 1.52 2008/01/31 22:28:53 rahrenbe Exp $
|
||||
* $Id: setup.c,v 1.53 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -96,6 +96,27 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter,
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
else if (sscanf(Param, "%a[^|]|P%dS%d|%a[^|]|%a[^|]|%d", &tag, PidScan, SidScan, &proto, &loc, Parameter) == 6) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
cString locstr(loc, true);
|
||||
// check if IPTV tag
|
||||
if (strncasecmp(*tagstr, "IPTV", 4) == 0) {
|
||||
// check if protocol is supported and update the pointer
|
||||
if (strncasecmp(*protostr, "UDP", 3) == 0)
|
||||
*Protocol = eProtocolUDP;
|
||||
else if (strncasecmp(*protostr, "HTTP", 4) == 0)
|
||||
*Protocol = eProtocolHTTP;
|
||||
else if (strncasecmp(*protostr, "FILE", 4) == 0)
|
||||
*Protocol = eProtocolFILE;
|
||||
else if (strncasecmp(*protostr, "EXT", 3) == 0)
|
||||
*Protocol = eProtocolEXT;
|
||||
else
|
||||
return NULL;
|
||||
// return location
|
||||
return locstr;
|
||||
}
|
||||
}
|
||||
else if (sscanf(Param, "%a[^|]|%a[^|]|%a[^|]|%d", &tag, &proto, &loc, Parameter) == 4) {
|
||||
cString tagstr(tag, true);
|
||||
cString protostr(proto, true);
|
||||
@ -246,8 +267,11 @@ void cIptvMenuEditChannel::Setup(void)
|
||||
Add(new cMenuEditIntItem(tr("Port"), &data.parameter, 0, 0xFFFF));
|
||||
break;
|
||||
}
|
||||
Add(new cMenuEditBoolItem(tr("Scan Sid"), &data.sidscan));
|
||||
Add(new cMenuEditBoolItem(tr("Scan Pid"), &data.pidscan));
|
||||
cOsdItem *sidScanItem = new cMenuEditBoolItem(tr("Scan Sid"), &data.sidscan);
|
||||
if (!IptvConfig.GetSectionFiltering())
|
||||
sidScanItem->SetSelectable(false);
|
||||
Add(sidScanItem);
|
||||
Add(new cMenuEditBoolItem(tr("Scan pids"), &data.pidscan));
|
||||
// Normal settings
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 10511
|
||||
Add(new cMenuEditStrItem(trVDR("Name"), data.name, sizeof(data.name), trVDR(FileNameChars)));
|
||||
@ -652,8 +676,6 @@ cIptvPluginSetup::cIptvPluginSetup()
|
||||
tsBufferPrefill = IptvConfig.GetTsBufferPrefillRatio();
|
||||
extProtocolBasePort = IptvConfig.GetExtProtocolBasePort();
|
||||
sectionFiltering = IptvConfig.GetSectionFiltering();
|
||||
sidScanning = IptvConfig.GetSidScanning();
|
||||
pidScanning = IptvConfig.GetPidScanning();
|
||||
numDisabledFilters = IptvConfig.GetDisabledFiltersCount();
|
||||
if (numDisabledFilters > SECTION_FILTER_TABLE_SIZE)
|
||||
numDisabledFilters = SECTION_FILTER_TABLE_SIZE;
|
||||
@ -689,22 +711,12 @@ void cIptvPluginSetup::Setup(void)
|
||||
help.Append(tr("Define a base port used by 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 EXT protocol."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditBoolItem(tr("Scan Pid automatically"), &pidScanning));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define whether program ids shall be scanned automatically.\n\nAutomatic Pid scanning helps VDR to detect changed pids of streams."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditBoolItem(tr("Use section filtering"), §ionFiltering));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define whether the section filtering shall be used.\n\nSection filtering means that IPTV plugin tries to parse and provide VDR with secondary data about the currently active stream. VDR can then use this data for providing various functionalities such as automatic pid change detection and EPG etc.\nEnabling this feature does not affect streams that do not contain section data."));
|
||||
#endif
|
||||
|
||||
if (sectionFiltering) {
|
||||
Add(new cMenuEditBoolItem(tr("Scan Sid automatically"), &sidScanning));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define whether the service id shall be scanned automatically.\n\nRequires the section filtering. Automatic Sid scanning helps VDR to detect changed pids of streams."));
|
||||
#endif
|
||||
|
||||
Add(new cMenuEditIntItem( tr("Disable filters"), &numDisabledFilters, 0, SECTION_FILTER_TABLE_SIZE));
|
||||
#if defined(APIVERSNUM) && APIVERSNUM >= 10513
|
||||
help.Append(tr("Define number of section filters to be disabled.\n\nCertain section filters might cause some unwanted behaviour to VDR such as time being falsely synchronized. By black-listing the filters here useful section data can be left intact for VDR to process."));
|
||||
@ -792,16 +804,12 @@ void cIptvPluginSetup::Store(void)
|
||||
SetupStore("TsBufferPrefill", tsBufferPrefill);
|
||||
SetupStore("ExtProtocolBasePort", extProtocolBasePort);
|
||||
SetupStore("SectionFiltering", sectionFiltering);
|
||||
SetupStore("SidScanning", sidScanning);
|
||||
SetupStore("PidScanning", pidScanning);
|
||||
StoreFilters("DisabledFilters", disabledFilterIndexes);
|
||||
// Update global config
|
||||
IptvConfig.SetTsBufferSize(tsBufferSize);
|
||||
IptvConfig.SetTsBufferPrefillRatio(tsBufferPrefill);
|
||||
IptvConfig.SetExtProtocolBasePort(extProtocolBasePort);
|
||||
IptvConfig.SetSectionFiltering(sectionFiltering);
|
||||
IptvConfig.SetSidScanning(sidScanning);
|
||||
IptvConfig.SetPidScanning(pidScanning);
|
||||
for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i)
|
||||
IptvConfig.SetDisabledFilters(i, disabledFilterIndexes[i]);
|
||||
}
|
||||
|
4
setup.h
4
setup.h
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.h,v 1.19 2008/01/30 21:57:33 rahrenbe Exp $
|
||||
* $Id: setup.h,v 1.20 2008/02/01 21:54:24 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_SETUP_H
|
||||
@ -19,8 +19,6 @@ private:
|
||||
int tsBufferPrefill;
|
||||
int extProtocolBasePort;
|
||||
int sectionFiltering;
|
||||
int sidScanning;
|
||||
int pidScanning;
|
||||
int numDisabledFilters;
|
||||
int disabledFilterIndexes[SECTION_FILTER_TABLE_SIZE];
|
||||
const char *disabledFilterNames[SECTION_FILTER_TABLE_SIZE];
|
||||
|
Loading…
Reference in New Issue
Block a user