Mailing List archive

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

[vdr] Re: Commands executed in connection with timers



Mathias Born wrote:
> 
> Hi,
> 
> is there any possibility to execute a command before a timer starts
> and after it ends?
> Just like the commands in commands.conf but controlled by timers.
> 
> Background:
> I'm recording my videos to a reiserfs-disk. In addition, I want to
> spin down this disk when there is no disk activity. For this reason
> I'm using noflushd which suspends every delayed disk access until
> there is real disk activity caused by the user.
> Unfortunately reiserfs's journaling bypasses the delay mechanism of
> the kernel and thus it happens that noflushd spins down the disk
> although a recording is in progress.
> 
> The easiest solution from my point of view would be to disable the
> disk spin down before a recording starts and to enable it afterwards.
> Since I don't want to program all timers twice vdr is the best
> candidate to execute these commands.

Since this is apparently something several people would like to have,
I'll see to implement it in one of the next versions.

For a quick hack you could insert a line like

   system("myBeforeScript");

before the line 2131

   if (dvbApi->StartRecord(Recording.FileName(), Channels.GetByNumber(timer->channel)->ca, timer->priority))

in menu.c, and one like

   system("myAfterScript");

after the line 2176

   dvbApi->StopRecord();

(also in menu.c). Line numbers are based on VDR version 0.95.

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
_______________________________________________________________



Home | Main Index | Thread Index