mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Added CloseFilter() to VDR's API.
This commit is contained in:
parent
bdacb388c3
commit
18cb7df87d
7
device.c
7
device.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.c,v 1.31 2007/09/22 08:17:35 ajhseppa Exp $
|
||||
* $Id: device.c,v 1.32 2007/09/22 10:23:54 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
@ -246,11 +246,8 @@ void cIptvDevice::CloseDvr(void)
|
||||
debug("cIptvDevice::CloseDvr(%d)\n", deviceIndex);
|
||||
pIptvStreamer->Close();
|
||||
// Iterate over all filters and clear their settings
|
||||
for (int i = 0; i < eMaxFilterCount; ++i) {
|
||||
if (filters[i].active) {
|
||||
for (int i = 0; i < eMaxFilterCount; ++i)
|
||||
DeleteFilter(i);
|
||||
}
|
||||
}
|
||||
isOpenDvr = false;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nru vdr-1.5.9-vanilla/channels.c vdr-1.5.9-iptv/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-19 21:39:32.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/channels.c 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -166,6 +166,7 @@
|
||||
shortName = strdup("");
|
||||
provider = strdup("");
|
||||
@ -124,7 +124,7 @@ diff -Nru vdr-1.5.9-vanilla/channels.c vdr-1.5.9-iptv/channels.c
|
||||
free(sourcebuf);
|
||||
diff -Nru vdr-1.5.9-vanilla/channels.h vdr-1.5.9-iptv/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-19 21:38:57.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/channels.h 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -114,6 +114,7 @@
|
||||
char *shortName;
|
||||
char *provider;
|
||||
@ -164,9 +164,62 @@ 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
|
||||
--- vdr-1.5.9-vanilla/menu.c 2007-08-26 18:45:20.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/menu.c 2007-09-19 21:38:57.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/menu.c 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -219,6 +219,7 @@
|
||||
cChannel *channel;
|
||||
cChannel data;
|
||||
@ -201,7 +254,7 @@ diff -Nru vdr-1.5.9-vanilla/menu.c vdr-1.5.9-iptv/menu.c
|
||||
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
|
||||
--- 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-19 21:38:57.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/po/fi_FI.po 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -1271,3 +1271,7 @@
|
||||
#, c-format
|
||||
msgid "VDR will shut down in %s minutes"
|
||||
@ -210,9 +263,21 @@ 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
|
||||
--- vdr-1.5.9-vanilla/sources.c 2007-08-26 18:45:20.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/sources.c 2007-09-19 21:38:57.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/sources.c 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -37,6 +37,7 @@
|
||||
char buffer[16];
|
||||
char *q = buffer;
|
||||
@ -231,7 +296,7 @@ diff -Nru vdr-1.5.9-vanilla/sources.c vdr-1.5.9-iptv/sources.c
|
||||
case 'T': type = stTerr; break;
|
||||
diff -Nru vdr-1.5.9-vanilla/sources.conf vdr-1.5.9-iptv/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-19 21:38:57.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/sources.conf 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -188,3 +188,7 @@
|
||||
# Terrestrial
|
||||
|
||||
@ -242,7 +307,7 @@ diff -Nru vdr-1.5.9-vanilla/sources.conf vdr-1.5.9-iptv/sources.conf
|
||||
+P Plugin
|
||||
diff -Nru vdr-1.5.9-vanilla/sources.h vdr-1.5.9-iptv/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-19 21:38:57.000000000 +0300
|
||||
+++ vdr-1.5.9-iptv/sources.h 2007-09-22 01:34:28.000000000 +0300
|
||||
@@ -16,10 +16,11 @@
|
||||
public:
|
||||
enum eSourceType {
|
||||
|
Loading…
Reference in New Issue
Block a user