From 035cab576d7b01720d02ea6485146bb7ec501aa1 Mon Sep 17 00:00:00 2001 From: Lars Hanisch Date: Thu, 20 Jan 2011 20:18:12 +0100 Subject: patch to work with the dynamite-plugin With dynamite pvrinput-devices can now be attached/detached dynamically while vdr is running. e.g. svdrpsend plug dynamite attd /dev/video0 svdrpsend plug dynamite detd /dev/video0 --- pvrinput.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'pvrinput.c') diff --git a/pvrinput.c b/pvrinput.c index 5c9b81d..1c90aa4 100755 --- a/pvrinput.c +++ b/pvrinput.c @@ -6,7 +6,7 @@ #endif #endif -static const char *VERSION = "2010-09-02"; +static const char *VERSION = "2011-01-20"; static const char *DESCRIPTION = tr("use Hauppauge PVR as input device"); static const char *MAINMENUENTRY = tr("PVR picture settings"); @@ -16,10 +16,16 @@ cPluginPvrInput *PluginPvrInput; cPluginPvrInput::cPluginPvrInput(void) { PluginPvrInput = this; +#ifdef __DYNAMIC_DEVICE_PROBE + cPvrDeviceProbe::Init(); +#endif } cPluginPvrInput::~cPluginPvrInput() { +#ifdef __DYNAMIC_DEVICE_PROBE + cPvrDeviceProbe::Shutdown(); +#endif PluginPvrInput = NULL; } @@ -48,6 +54,7 @@ bool cPluginPvrInput::Initialize(void) #if VDRVERSNUM < 10507 RegisterI18n(pvrinput_Phrases); #endif //VDRVERSNUM < 10507 + cPvrDevice::Initialize(); return true; } @@ -56,7 +63,6 @@ bool cPluginPvrInput::Start(void) /* Start() is called after the primary device and user interface has been set up, but before the main program loop is entered. Is called after Initialize(). */ - cPvrDevice::Initialize(); return true; } @@ -64,7 +70,7 @@ void cPluginPvrInput::Stop(void) { /* Any threads the plugin may have created shall be stopped in the Stop() function. See VDR/PLUGINS.html */ - cPvrDevice::Stop(); + cPvrDevice::StopAll(); }; void cPluginPvrInput::Housekeeping(void) -- cgit v1.2.3