Markus Hahn wrote:
Am Donnerstag, 19. Januar 2006 18:04 schrieb Klaus Schmidinger:
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 }
BTW: brutally deleting that timer is probably not a good idea. This could be a repeating timer, or disk space could become available later. Also, the cRecordControls::Start() function is called from a loop through all timers, so if you delete it, strange things might happen ;-)
Yes, I agree but looping through all timers objects, and t->SetFlags(tfNone); ( for prove of concept ;) dosen`t have any effect at all!?
Well, that might work, since you disable the timer. But that would disable them for good, and would lose the VPS bit and everything else.
But thanks for the code. I will try this right now.
I guess I'll also implement this in the next version - if the disk is full there is actually no point in starting a recording. Thanks for the suggestion.
Klaus