Before I commit this patch I think we should add some sound logic on how to deal with back to back recordings. I think it makes sense to not overrun the first and not underrun the second, but how to we make this work?
Well, we must do this calculation when a program is going to start recording, otherwise bad things will happen when we do things like schedule or remove scheduled recordings near show's start/stop times.
When a program is going to start recording (based on record padding, say 1 minute early) it should check if something is recording already / in the timeslot beforehand. If nothing is recording it should start recording. If something IS recording then it should ignore the pre-record padding of the next recording and also ignore the post-record padding of the current recording.
In order to do this recordserver will need to:
1) Delay the recording of the next recording by the record padding value.
2) Be able to stop the current recording early enough to cleanup and start recording the next show on time.
So, one thing we definately need is a working Stop() method on all recording plugins. The ivtv recording plugin has this already but I am not sure about the generic_record plugin. At line 171:
while self.mode == 'record' and self.app.isAlive():
time.sleep(0.5)
This should catch the mode change by calling Stop(). Someone should test this, hopefully it will work for regular VCR_CMD (direct mencoder use) or a VCR_CMD that is a shell script which starts other processes.
Stop() of generic_record.py could be tested by using the latest cvs snapshot and removing an in progress recording. It should stop recording. Do a ps or top to make sure.
We should also (if not already available) add a method to each recording plugin to query its state, if recording or idle, because this could be used to see if something is recording.
How does this sound?
-Rob
Eirik Meland wrote:
This patch makes it possible to pad scheduled recordings with x minutes before and after to make sure you don't miss anything of the show
(only tried on ivtv_record.py)
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
