[mythtv] [mythtv-commits] mythtv commit: r8577 by danielk
Chris Pinkham
cpinkham at bc2va.org
Thu Jan 12 16:18:02 UTC 2006
> Chris, I believe this is how it has always worked, overrecord is applied
> unconditionally to the recording. Then the overrecord time is overridden
> by StartRecording() when the scheduler wants to record something. This
> allows the overrecord to work in the presence of rescheduled or canceled
> follow-on recordings, without needing to update the end time. Updating
> the end time wasn't a feature when overrecord was first added...
Overrecord (aka postroll) is supposed to always be optional and are applied
in the recorder. The per-recording start-early and end-late settings are
unconditional since they are applied on the scheduler's end.
Look at how 0.18 did overrecord. Overrecord/postroll has been in Myth
for years. Here's the part of the code from 0.18 that handled the
transition from normal recording to overrecord:
if (StateIsRecording(internalState))
{
if (QDateTime::currentDateTime() > recordEndTime || finishRecording)
{
if (!inoverrecord && overrecordseconds > 0)
{
recordEndTime = recordEndTime.addSecs(overrecordseconds);
inoverrecord = true;
VERBOSE(VB_RECORD, QString("switching to overrecord for "
"%1 more seconds")
.arg(overrecordseconds));
}
else
{
nextState = RemoveRecording(internalState);
changeState = true;
}
finishRecording = false;
}
}
So, recordEndTime is originally set to the real endtime of the
recording, then if we got to the end, we'd switch to overrecord if
overrecordseconds > 0. Inside of TVRec::StartRecording() there was
this code:
if (inoverrecord)
{
nextState = kState_None;
changeState = true;
while (changeState)
usleep(50);
}
That would stop us from recording overrecord and start the new
recording.
--
Chris
More information about the mythtv-dev
mailing list