Mailing List archive

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

[vdr] Re: 18 Minutes - what does that tell?



Richard Cieply wrote:
> 
> vdr-bounce@linuxtv.org wrote on 03.04.2002 17:05:45:
> 
> [ lines removed ]
> 
> > That's what I do with my --record script that I pass to vdr as a
> > parameter. Works fine.
> 
> > #!/bin/sh
> > case "$1" in
> >     before)
> >            echo "Before recording $2"
> >            /etc/init.d/noflushd stop
> >            ;;
> >     after)
> >            echo "After recording $2"
> >            /etc/init.d/noflushd start
> >            ;;
> >     edited)
> >            echo "Edited recording $2"
> >            ;;
> >     *)
> >            echo "ERROR: unknown state: $1"
> >            ;;
> >     esac
> 
> Hi,
> 
> sounds good to me.
> However I see a problem when recordings/timers
> are overlapping. Assume timer1 starting at t0 ending at t2
> and timer2 starting at t1 ending at t3 (t0<t1<t2<t3).
> If timer1 finishes at t2 noflushd will be started while
> timer2 is still recording (since t1 < t2).
> This could lead to the problem I already described.
> Did you observe this?
> However the script could open an SVDRP connection and
> issue a 'NEXT rel' to obtain the next timer event.
> If the value returned is less than
> zero a recording is currently in progress.
> In this case noflushd shouldn't be started.
> What do you think? Would be simple but effective change.

I'm afraid this won't work, since there are no SVDRP commands handled
while the "recording" script is active.

But you could handle a counter (stored in a file) yourself which is
incremented with every call "before", and decremented with every
call "after". If the counter becomes '1' after incrementing, you call
"/etc/init.d/noflushd stop", if it becomes '0' after decrementing you
call "/etc/init.d/noflushd start". It is guaranteed that only _one_
call to the "recording" script is made at a time.

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