mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Added a device hook for detecting whether a device provides EIT data
This commit is contained in:
19
PLUGINS.html
19
PLUGINS.html
@@ -2025,8 +2025,9 @@ operator!
|
||||
<b>Device hooks</b>
|
||||
<p>
|
||||
VDR has builtin facilities that select which device is able to provide a given
|
||||
transponder. However, there may be situations where the setup is so special
|
||||
that it requires considerations that exceed the scope of the core VDR code.
|
||||
transponder, or, which device may provide EIT data. However, there may be
|
||||
situations where the setup is so special that it requires considerations that
|
||||
exceed the scope of the core VDR code.
|
||||
This is where <i>device hooks</i> can be used.
|
||||
|
||||
<p><table><tr><td class="code"><pre>
|
||||
@@ -2034,6 +2035,7 @@ class cMyDeviceHook : public cDeviceHook {
|
||||
public:
|
||||
cMyDeviceHook(void);
|
||||
virtual bool DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const;
|
||||
virtual bool DeviceProvidesEIT(const cDevice *Device) const;
|
||||
};
|
||||
</pre></td></tr></table><p>
|
||||
|
||||
@@ -2050,6 +2052,19 @@ bool cMyDeviceHook::DeviceProvidesTransponder(const cDevice *Device, const cChan
|
||||
}
|
||||
</pre></td></tr></table><p>
|
||||
|
||||
In its <tt>DeviceProvidesEIT()</tt> function the device hook can take
|
||||
whatever actions are necessary to determine whether the given Device can
|
||||
provide EIT data, as in
|
||||
|
||||
<p><table><tr><td class="code"><pre>
|
||||
bool cMyDeviceHook::DeviceProvidesEIT(const cDevice *Device) const
|
||||
{
|
||||
if (<i>condition where Device can't provide EIT data</i>)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
</pre></td></tr></table><p>
|
||||
|
||||
A plugin that creates a derived cDeviceHook shall do so in its <tt>Initialize()</tt>
|
||||
function, as in
|
||||
|
||||
|
Reference in New Issue
Block a user