[mythtv-users] How to convince mythtv that firewire has failed?
spuppet at comcast.net
Sat Feb 28 21:36:50 UTC 2009
> I don't have a solution for you; but I seem to get these kinds of
> messages in my logs too; but the recording seems to playback okay.
> When I do get recordings that fail, I notice the recording filesize is
> 0 bytes. It's pretty simple to write up a cron-script to detect this.
> But I don't know how to tell mythbackend that the recording has
> failed and to attempt a re-record at a later time (via code).
My issue with the messages is that Myth has run into an error condition with the FireWire device (for whatever reason) and isn't able to recognize that it's not getting better. If it were able to do that, it would be able to report that the recording failed, and automatcially reschedule the recording for another try. I know that the next try might have the same results, but at least it wouldn't fill my log file at the rate of 8MB/hour.
In looking at the code today, it appears that the handling of the firewire port is in a newly created thread from the rest of the recording logic. In that thread, the logic seems to simply spin on keeping the port connected, but this doesn't have any way to report back to the thread that created it. I was thinking I could just put in a simple counter of iterations and have it return an error condition, but it's not as easy as I thought.
I did find some references to Steve Adeff's 6200changer.sh script (http://www.mythtv.org/wiki/User:Steveadeff#6200changer.sh) which may be a workaround. This simply makes sure that the connection is established before Myth starts recording, and therefore doesn't need to figure out that there's an error.
I'm going to keep poking at the code to see if I can learn more about how the firewire recording logic works to see if I can plug into there some logic to sense that something's wrong.
More information about the mythtv-users