Mailing List archive

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

[linux-dvb] Re: Automatical VDR wake up. (Was: Powersave updated!!)



Sergei Haller wrote:
> 
> On Fri, 24 Aug 2001, Peter Seyringer wrote:
> 
> > I have updated my project "Powersave". ...
> > There is now no support for vdr, so i need some people how help me to
> > implement them into vdr.
> 
> Im experementing with wake on rtc (but havent much time, though) at the
> moment. Someone on the list wrote something about automatical wake on lan.
> 
> I think it would be nice to have a general solution, i.e. if VDR is
> exitting, it checks which of the timers would be recorded next (e.g. on 23
> at 13:00) and calls some program (?configurable by the user at compile
> time?) with the three parameters 23 12 55.
> (I think 5 minutes time difference should be sufficient for any (?)
> system, but maybe the time difference should be set via setup menu)
> 
> this external program would set the wake up mechanism properly.
> (powersave, wake on lan, wake on rtc or whatever else)

I did a lot of work on the timers this weekend, and while doing so,
in preparation for an integrated power save feature, I have implemented
the function cTimers::GetNextActiveTimer() (see config.c), which returns
the next timer that will record (or the currently recording timer).
Every timer now always returns its StartTime() (even if it is not currently
recording, as was the case before), so by calling

  cTimer *timer = Timers.GetNextActiveTimer()

and comparing timer->StartTime() to the current time it is possible to
determine how long it will be until the next timer event will take place.

I'm not using this function yet, but will do so when implementing a power
save exit function. There will be a new command line option that defines the
program to call, and if that option is set VDR calls the program with a single
integer parameter that is the exact time of the next event, in the form of
a time_t number (seconds since the epoch). The program being called can then
subtract the necessary amount of time from this number, since every system
needs its own time to boot. The return value of the call can be used to tell
VDR whether it should actually exit. That way the called program can decide
not to go into power save mode (for whatever reasons there might be).

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


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


Home | Main Index | Thread Index