Removed [PS]idScanner setup options and added a timeout mechanism for pid scanner.

This commit is contained in:
Rolf Ahrenberg 2008-02-01 21:54:24 +00:00
parent 89e3aba59e
commit a03bd6309c
12 changed files with 91 additions and 142 deletions

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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" #include "config.h"
@ -16,9 +16,7 @@ cIptvConfig::cIptvConfig(void)
tsBufferPrefillRatio(0), tsBufferPrefillRatio(0),
extProtocolBasePort(4321), extProtocolBasePort(4321),
useBytes(1), useBytes(1),
sectionFiltering(1), sectionFiltering(1)
sidScanning(1),
pidScanning(0)
{ {
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i) for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
disabledFilters[i] = -1; disabledFilters[i] = -1;
@ -29,7 +27,7 @@ unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
{ {
unsigned int n = 0; unsigned int n = 0;
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1)) while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
n++; n++;
return n; return n;
} }

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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 #ifndef __IPTV_CONFIG_H
@ -21,8 +21,6 @@ private:
unsigned int extProtocolBasePort; unsigned int extProtocolBasePort;
unsigned int useBytes; unsigned int useBytes;
unsigned int sectionFiltering; unsigned int sectionFiltering;
unsigned int sidScanning;
unsigned int pidScanning;
int disabledFilters[SECTION_FILTER_TABLE_SIZE]; int disabledFilters[SECTION_FILTER_TABLE_SIZE];
char configDirectory[255]; char configDirectory[255];
@ -34,8 +32,6 @@ public:
unsigned int GetExtProtocolBasePort(void) const { return extProtocolBasePort; } unsigned int GetExtProtocolBasePort(void) const { return extProtocolBasePort; }
unsigned int GetUseBytes(void) const { return useBytes; } unsigned int GetUseBytes(void) const { return useBytes; }
unsigned int GetSectionFiltering(void) const { return sectionFiltering; } 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; } const char *GetConfigDirectory(void) const { return configDirectory; }
unsigned int GetDisabledFiltersCount(void) const; unsigned int GetDisabledFiltersCount(void) const;
int GetDisabledFilters(unsigned int Index) const; int GetDisabledFilters(unsigned int Index) const;
@ -44,8 +40,6 @@ public:
void SetExtProtocolBasePort(unsigned int PortNumber) { extProtocolBasePort = PortNumber; } void SetExtProtocolBasePort(unsigned int PortNumber) { extProtocolBasePort = PortNumber; }
void SetUseBytes(unsigned int On) { useBytes = On; } void SetUseBytes(unsigned int On) { useBytes = On; }
void SetSectionFiltering(unsigned int On) { sectionFiltering = 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 SetDisabledFilters(unsigned int Index, int Number);
void SetConfigDirectory(const char *directoryP); void SetConfigDirectory(const char *directoryP);
}; };

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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" #include "config.h"
@ -186,6 +186,27 @@ cString cIptvDevice::GetChannelSettings(const char *IptvParam, int *Parameter, i
return locstr; 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 // compatibility mode for old channels.conf format
else if (sscanf(IptvParam, "%a[^|]|%a[^|]|%a[^|]|%u", &tag, &proto, &loc, Parameter) == 4) { else if (sscanf(IptvParam, "%a[^|]|%a[^|]|%a[^|]|%u", &tag, &proto, &loc, Parameter) == 4) {
cString tagstr(tag, true); cString tagstr(tag, true);
@ -264,9 +285,9 @@ bool cIptvDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
sidScanEnabled = sidscan ? true : false; sidScanEnabled = sidscan ? true : false;
pidScanEnabled = pidscan ? true : false; pidScanEnabled = pidscan ? true : false;
pIptvStreamer->Set(location, parameter, deviceIndex, protocol); pIptvStreamer->Set(location, parameter, deviceIndex, protocol);
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning()) if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
pSidScanner->SetChannel(Channel); pSidScanner->SetChannel(Channel);
if (pidScanEnabled && pPidScanner && IptvConfig.GetPidScanning()) if (pidScanEnabled && pPidScanner)
pPidScanner->SetChannel(Channel); pPidScanner->SetChannel(Channel);
return true; return true;
} }
@ -346,7 +367,7 @@ bool cIptvDevice::OpenDvr(void)
mutex.Unlock(); mutex.Unlock();
ResetBuffering(); ResetBuffering();
pIptvStreamer->Open(); pIptvStreamer->Open();
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning()) if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
pSidScanner->SetStatus(true); pSidScanner->SetStatus(true);
isOpenDvr = true; isOpenDvr = true;
return true; return true;
@ -355,7 +376,7 @@ bool cIptvDevice::OpenDvr(void)
void cIptvDevice::CloseDvr(void) void cIptvDevice::CloseDvr(void)
{ {
debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex); debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex);
if (pidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering() && IptvConfig.GetSidScanning()) if (pidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
pSidScanner->SetStatus(false); pSidScanner->SetStatus(false);
if (pIptvStreamer) if (pIptvStreamer)
pIptvStreamer->Close(); pIptvStreamer->Close();
@ -416,7 +437,7 @@ bool cIptvDevice::GetTSPacket(uchar *&Data)
// Update pid statistics // Update pid statistics
AddPidStatistic(ts_pid(p), payload(p)); AddPidStatistic(ts_pid(p), payload(p));
// Analyze incomplete streams with built-in pid analyzer // Analyze incomplete streams with built-in pid analyzer
if (pidScanEnabled && pPidScanner && IptvConfig.GetPidScanning()) if (pidScanEnabled && pPidScanner)
pPidScanner->Process(p); pPidScanner->Process(p);
// Run the data through all filters // Run the data through all filters
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) { for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {

6
iptv.c
View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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> #include <getopt.h>
@ -190,10 +190,6 @@ bool cPluginIptv::SetupParse(const char *Name, const char *Value)
IptvConfig.SetExtProtocolBasePort(atoi(Value)); IptvConfig.SetExtProtocolBasePort(atoi(Value));
else if (!strcasecmp(Name, "SectionFiltering")) else if (!strcasecmp(Name, "SectionFiltering"))
IptvConfig.SetSectionFiltering(atoi(Value)); 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")) { else if (!strcasecmp(Name, "DisabledFilters")) {
int DisabledFilters[SECTION_FILTER_TABLE_SIZE]; int DisabledFilters[SECTION_FILTER_TABLE_SIZE];
for (unsigned int i = 0; i < ARRAY_SIZE(DisabledFilters); ++i) for (unsigned int i = 0; i < ARRAY_SIZE(DisabledFilters); ++i)

View File

@ -3,14 +3,17 @@
* *
* See the README file for copyright information and how to reach the author. * 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 "common.h"
#include "pidscanner.h" #include "pidscanner.h"
#define PIDSCANNER_TIMEOUT_IN_MS 60000 /* 60s */
cPidScanner::cPidScanner(void) cPidScanner::cPidScanner(void)
: process(true), : timeout(0),
process(true),
Vpid(0xFFFF), Vpid(0xFFFF),
Apid(0xFFFF), Apid(0xFFFF),
numVpids(0), numVpids(0),
@ -31,6 +34,10 @@ void cPidScanner::Process(const uint8_t* buf)
if (!process) if (!process)
return; return;
// Stop scanning after defined timeout
if (timeout.TimedOut())
process = false;
if (buf[0] != 0x47) { if (buf[0] != 0x47) {
error("Not TS packet: 0x%X\n", buf[0]); error("Not TS packet: 0x%X\n", buf[0]);
return; return;
@ -81,15 +88,21 @@ void cPidScanner::Process(const uint8_t* buf)
return; return;
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid); debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID()); cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
int Ppid = 0;
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
int Dpids[MAXDPIDS + 1] = { 0 }; int Dpids[MAXDPIDS + 1] = { 0 };
int Spids[MAXSPIDS + 1] = { 0 }; int Spids[MAXSPIDS + 1] = { 0 };
char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" }; char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" };
char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" }; char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" };
char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" }; char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" };
int Tpid = 0; int Ppid = IptvChannel->Ppid();
int Tpid = IptvChannel->Tpid();
Apids[0] = Apid; 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); IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
Channels.Unlock(); Channels.Unlock();
process = false; process = false;
@ -113,4 +126,5 @@ void cPidScanner::SetChannel(const cChannel *Channel)
Apid = 0xFFFF; Apid = 0xFFFF;
numApids = 0; numApids = 0;
process = true; process = true;
timeout.Set(PIDSCANNER_TIMEOUT_IN_MS);
} }

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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 #ifndef __PIDSCANNER_H
@ -13,6 +13,7 @@
class cPidScanner { class cPidScanner {
private: private:
cTimeMs timeout;
cChannel channel; cChannel channel;
bool process; bool process;
int Vpid; int Vpid;

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: iptv 0.0.6\n" "Project-Id-Version: iptv 0.0.6\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\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" "PO-Revision-Date: 2007-10-29 21:19+0100\n"
"Last-Translator: Tobias Grimm <tg@e-tobi.net>\n" "Last-Translator: Tobias Grimm <tg@e-tobi.net>\n"
"Language-Team: German\n" "Language-Team: German\n"
@ -73,8 +73,8 @@ msgstr "Port"
msgid "Scan Sid" msgid "Scan Sid"
msgstr "Scanne SID" msgstr "Scanne SID"
msgid "Scan Pid" msgid "Scan pids"
msgstr "Scanne PID" msgstr "Scanne PIDS"
msgid "Nid" msgid "Nid"
msgstr "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." "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 "" 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" msgid "Use section filtering"
msgstr "Benutze Abschnittsfilterung" msgstr "Benutze Abschnittsfilterung"
@ -155,15 +146,6 @@ msgid ""
"Enabling this feature does not affect streams that do not contain section data." "Enabling this feature does not affect streams that do not contain section data."
msgstr "" 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" msgid "Disable filters"
msgstr "Deaktiviere Filter" msgstr "Deaktiviere Filter"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: iptv 0.0.6\n" "Project-Id-Version: iptv 0.0.6\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\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" "PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Rolf Ahrenberg\n" "Last-Translator: Rolf Ahrenberg\n"
"Language-Team: <vdr@linuxtv.org>\n" "Language-Team: <vdr@linuxtv.org>\n"
@ -72,8 +72,8 @@ msgstr "Portti"
msgid "Scan Sid" msgid "Scan Sid"
msgstr "Etsi palvelu-ID" msgstr "Etsi palvelu-ID"
msgid "Scan Pid" msgid "Scan pids"
msgstr "Etsi ohjelmatunnisteet" msgstr "Etsi pidit"
msgid "Nid" msgid "Nid"
msgstr "Verkko-ID" msgstr "Verkko-ID"
@ -144,18 +144,6 @@ msgstr ""
"\n" "\n"
"Porttiavaruuden koko määräytyy käytettyjen IPTV-laitteiden mukaan. Laajennos lukee EXT-protokollan yhteydessä perusportista dataa, jota ulkoiset ohjelmistot tarjoavat." "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" msgid "Use section filtering"
msgstr "Käytä sektioiden suodatusta" 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" "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." "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" msgid "Disable filters"
msgstr "Poista suodattimia käytöstä" msgstr "Poista suodattimia käytöstä"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: iptv 0.0.6\n" "Project-Id-Version: iptv 0.0.6\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\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" "PO-Revision-Date: 2008-01-26 13:14+0100\n"
"Last-Translator: NIVAL Michaël <mnival@club-internet.fr>\n" "Last-Translator: NIVAL Michaël <mnival@club-internet.fr>\n"
"Language-Team: French\n" "Language-Team: French\n"
@ -74,7 +74,7 @@ msgstr "Port"
msgid "Scan Sid" msgid "Scan Sid"
msgstr "Scanne les SID" msgstr "Scanne les SID"
msgid "Scan Pid" msgid "Scan pids"
msgstr "Scanne les PID" msgstr "Scanne les PID"
msgid "Nid" msgid "Nid"
@ -146,15 +146,6 @@ msgstr ""
"\n" "\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." "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" msgid "Use section filtering"
msgstr "Utiliser le filtrage de section" 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" "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." "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" msgid "Disable filters"
msgstr "Désactiver les filtres" msgstr "Désactiver les filtres"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: iptv 0.0.6\n" "Project-Id-Version: iptv 0.0.6\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\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" "PO-Revision-Date: 2008-01-13 16:46+0100\n"
"Last-Translator: Gringo <vdr-italian@tiscali.it>\n" "Last-Translator: Gringo <vdr-italian@tiscali.it>\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
@ -73,8 +73,8 @@ msgstr "Porta"
msgid "Scan Sid" msgid "Scan Sid"
msgstr "Scansione Sid" msgstr "Scansione Sid"
msgid "Scan Pid" msgid "Scan pids"
msgstr "Scansione Pid" msgstr "Scansione Pids"
msgid "Nid" msgid "Nid"
msgstr "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." "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 "" 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" msgid "Use section filtering"
msgstr "Utilizza sezione filtri" msgstr "Utilizza sezione filtri"
@ -155,15 +146,6 @@ msgid ""
"Enabling this feature does not affect streams that do not contain section data." "Enabling this feature does not affect streams that do not contain section data."
msgstr "" 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" msgid "Disable filters"
msgstr "Disabilita filtri" msgstr "Disabilita filtri"

46
setup.c
View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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> #include <string.h>
@ -96,6 +96,27 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter,
return locstr; 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) { else if (sscanf(Param, "%a[^|]|%a[^|]|%a[^|]|%d", &tag, &proto, &loc, Parameter) == 4) {
cString tagstr(tag, true); cString tagstr(tag, true);
cString protostr(proto, true); cString protostr(proto, true);
@ -246,8 +267,11 @@ void cIptvMenuEditChannel::Setup(void)
Add(new cMenuEditIntItem(tr("Port"), &data.parameter, 0, 0xFFFF)); Add(new cMenuEditIntItem(tr("Port"), &data.parameter, 0, 0xFFFF));
break; break;
} }
Add(new cMenuEditBoolItem(tr("Scan Sid"), &data.sidscan)); cOsdItem *sidScanItem = new cMenuEditBoolItem(tr("Scan Sid"), &data.sidscan);
Add(new cMenuEditBoolItem(tr("Scan Pid"), &data.pidscan)); if (!IptvConfig.GetSectionFiltering())
sidScanItem->SetSelectable(false);
Add(sidScanItem);
Add(new cMenuEditBoolItem(tr("Scan pids"), &data.pidscan));
// Normal settings // Normal settings
#if defined(APIVERSNUM) && APIVERSNUM < 10511 #if defined(APIVERSNUM) && APIVERSNUM < 10511
Add(new cMenuEditStrItem(trVDR("Name"), data.name, sizeof(data.name), trVDR(FileNameChars))); Add(new cMenuEditStrItem(trVDR("Name"), data.name, sizeof(data.name), trVDR(FileNameChars)));
@ -652,8 +676,6 @@ cIptvPluginSetup::cIptvPluginSetup()
tsBufferPrefill = IptvConfig.GetTsBufferPrefillRatio(); tsBufferPrefill = IptvConfig.GetTsBufferPrefillRatio();
extProtocolBasePort = IptvConfig.GetExtProtocolBasePort(); extProtocolBasePort = IptvConfig.GetExtProtocolBasePort();
sectionFiltering = IptvConfig.GetSectionFiltering(); sectionFiltering = IptvConfig.GetSectionFiltering();
sidScanning = IptvConfig.GetSidScanning();
pidScanning = IptvConfig.GetPidScanning();
numDisabledFilters = IptvConfig.GetDisabledFiltersCount(); numDisabledFilters = IptvConfig.GetDisabledFiltersCount();
if (numDisabledFilters > SECTION_FILTER_TABLE_SIZE) if (numDisabledFilters > SECTION_FILTER_TABLE_SIZE)
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.")); 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 #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"), &sectionFiltering)); Add(new cMenuEditBoolItem(tr("Use section filtering"), &sectionFiltering));
#if defined(APIVERSNUM) && APIVERSNUM >= 10513 #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.")); 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 #endif
if (sectionFiltering) { 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)); Add(new cMenuEditIntItem( tr("Disable filters"), &numDisabledFilters, 0, SECTION_FILTER_TABLE_SIZE));
#if defined(APIVERSNUM) && APIVERSNUM >= 10513 #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.")); 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("TsBufferPrefill", tsBufferPrefill);
SetupStore("ExtProtocolBasePort", extProtocolBasePort); SetupStore("ExtProtocolBasePort", extProtocolBasePort);
SetupStore("SectionFiltering", sectionFiltering); SetupStore("SectionFiltering", sectionFiltering);
SetupStore("SidScanning", sidScanning);
SetupStore("PidScanning", pidScanning);
StoreFilters("DisabledFilters", disabledFilterIndexes); StoreFilters("DisabledFilters", disabledFilterIndexes);
// Update global config // Update global config
IptvConfig.SetTsBufferSize(tsBufferSize); IptvConfig.SetTsBufferSize(tsBufferSize);
IptvConfig.SetTsBufferPrefillRatio(tsBufferPrefill); IptvConfig.SetTsBufferPrefillRatio(tsBufferPrefill);
IptvConfig.SetExtProtocolBasePort(extProtocolBasePort); IptvConfig.SetExtProtocolBasePort(extProtocolBasePort);
IptvConfig.SetSectionFiltering(sectionFiltering); IptvConfig.SetSectionFiltering(sectionFiltering);
IptvConfig.SetSidScanning(sidScanning);
IptvConfig.SetPidScanning(pidScanning);
for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i) for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i)
IptvConfig.SetDisabledFilters(i, disabledFilterIndexes[i]); IptvConfig.SetDisabledFilters(i, disabledFilterIndexes[i]);
} }

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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 #ifndef __IPTV_SETUP_H
@ -19,8 +19,6 @@ private:
int tsBufferPrefill; int tsBufferPrefill;
int extProtocolBasePort; int extProtocolBasePort;
int sectionFiltering; int sectionFiltering;
int sidScanning;
int pidScanning;
int numDisabledFilters; int numDisabledFilters;
int disabledFilterIndexes[SECTION_FILTER_TABLE_SIZE]; int disabledFilterIndexes[SECTION_FILTER_TABLE_SIZE];
const char *disabledFilterNames[SECTION_FILTER_TABLE_SIZE]; const char *disabledFilterNames[SECTION_FILTER_TABLE_SIZE];