[vdr] how to stop timer?
Klaus Schmidinger
Klaus.Schmidinger at cadsoft.de
Fri Jan 20 17:43:02 CET 2006
Klaus Schmidinger wrote:
> Klaus Schmidinger wrote:
>
>> Markus Hahn wrote:
>>
>>> Hi there
>>> A full or not available disk causes a endless lopp of TimerStart and
>>> EmergencyExit if a timer is active.
>>>
>>> To avoid this, I added this code to cRecordControls::Start() :
>>> menu.c:3518
>>> bool cRecordControls::Start(cTimer *Timer, bool Pause)
>>> {
>>> ChangeState();
>>> if (!VideoFileSpaceAvailable(300))
>>> {
>>> Skins.Message(mtInfo, tr("No disk space!"));
>>> if (Timer)
>>> Timer->Delete();
>>>
>>> return false;
>>> }
>>>
>>> Now the message pops up endlessly, because the timer is still
>>> aktive??? Any suggestions?
>>
>>
>>
>> Maybe a better place for this would be in the main VDR loop:
>>
>> // Start new recordings:
>> if (VideoFileSpaceAvailable(300)) {
>> cTimer *Timer = Timers.GetMatch(Now);
>> if (Timer) {
>> if (!cRecordControls::Start(Timer))
>> Timer->SetPending(true);
>> else
>> LastTimerChannel = Timer->Channel()->Number();
>> }
>> }
>> else if (/*TimeSinceLastNoDiskSpaceMessageGreaterLimit*/) {
>> Skins.Message(mtWarning, tr("No disk space!"));
>> // reset timeout limit
>> }
>
>
> After some more thinking I believe cRecordControls::Start() actually
> is the better place for this check, since it is called several times.
>
> Please try the attached patch.
Sorry, forgot the attachment...
Klaus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vdr-1.3.39-nodiskspace.diff
Type: text/x-patch
Size: 2644 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20060120/00b08ee5/vdr-1.3.39-nodiskspace.bin
More information about the vdr
mailing list