diff options
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | PLUGINS.html | 1 | ||||
-rw-r--r-- | device.c | 7 | ||||
-rw-r--r-- | device.h | 6 | ||||
-rw-r--r-- | sections.c | 4 |
6 files changed, 18 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e2b68597..49df88fe 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -87,6 +87,8 @@ Deti Fliegl <deti@fliegl.de> for fixing setting the OSD size in the 'Confirm' interface call for fixing handling improper buffer lengths in the EIT parser for a patch that was used to implement StopSectionHandler() + for adding cDevice::ReadFilter() to allow devices to implement their own way of + retrieving section filter data Dave Chapman <dave@dchapman.com> for implementing support for the teletext PID @@ -7206,3 +7206,5 @@ Video Disk Recorder Revision History - Fixed detecting transfer mode on full featured DVB cards (thanks to Stefan Huelswitt for reporting a problem with updating CA descriptors in such cases). - Fixed a race condition when zapping in transfer mode (reported by Reinhard Nissl). +- The new function cDevice::ReadFilter() can be used by devices to implement their + own way of retrieving section filter data (thanks to Deti Fliegl). diff --git a/PLUGINS.html b/PLUGINS.html index a6b29f20..a7a0a9d2 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -1888,6 +1888,7 @@ the functions <p><table><tr><td class="code"><pre> virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask); +<modified>virtual int ReadFilter(int Handle, void *Buffer, size_t Length);</modified> virtual void CloseFilter(int Handle); </pre></td></tr></table><p> @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.63 2012/08/25 11:56:08 kls Exp $ + * $Id: device.c 2.64 2012/08/26 12:53:39 kls Exp $ */ #include "device.h" @@ -593,6 +593,11 @@ int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask) return -1; } +int cDevice::ReadFilter(int Handle, void *Buffer, size_t Length) +{ + return safe_read(Handle, Buffer, Length); +} + void cDevice::CloseFilter(int Handle) { close(Handle); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 2.39 2012/04/04 09:48:21 kls Exp $ + * $Id: device.h 2.40 2012/08/26 12:56:14 kls Exp $ */ #ifndef __DEVICE_H @@ -393,6 +393,10 @@ public: ///< Opens a file handle for the given filter data. ///< A derived device that provides section data must ///< implement this function. + virtual int ReadFilter(int Handle, void *Buffer, size_t Length); + ///< Reads data from a handle for the given filter. + ///< A derived class need not implement this function, because this + ///< is done by the default implementation. 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), @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sections.c 1.15 2007/10/14 12:52:07 kls Exp $ + * $Id: sections.c 2.1 2012/08/26 12:53:39 kls Exp $ */ #include "sections.h" @@ -198,7 +198,7 @@ void cSectionHandler::Action(void) if (fh) { // Read section data: unsigned char buf[4096]; // max. allowed size for any EIT section - int r = safe_read(fh->handle, buf, sizeof(buf)); + int r = device->ReadFilter(fh->handle, buf, sizeof(buf)); if (!DeviceHasLock) continue; // we do the read anyway, to flush any data that might have come from a different transponder if (r > 3) { // minimum number of bytes necessary to get section length |