summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-10-14 13:11:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-10-14 13:11:23 +0200
commit67df515c06774a549078026816a32f8520c08d17 (patch)
tree505383398de6b3ecc2b3ef526a0a0cc62145e92a
parent7780e3664a5d76c84b5d1971e833ba8cc27c0f82 (diff)
downloadvdr-67df515c06774a549078026816a32f8520c08d17.tar.gz
vdr-67df515c06774a549078026816a32f8520c08d17.tar.bz2
Added cDevice::CloseFilter(); some fixes to PLUGINS.html1.5.10
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY3
-rw-r--r--PLUGINS.html11
-rw-r--r--device.c7
-rw-r--r--device.h7
-rw-r--r--dvbdevice.c7
-rw-r--r--dvbdevice.h3
-rw-r--r--sections.c4
8 files changed, 34 insertions, 10 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 05d9be35..34b4803e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1026,6 +1026,8 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for adding internationalization to the "skincurses" plugin
for helping with adding compatibility mode for playback of recordings made with
the subtitles plugin
+ for implementing cDevice::CloseFilter()
+ for some fixes to PLUGINS.html
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
diff --git a/HISTORY b/HISTORY
index 41ac6f15..91d32fb3 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5484,3 +5484,6 @@ Video Disk Recorder Revision History
- Made the default copy ctor of cRecording private (thanks to Markus Hahn).
Same for the assign operator.
- Added cRecording::Undelete() (based on a patch from Markus Hahn).
+- Added cDevice::CloseFilter() to allow a device to have complete control over
+ both opening and closing section filters (thanks to Rolf Ahrenberg).
+- Some fixes to PLUGINS.html (thanks to Rolf Ahrenberg).
diff --git a/PLUGINS.html b/PLUGINS.html
index 134bd8f2..e34ab0ec 100644
--- a/PLUGINS.html
+++ b/PLUGINS.html
@@ -1786,7 +1786,7 @@ selecting which channel it shall tune to:
<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>
@@ -1849,7 +1849,7 @@ In addition, the following functions may be implemented to provide further
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>
@@ -1858,13 +1858,16 @@ virtual void SetVolumeDevice(int Volume);
<b>Section Filtering</b>
<p>
If your device provides section filtering capabilities it can implement
-the function
+the functions
<p><table><tr><td bgcolor=#F0F0F0><pre>
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+virtual void CloseFilter(int Handle);
+<!--X1.5.10--></td></tr></table>
</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 --git a/device.c b/device.c
index c4f99259..73decabb 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.144 2007/10/13 10:30:13 kls Exp $
+ * $Id: device.c 1.145 2007/10/14 13:09:19 kls Exp $
*/
#include "device.h"
@@ -652,6 +652,11 @@ int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask)
return -1;
}
+void cDevice::CloseFilter(int Handle)
+{
+ close(Handle);
+}
+
void cDevice::AttachFilter(cFilter *Filter)
{
if (sectionHandler)
diff --git a/device.h b/device.h
index c306e004..825aadf5 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.84 2007/10/13 12:25:26 kls Exp $
+ * $Id: device.h 1.85 2007/10/14 13:09:12 kls Exp $
*/
#ifndef __DEVICE_H
@@ -308,6 +308,11 @@ public:
///< Opens a file handle for the given filter data.
///< A derived device that provides section data must
///< implement this function.
+ virtual void CloseFilter(int Handle);
+ ///< Closes a file handle that has previously been opened
+ ///< by OpenFilter(). If this is as simple as calling close(Handle),
+ ///< a derived class need not implement this function, because this
+ ///< is done by the default implementation.
void AttachFilter(cFilter *Filter);
///< Attaches the given filter to this device.
void Detach(cFilter *Filter);
diff --git a/dvbdevice.c b/dvbdevice.c
index 5864f49e..1a396064 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.166 2007/10/13 11:15:50 kls Exp $
+ * $Id: dvbdevice.c 1.167 2007/10/14 12:56:03 kls Exp $
*/
#include "dvbdevice.h"
@@ -711,6 +711,11 @@ int cDvbDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask)
return -1;
}
+void cDvbDevice::CloseFilter(int Handle)
+{
+ close(Handle);
+}
+
void cDvbDevice::TurnOffLiveMode(bool LiveView)
{
if (LiveView) {
diff --git a/dvbdevice.h b/dvbdevice.h
index 63c38d15..75572769 100644
--- a/dvbdevice.h
+++ b/dvbdevice.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.h 1.44 2007/02/25 12:23:57 kls Exp $
+ * $Id: dvbdevice.h 1.45 2007/10/14 13:01:25 kls Exp $
*/
#ifndef __DVBDEVICE_H
@@ -83,6 +83,7 @@ protected:
protected:
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
+ virtual void CloseFilter(int Handle);
// Common Interface facilities:
diff --git a/sections.c b/sections.c
index 041f5380..afb4f0bd 100644
--- a/sections.c
+++ b/sections.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sections.c 1.14 2005/09/18 09:33:40 kls Exp $
+ * $Id: sections.c 1.15 2007/10/14 12:52:07 kls Exp $
*/
#include "sections.h"
@@ -105,7 +105,7 @@ void cSectionHandler::Del(const cFilterData *FilterData)
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;
}