mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added cDevice::CloseFilter(); some fixes to PLUGINS.html
This commit is contained in:
parent
7780e3664a
commit
67df515c06
@ -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
|
||||
|
3
HISTORY
3
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).
|
||||
|
11
PLUGINS.html
11
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> </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
|
||||
|
7
device.c
7
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)
|
||||
|
7
device.h
7
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);
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user