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

Splitted the patch into closefilter and pluginparam ones.

This commit is contained in:
Rolf Ahrenberg 2007-10-07 16:59:48 +00:00
parent 0b7157b1c0
commit 0887832b35
3 changed files with 121 additions and 80 deletions

3
README
View File

@ -34,7 +34,8 @@ cd /put/your/path/here/VDR/PLUGINS/src
tar -xzf /put/your/path/here/vdr-iptv-X.Y.Z.tgz
ln -s iptv-X.Y.Z iptv
cd /put/your/path/here/VDR
patch -p1 < PLUGINS/src/iptv/patches/vdr-1.5.x-iptv.patch
patch -p1 < PLUGINS/src/iptv/patches/vdr-1.5.x-closefilter.patch
patch -p1 < PLUGINS/src/iptv/patches/vdr-1.5.x-pluginparam.patch
cp sources.conf /path/to/vdrconf/
make
make plugins

View File

@ -0,0 +1,105 @@
diff -Nru vdr-1.5.9-vanilla/PLUGINS.html vdr-1.5.9-closefilter/PLUGINS.html
--- vdr-1.5.9-vanilla/PLUGINS.html 2007-08-24 16:45:02.000000000 +0300
+++ vdr-1.5.9-closefilter/PLUGINS.html 2007-09-28 17:57:47.484049900 +0300
@@ -1778,7 +1778,7 @@
<p><table><tr><td bgcolor=#F0F0F0><pre>
virtual bool ProvidesSource(int Source) const;
virtual bool ProvidesTransponder(const cChannel *Channel) const;
-virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL);
+virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
</pre></td></tr></table><p>
@@ -1838,7 +1838,7 @@
functionality:
<p><table><tr><td bgcolor=#F0F0F0><pre>
-virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int Si
+virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
virtual void SetVideoFormat(bool VideoFormat16_9);
virtual void SetVolumeDevice(int Volume);
</pre></td></tr></table><p>
@@ -1846,14 +1846,15 @@
<p>
<b>Section Filtering</b>
<p>
-If your device provides section filtering capabilities it can implement
-the function
+If your device provides section filtering capabilities it can implement
+functions
<p><table><tr><td bgcolor=#F0F0F0><pre>
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
+virtual bool CloseFilter(int Handle);
</pre></td></tr></table><p>
-which must open a file handle that delivers section data for the given
+which must open and close a file handle that delivers section data for the given
filter parameters.
<p>
In order to actually start section handling, the
diff -Nru vdr-1.5.9-vanilla/device.c vdr-1.5.9-closefilter/device.c
--- vdr-1.5.9-vanilla/device.c 2007-08-26 14:11:42.000000000 +0300
+++ vdr-1.5.9-closefilter/device.c 2007-09-28 17:53:49.734049900 +0300
@@ -576,6 +576,11 @@
return -1;
}
+bool cDevice::CloseFilter(int Handle)
+{
+ return false;
+}
+
void cDevice::AttachFilter(cFilter *Filter)
{
if (sectionHandler)
diff -Nru vdr-1.5.9-vanilla/device.h vdr-1.5.9-closefilter/device.h
--- vdr-1.5.9-vanilla/device.h 2007-07-22 14:20:13.000000000 +0300
+++ vdr-1.5.9-closefilter/device.h 2007-09-28 17:53:49.749674900 +0300
@@ -303,6 +303,8 @@
///< Opens a file handle for the given filter data.
///< A derived device that provides section data must
///< implement this function.
+ virtual bool CloseFilter(int Handle);
+ ///< Closes a file handle
void AttachFilter(cFilter *Filter);
///< Attaches the given filter to this device.
void Detach(cFilter *Filter);
diff -Nru vdr-1.5.9-vanilla/dvbdevice.c vdr-1.5.9-closefilter/dvbdevice.c
--- vdr-1.5.9-vanilla/dvbdevice.c 2007-08-17 16:37:56.000000000 +0300
+++ vdr-1.5.9-closefilter/dvbdevice.c 2007-09-28 17:53:49.765299900 +0300
@@ -711,6 +711,11 @@
return -1;
}
+bool cDvbDevice::CloseFilter(int Handle)
+{
+ return (close(Handle) == 0);
+}
+
void cDvbDevice::TurnOffLiveMode(bool LiveView)
{
if (LiveView) {
diff -Nru vdr-1.5.9-vanilla/dvbdevice.h vdr-1.5.9-closefilter/dvbdevice.h
--- vdr-1.5.9-vanilla/dvbdevice.h 2007-02-25 14:23:57.000000000 +0200
+++ vdr-1.5.9-closefilter/dvbdevice.h 2007-09-28 17:53:49.765299900 +0300
@@ -83,6 +83,7 @@
protected:
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
+ virtual bool CloseFilter(int Handle);
// Common Interface facilities:
diff -Nru vdr-1.5.9-vanilla/sections.c vdr-1.5.9-closefilter/sections.c
--- vdr-1.5.9-vanilla/sections.c 2005-09-18 14:30:29.000000000 +0300
+++ vdr-1.5.9-closefilter/sections.c 2007-09-28 17:53:49.780924900 +0300
@@ -105,7 +105,7 @@
for (fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) {
if (fh->filterData.Is(FilterData->pid, FilterData->tid, FilterData->mask)) {
if (--fh->used <= 0) {
- close(fh->handle);
+ device->CloseFilter(fh->handle);
filterHandles.Del(fh);
break;
}

View File

@ -1,6 +1,6 @@
diff -Nru vdr-1.5.9-vanilla/channels.c vdr-1.5.9-iptv/channels.c
diff -Nru vdr-1.5.9-vanilla/channels.c vdr-1.5.9-pluginparam/channels.c
--- vdr-1.5.9-vanilla/channels.c 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/channels.c 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/channels.c 2007-10-07 19:54:06.000000000 +0300
@@ -166,6 +166,7 @@
shortName = strdup("");
provider = strdup("");
@ -122,9 +122,9 @@ diff -Nru vdr-1.5.9-vanilla/channels.c vdr-1.5.9-iptv/channels.c
free(parambuf);
free(sourcebuf);
diff -Nru vdr-1.5.9-vanilla/channels.h vdr-1.5.9-iptv/channels.h
diff -Nru vdr-1.5.9-vanilla/channels.h vdr-1.5.9-pluginparam/channels.h
--- vdr-1.5.9-vanilla/channels.h 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/channels.h 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/channels.h 2007-10-07 19:54:06.000000000 +0300
@@ -114,6 +114,7 @@
char *shortName;
char *provider;
@ -164,62 +164,9 @@ diff -Nru vdr-1.5.9-vanilla/channels.h vdr-1.5.9-iptv/channels.h
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int Tpid);
void SetCaIds(const int *CaIds); // list must be zero-terminated
void SetCaDescriptors(int Level);
diff -Nru vdr-1.5.9-vanilla/device.c vdr-1.5.9-iptv/device.c
--- vdr-1.5.9-vanilla/device.c 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/device.c 2007-09-22 01:35:17.000000000 +0300
@@ -576,6 +576,11 @@
return -1;
}
+bool cDevice::CloseFilter(int Handle)
+{
+ return false;
+}
+
void cDevice::AttachFilter(cFilter *Filter)
{
if (sectionHandler)
diff -Nru vdr-1.5.9-vanilla/device.h vdr-1.5.9-iptv/device.h
--- vdr-1.5.9-vanilla/device.h 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/device.h 2007-09-22 01:35:02.000000000 +0300
@@ -303,6 +303,8 @@
///< Opens a file handle for the given filter data.
///< A derived device that provides section data must
///< implement this function.
+ virtual bool CloseFilter(int Handle);
+ ///< Closes a file handle
void AttachFilter(cFilter *Filter);
///< Attaches the given filter to this device.
void Detach(cFilter *Filter);
diff -Nru vdr-1.5.9-vanilla/dvbdevice.c vdr-1.5.9-iptv/dvbdevice.c
--- vdr-1.5.9-vanilla/dvbdevice.c 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/dvbdevice.c 2007-09-22 01:35:52.000000000 +0300
@@ -711,6 +711,11 @@
return -1;
}
+bool cDvbDevice::CloseFilter(int Handle)
+{
+ return (close(Handle) == 0);
+}
+
void cDvbDevice::TurnOffLiveMode(bool LiveView)
{
if (LiveView) {
diff -Nru vdr-1.5.9-vanilla/dvbdevice.h vdr-1.5.9-iptv/dvbdevice.h
--- vdr-1.5.9-vanilla/dvbdevice.h 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/dvbdevice.h 2007-09-22 01:35:28.000000000 +0300
@@ -83,6 +83,7 @@
protected:
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
+ virtual bool CloseFilter(int Handle);
// Common Interface facilities:
diff -Nru vdr-1.5.9-vanilla/menu.c vdr-1.5.9-iptv/menu.c
diff -Nru vdr-1.5.9-vanilla/menu.c vdr-1.5.9-pluginparam/menu.c
--- vdr-1.5.9-vanilla/menu.c 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/menu.c 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/menu.c 2007-10-07 19:54:06.000000000 +0300
@@ -219,6 +219,7 @@
cChannel *channel;
cChannel data;
@ -252,9 +199,9 @@ diff -Nru vdr-1.5.9-vanilla/menu.c vdr-1.5.9-iptv/menu.c
if (channel) {
*channel = data;
isyslog("edited channel %d %s", channel->Number(), *data.ToText());
diff -Nru vdr-1.5.9-vanilla/po/fi_FI.po vdr-1.5.9-iptv/po/fi_FI.po
diff -Nru vdr-1.5.9-vanilla/po/fi_FI.po vdr-1.5.9-pluginparam/po/fi_FI.po
--- vdr-1.5.9-vanilla/po/fi_FI.po 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/po/fi_FI.po 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/po/fi_FI.po 2007-10-07 19:54:06.000000000 +0300
@@ -1271,3 +1271,7 @@
#, c-format
msgid "VDR will shut down in %s minutes"
@ -263,21 +210,9 @@ diff -Nru vdr-1.5.9-vanilla/po/fi_FI.po vdr-1.5.9-iptv/po/fi_FI.po
+#: menu.c:284
+msgid "Parameters"
+msgstr "Parametrit"
diff -Nru vdr-1.5.9-vanilla/sections.c vdr-1.5.9-iptv/sections.c
--- vdr-1.5.9-vanilla/sections.c 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/sections.c 2007-09-22 13:18:11.000000000 +0300
@@ -105,7 +105,7 @@
for (fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) {
if (fh->filterData.Is(FilterData->pid, FilterData->tid, FilterData->mask)) {
if (--fh->used <= 0) {
- close(fh->handle);
+ device->CloseFilter(fh->handle);
filterHandles.Del(fh);
break;
}
diff -Nru vdr-1.5.9-vanilla/sources.c vdr-1.5.9-iptv/sources.c
diff -Nru vdr-1.5.9-vanilla/sources.c vdr-1.5.9-pluginparam/sources.c
--- vdr-1.5.9-vanilla/sources.c 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/sources.c 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/sources.c 2007-10-07 19:54:06.000000000 +0300
@@ -37,6 +37,7 @@
char buffer[16];
char *q = buffer;
@ -294,9 +229,9 @@ diff -Nru vdr-1.5.9-vanilla/sources.c vdr-1.5.9-iptv/sources.c
case 'C': type = stCable; break;
case 'S': type = stSat; break;
case 'T': type = stTerr; break;
diff -Nru vdr-1.5.9-vanilla/sources.conf vdr-1.5.9-iptv/sources.conf
diff -Nru vdr-1.5.9-vanilla/sources.conf vdr-1.5.9-pluginparam/sources.conf
--- vdr-1.5.9-vanilla/sources.conf 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/sources.conf 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/sources.conf 2007-10-07 19:54:06.000000000 +0300
@@ -188,3 +188,7 @@
# Terrestrial
@ -305,9 +240,9 @@ diff -Nru vdr-1.5.9-vanilla/sources.conf vdr-1.5.9-iptv/sources.conf
+# Plugin
+
+P Plugin
diff -Nru vdr-1.5.9-vanilla/sources.h vdr-1.5.9-iptv/sources.h
diff -Nru vdr-1.5.9-vanilla/sources.h vdr-1.5.9-pluginparam/sources.h
--- vdr-1.5.9-vanilla/sources.h 2007-08-26 18:45:20.000000000 +0300
+++ vdr-1.5.9-iptv/sources.h 2007-09-22 01:34:28.000000000 +0300
+++ vdr-1.5.9-pluginparam/sources.h 2007-10-07 19:54:06.000000000 +0300
@@ -16,10 +16,11 @@
public:
enum eSourceType {