Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Integration of Powersave in VDR



On Tue, 28 Aug 2001, Klaus Schmidinger wrote:

> Therefore I suggest that everybody who wants to power off their VDR machine
> provides a program (binary, shell script, Perl script or whatever), which can
> be called by VDR with exactly one paramter, namely the time (in UTC) when the
> next timer event will take place (that will be the exact starting time of the
> timer, so if the system needs additional time to power up, the program should
> subtract that time). The time will be given as the number of seconds since the
> epoch (i.e. "time_t" type). The program shall take whatever measures are necessary
> to make sure the machine will restart at the given time, and shall also initiate
> the shutdown sequence. In order for VDR to exit gracefully, the program shall
> return after initiating the shutdown procedure, and its exit value shall be
> '0' if it was successful, '1' if there was an error (and the shutdown will not
> take place).

yeah. I like the idea.


> VDR will provide two new setup parameters: MinEventTimeout and MinUserInactivity.
> The shutdown program will only be called if all of the following is true:
>
> - there is currently no replay or recording session active
> - the next timer event is at least MinEventTimeout minutes in the future
> - there has been no user activity (i.e.remote control input) for at least
>   MinUserInactivity minutes
>
> Before the actual call of the shutdown program there will be a prompt on the
> screen, allowing the user to cancel the shutdown.

for how long duration?

> Since this is a user activity,
> a new MinUserInactivity timeout will then be started.
>
> If this is what everybody can agree on, I can implement this framework into VDR.
> All you'll have to do is provide the actual shutdown program and run VDR with the
> new option "--shutdown=CMD", where CMD is the name of your program.

what should be the default?
  - `shutdown -h'? halt?
    so the user could at least let the box automatically shutdown after
    completing the record. or he would be able to use the new `intentional
    shutdown' menu. I think one can disable the `automatical shutdown'
    feature by setting the MinUserInactivity to 0

  - something else?


> An additional new menu option to intentionally shutdown the machine NOW will
> complete this.

One additional request:

it would be nice if there was a way for some external program to tell vdr
to `shutdown' machine now (to call that external command and so on)

maybe via SVDRP ?

(what I have in mind is the following: ATM I am using acpid to call
`shutdown -h' on a power button press. with that new feature I would like
to tell vdr to shutdown now)


in both cases of the intentionally shutdown (via menu or SVDRP)
I suppose vdr will first check for the
  - MinEventTimeout and
  - if there is a recording now
  (if it is replaying or MinUserInactivity wouldn mind in that case)
in both cases VDR should bring a message on the screen telling the user
that the shutdown cannot be initiated because of a currently recorded
timer or because the next timer lies within the next `MinEventTimeout` minutes


c ya
        Sergei

--------------------------------------------------------------------
         eMail:       Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
                -- Mark Twain



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.


Home | Main Index | Thread Index