[mythtv-users] Bugs, recording stops, frontend confused

James Armstrong james at thearmstrongs.org
Thu Sep 23 12:58:15 EDT 2004

I have uncovered a few bugs related to hdtv recording and possibly 
overtheair recording (if it uses signal strength). The first one causes 
the frontend to lockup when switching to Live Tv or changing a channel 
in Live Tv and the channel does not have enough signal strength to 
record (according to db settings). Here is what I found but don't know 
enough of the communications between the frontend and backend to fix it:

The frontend tell the backend to start recording a channel so it can 
start streaming for Live Tv. The backend state changes from None to 
Recording. It then checks the signal strength and if it is not high 
enough it will stop recording and change from Recording to None. This is 
all fine but the problem in with the frontend. The frontend waits in a 
endless loop for the backend to start recording which never happens. I 
have tracked it down to the following code in tv_play.cpp:

void TV::StartPlayerAndRecorder(bool startPlayer, bool startRecorder)
    if (startRecorder)
        while (!recorder->IsRecording())       <-------Test / Loop 
forever until backend starts recording

        frameRate = recorder->GetFrameRate();

    if (startPlayer)


We could just add a timeout but it might be better to check (if 
possible) if the backend changed states back to None.

The next problem is related / similar to the first. If a scheduled 
recording starts but is aborted due to low signal strength, the frontend 
(and mythweb) still shows it as recording. I cannot stop, or start the 
recording again (once the antenna was moved) no matter what I try on the 
frontend without restarting the backend (a restart actually starts to 
record the show again). I had three shows recording and did not want to 
restart the backend. I can usually click Stop Recording, then Reactive 
it to get it to start recording again, but in this case, the frontend 
always thinks the backend is recording the show even though the backend 
has stopped and changed from Recording to None. Log from Backend:

2004-09-22 20:00:03 Changing from None to RecordingOnly
2004-09-22 20:00:03 scheduler: Schedule Change
2004-09-22 20:00:03 Started recording "Lost" on channel: 3004 on cardid: 
3, sourceid 3
2004-09-22 20:00:06 Maximum signal strength detected: 64% after 5500 
msec wait
2004-09-22 20:00:06 Changing from None to RecordingOnly
   Sending 14 bytes of data to localhost port 8084, 2004-09-22  (channel 
change script)
20:00:09 Maximum signal strength detected: 64% after 5500 msec wait
2004-09-22 20:00:09 Signal level too low?
2004-09-22 20:00:09 Tuning Error -- aborting recording
2004-09-22 20:00:09 Finished recording Lost on channel: 3004
2004-09-22 20:00:09 scheduler: Last message repeated 1 times
2004-09-22 20:00:09 scheduler: Finished recording

- James

More information about the mythtv-users mailing list