[mythtv] Re: [mythtv-commits] Re: Ticket #821: autoexpire doesn't

Geoffrey Hausheer mythtv0368 at phracturedblue.com
Sat Dec 31 01:05:49 EST 2005

> I think that a "mythbackend -v record" log captured during the time when
> you're surfing LiveTV will be enough to see where the code is falling
> through and not updating the endtime properly as it should.  We want to
> see the whole process, as it starts the recorder up, changes channel(s),
> and tears it down.  Attach the log to the ticket and if Daniel doesn't find
> it first I'll take a look.
Well, rather than take the easy way out, I decided to try my hand at
fixing it.  Here's what I got:
Calling TVRec::SetChannel() doesn't result in FinishedRecording()
getting called.
The flags at the start of the HandleTuning call are:

and after the TuningShutdowns call they are still:

This seems to be because the 'flags' sent from SetChannel to
HandleTuning is only 'LiveTV'
which means that this check in TuningShutdowns returns false:
    if ((request.flags & kFlagNoRec))

So I think this line in TVRec::SetChannel() is suspect:
requestType = lastTuningRequest.flags & (kFlagRec | kFlagNoRec);

There hasn't been a call to HandleTuning since LiveTV was started.
Perhaps there should have been a call to stop the recorder before SetChannel?

Or perhaps this check in TuningShutdowns
if (HasFlags(kFlagRecorderRunning))
should not be gated by
    if ((request.flags & kFlagNoRec))

At this point I don't know what is intended, so I can't go any
further.  If this isn't enough info, let me know, and I guess I'll
just send the full logs.  I thought I'd take a crack at tracking it
down myself fist though.

More information about the mythtv-dev mailing list