Mailing List archive

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

[vdr] Re: Shutdown after recording



On Wed, 25 Sep 2002, Lauri Tischler (LT) wrote:

LT> Klaus Schmidinger wrote:
LT> >
LT> > I  suggest  somebody  should  take  a  closer  look  at the shutdown
LT> > mechanisms  in  vdr.c  and see whether it could be made so that if a
LT> > recording  ends that has been started after an automatic reboot, the
LT> > shutdown is immediately triggered.
LT>
LT> The MAXIM DS1685 datashit tells

could you be more precise, where to get that sheet?

LT> that, Register C, bit AF,

bit  AF  of the register C? the register C of the RTC contains exactly one
byte, i.e. 8 bits (0-7).

LT> contains info that 'current time has matched alarm time'.

most  probably, this bit is only set to 1 _while_ the current time matches
alarm  time,  so  the bios of the motherboard only has to look at this bit
and  if it is 1, calls the power-up routines. That is, this bit is useless
during the general vdr-use.


LT> System  boot-up  could  read  the status of this bit, set some kind of
LT> flag,

I  remember reading something like "VDR assumes automatic startup" in some
of  the  logs, but I'm not sure, and I'm not at home, so I can't just look
it  up.  So  I think, VDR has this detection intelligence already. (Klaus,
please correct me if I'm wrong)

LT> and then end-of-recording script would do something according to flag.

I think, there are two ways to go:

 1. (what  Klaus  suggested  above)  to call the shutdown script after the
    end-of-recording script,  if vdr assumes automatic startup and if _no_
    key was pressed since startup (what about svdrp?)

 2. just let the  end-of-recording script pass the "hitk power" command to
    vdr via svdrp.  If vdr runs unattended, this will shutdown the machine
    after 5 minutes.  If you're  watching tv at the moment, you can cancel
    the shutdown  just by pressing  one of  the remote keys within those 5
    minutes.

what is to do in those two cases:

 1. edit  vdr.c  (see  Klaus'  note  above).  And  if the detection of the
    "automatic"  startup  is  not  implemented  yet,  I think something as
    simple as:
      - if  there's  a timer starting within next, say, 10 minutes, assume
        autmatic startup.
      - if  there's no timer starting within  this period of time,  assume
        manual startup.
      - any  key  press  (and svdrp activity?)  sets  that flag to "manual
        startup"

 2. the  script  could  look like the one mentioned in the INSTALL file of
    the vdr package (at least  in the 1.0.x branch), just replace the line
         echo "After recording $2"
    by something like
         svdrpsend.pl "hitk power"
    (sorry, I don't remember the exact syntax of svdrpsend.pl).
    then pass the script to vdr with the -r option.


I think, the "1" above is the "better" way, but the "2" is available right
now.

LT> Maybe Sergei could look into it ??

Well,  I  could  take  a  closer look at "1", and I would be willing to do
that,  but  I  don't have much time right now. So unfortunately, I have to
say "sorry, but probably in future."


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






Home | Main Index | Thread Index