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

Updated for vdr-1.7.4.

Fixed blacklisting of PAT section filter.
Set max IPTV device count to VDR's max devices.
This commit is contained in:
Rolf Ahrenberg 2009-02-24 13:40:16 +02:00
parent 00cf880a5d
commit 1e8f117988
6 changed files with 46 additions and 40 deletions

View File

@ -77,3 +77,9 @@ VDR Plugin 'iptv' Revision History
- Updated for vdr-1.7.2.
- Silenced a compilation warning.
2009-02-24: Version 0.2.4
- Updated for vdr-1.7.4.
- Fixed blacklisting of PAT section filter.
- Set max IPTV device count to VDR's max devices.

View File

@ -17,7 +17,7 @@ cIptvConfig::cIptvConfig(void)
useBytes(1),
sectionFiltering(1)
{
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters) - 1; ++i)
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFilters); ++i)
disabledFilters[i] = -1;
memset(configDirectory, '\0', sizeof(configDirectory));
}
@ -25,7 +25,7 @@ cIptvConfig::cIptvConfig(void)
unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
{
unsigned int n = 0;
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters) - 1))
while ((disabledFilters[n] != -1) && (n < ARRAY_SIZE(disabledFilters)))
n++;
return n;
}

View File

@ -8,7 +8,7 @@
#include "config.h"
#include "device.h"
#define IPTV_MAX_DEVICES 8
#define IPTV_MAX_DEVICES MAXDEVICES
cIptvDevice * IptvDevices[IPTV_MAX_DEVICES] = { NULL };
@ -429,7 +429,7 @@ bool cIptvDevice::GetTSPacket(uchar *&Data)
}
isPacketDelivered = true;
Data = p;
// Update pid statistics
// Update pid statistics
AddPidStatistic(ts_pid(p), payload(p));
// Send data also to dvr fifo
if ((dvrFd >= 0) && (write(dvrFd, p, TS_SIZE) != TS_SIZE))

2
iptv.c
View File

@ -20,7 +20,7 @@
#error "VDR-1.6.0 API version or greater is required!"
#endif
static const char VERSION[] = "0.2.3";
static const char VERSION[] = "0.2.4";
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
class cPluginIptv : public cPlugin {

View File

@ -1,6 +1,6 @@
diff -Nru vdr-1.7.2-vanilla/channels.c vdr-1.7.2-pluginparam/channels.c
--- vdr-1.7.2-vanilla/channels.c 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/channels.c 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/channels.c vdr-1.7.4-pluginparam/channels.c
--- vdr-1.7.4-vanilla/channels.c 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/channels.c 2009-02-24 13:31:33.000000000 +0200
@@ -188,6 +188,7 @@
shortName = strdup("");
provider = strdup("");
@ -122,9 +122,9 @@ diff -Nru vdr-1.7.2-vanilla/channels.c vdr-1.7.2-pluginparam/channels.c
free(parambuf);
free(sourcebuf);
diff -Nru vdr-1.7.2-vanilla/channels.h vdr-1.7.2-pluginparam/channels.h
--- vdr-1.7.2-vanilla/channels.h 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/channels.h 2008-12-14 19:53:44.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/channels.h vdr-1.7.4-pluginparam/channels.h
--- vdr-1.7.4-vanilla/channels.h 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/channels.h 2009-02-24 13:31:33.000000000 +0200
@@ -116,6 +116,7 @@
char *shortName;
char *provider;
@ -164,22 +164,22 @@ diff -Nru vdr-1.7.2-vanilla/channels.h vdr-1.7.2-pluginparam/channels.h
void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid);
void SetCaIds(const int *CaIds); // list must be zero-terminated
void SetCaDescriptors(int Level);
diff -Nru vdr-1.7.2-vanilla/config.h vdr-1.7.2-pluginparam/config.h
--- vdr-1.7.2-vanilla/config.h 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/config.h 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/config.h vdr-1.7.4-pluginparam/config.h
--- vdr-1.7.4-vanilla/config.h 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/config.h 2009-02-24 13:31:33.000000000 +0200
@@ -30,6 +30,8 @@
#define APIVERSION "1.7.0"
#define APIVERSNUM 10700 // Version * 10000 + Major * 100 + Minor
#define APIVERSION "1.7.4"
#define APIVERSNUM 10704 // Version * 10000 + Major * 100 + Minor
+#define PLUGINPARAMPATCHVERSNUM 1
+
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to
// VDR header files since the last APIVERSION. This allows compiled
diff -Nru vdr-1.7.2-vanilla/menu.c vdr-1.7.2-pluginparam/menu.c
--- vdr-1.7.2-vanilla/menu.c 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/menu.c 2008-12-14 19:52:45.000000000 +0200
@@ -189,6 +189,7 @@
diff -Nru vdr-1.7.4-vanilla/menu.c vdr-1.7.4-pluginparam/menu.c
--- vdr-1.7.4-vanilla/menu.c 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/menu.c 2009-02-24 13:31:33.000000000 +0200
@@ -190,6 +190,7 @@
cChannel *channel;
cChannel data;
char name[256];
@ -187,7 +187,7 @@ diff -Nru vdr-1.7.2-vanilla/menu.c vdr-1.7.2-pluginparam/menu.c
void Setup(void);
public:
cMenuEditChannel(cChannel *Channel, bool New = false);
@@ -221,6 +222,7 @@
@@ -222,6 +223,7 @@
// Parameters for all types of sources:
strn0cpy(name, data.name, sizeof(name));
@ -195,7 +195,7 @@ diff -Nru vdr-1.7.2-vanilla/menu.c vdr-1.7.2-pluginparam/menu.c
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
@@ -253,6 +255,7 @@
@@ -254,6 +256,7 @@
ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues));
ST(" S ") Add(new cMenuEditMapItem( tr("Rolloff"), &data.rollOff, RollOffValues));
@ -203,7 +203,7 @@ diff -Nru vdr-1.7.2-vanilla/menu.c vdr-1.7.2-pluginparam/menu.c
SetCurrent(Get(current));
Display();
@@ -267,6 +270,7 @@
@@ -268,6 +271,7 @@
if (Key == kOk) {
if (Channels.HasUniqueChannelID(&data, channel)) {
data.name = strcpyrealloc(data.name, name);
@ -211,9 +211,9 @@ diff -Nru vdr-1.7.2-vanilla/menu.c vdr-1.7.2-pluginparam/menu.c
if (channel) {
*channel = data;
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
diff -Nru vdr-1.7.2-vanilla/po/fi_FI.po vdr-1.7.2-pluginparam/po/fi_FI.po
--- vdr-1.7.2-vanilla/po/fi_FI.po 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/po/fi_FI.po 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/po/fi_FI.po vdr-1.7.4-pluginparam/po/fi_FI.po
--- vdr-1.7.4-vanilla/po/fi_FI.po 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/po/fi_FI.po 2009-02-24 13:31:33.000000000 +0200
@@ -1010,3 +1010,6 @@
#, c-format
msgid "VDR will shut down in %s minutes"
@ -221,9 +221,9 @@ diff -Nru vdr-1.7.2-vanilla/po/fi_FI.po vdr-1.7.2-pluginparam/po/fi_FI.po
+
+msgid "Parameters"
+msgstr "Parametrit"
diff -Nru vdr-1.7.2-vanilla/po/fr_FR.po vdr-1.7.2-pluginparam/po/fr_FR.po
--- vdr-1.7.2-vanilla/po/fr_FR.po 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/po/fr_FR.po 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/po/fr_FR.po vdr-1.7.4-pluginparam/po/fr_FR.po
--- vdr-1.7.4-vanilla/po/fr_FR.po 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/po/fr_FR.po 2009-02-24 13:31:33.000000000 +0200
@@ -1013,3 +1013,6 @@
#, c-format
msgid "VDR will shut down in %s minutes"
@ -231,9 +231,9 @@ diff -Nru vdr-1.7.2-vanilla/po/fr_FR.po vdr-1.7.2-pluginparam/po/fr_FR.po
+
+msgid "Parameters"
+msgstr "Paramètres"
diff -Nru vdr-1.7.2-vanilla/sources.c vdr-1.7.2-pluginparam/sources.c
--- vdr-1.7.2-vanilla/sources.c 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/sources.c 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/sources.c vdr-1.7.4-pluginparam/sources.c
--- vdr-1.7.4-vanilla/sources.c 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/sources.c 2009-02-24 13:31:33.000000000 +0200
@@ -37,6 +37,7 @@
char buffer[16];
char *q = buffer;
@ -250,9 +250,9 @@ diff -Nru vdr-1.7.2-vanilla/sources.c vdr-1.7.2-pluginparam/sources.c
case 'C': type = stCable; break;
case 'S': type = stSat; break;
case 'T': type = stTerr; break;
diff -Nru vdr-1.7.2-vanilla/sources.conf vdr-1.7.2-pluginparam/sources.conf
--- vdr-1.7.2-vanilla/sources.conf 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/sources.conf 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/sources.conf vdr-1.7.4-pluginparam/sources.conf
--- vdr-1.7.4-vanilla/sources.conf 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/sources.conf 2009-02-24 13:31:33.000000000 +0200
@@ -194,3 +194,7 @@
# Terrestrial
@ -261,9 +261,9 @@ diff -Nru vdr-1.7.2-vanilla/sources.conf vdr-1.7.2-pluginparam/sources.conf
+# Plugin
+
+P Plugin
diff -Nru vdr-1.7.2-vanilla/sources.h vdr-1.7.2-pluginparam/sources.h
--- vdr-1.7.2-vanilla/sources.h 2008-12-14 18:36:17.000000000 +0200
+++ vdr-1.7.2-pluginparam/sources.h 2008-12-14 19:52:45.000000000 +0200
diff -Nru vdr-1.7.4-vanilla/sources.h vdr-1.7.4-pluginparam/sources.h
--- vdr-1.7.4-vanilla/sources.h 2009-01-26 11:44:48.000000000 +0200
+++ vdr-1.7.4-pluginparam/sources.h 2009-02-24 13:31:33.000000000 +0200
@@ -16,10 +16,11 @@
public:
enum eSourceType {

View File

@ -226,7 +226,7 @@ void cIptvSectionFilter::ProcessData(const uint8_t* buf)
error("Not TS packet: 0x%X\n", buf[0]);
return;
}
// Stop if not the PID this filter is looking for
if (ts_pid(buf) != pid)
return;
@ -240,7 +240,7 @@ void cIptvSectionFilter::ProcessData(const uint8_t* buf)
uint8_t cc = buf[3] & 0x0f;
int ccok = ((feedcc + 1) & 0x0f) == cc;
feedcc = cc;
feedcc = cc;
int dc_i = 0;
if (buf[3] & 0x20) {