[vdr] [RFC] Shutdown rewrite for 1.5.x
udo_richter at gmx.de
Wed Jan 17 00:25:07 CET 2007
Marko Mäkelä wrote:
> Right, becoming inactive is not that time-critical. I will give your
> suggestion a try: in the MainThreadHook of each plugin, poll
It should work, though the first key press may trigger some longer work,
and the MainThreadHook will be called at the end.
For softdevice and skins it may be interesting to watch for skin / osd
activity while inactive.
> One more thing: are the timeouts for interactive->inactive->shutdown
> configureable? Is there a way to force VDR to enter inactive mode
> without immediate shutdown?
Inactive mode is triggered by the Min User Inactivity timeout config
option, by default 3 hours. 3 hours after the last key press VDR changes
At most 5 minutes before this timeout, but only if there's no background
activity, the countdown timer starts. If the countdown runs to 0 and
there is no further activity, VDR will initiate the shutdown. After that
the 6 minutes retry counter starts, to retry the shutdown. (there's no
way how the shutdown script can report failure.) These timeouts are
hard-coded as constants in vdr.c.
To force inactive mode, one can call Shutdown.SetUserInactive(); - the
power key does it for example. This will lead to a shutdown as soon as
there's no more activity - if you want to be inactive, but avoid
shutdown, you can announce your activity by cPlugin::Active().
More information about the vdr