When there aren't enough tuners at record time...

Moderators: Gully, peteru

Post Reply
prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

When there aren't enough tuners at record time...

Post by prl » Mon Apr 15, 2019 12:46

When a new recording timer is created, the timer is checked for tuner allocation conflicts with existing timers.

Normally, that's enough to ensure that when that timer is due to run, there is a tuner available (including the live TV one, if necessary, and allowed) for the recording to be made.

However, if something has changed that means that there aren't enough tuners when the timer is due to start (e.g. the T2's USB timer has since been misidentified as a cable tuner, or the user has disabled one or more tuners), the recording startup fails, and the timer is backed off in steps until there is a tuner available. There is no indication given to the user other than "'prepare' failed" and "backoff" errors in the timer log (and in the debug log).

There is also an opportunity to notify the user of a problem at GUI startup time when the timers.xml file is read, though that won't help for unattended startups for recording (e.g. startup from shutdown to make a recording).

There is actually code in to handle that possibility in RecordTimer.loadTimer(), but there are (at least) two problems with it.

The first is that it can't be accessed, because loadTimer() calls RecordTimerEntry.record() with ignoreTSC as True (TSC = timer sanity check), so record() enters the conflicting timer in the timer list and doesn't display a "Timer overlap in timers.xml detected! / Please recheck it!" popup.

The second is that if ignoreTSC were set to False, the popup would be displayed, but the conflicting timer wouldn't be placed in the timer list, so the timer would be lost completely, instead of only recording part of the recording, and user wouldn't have an opportunity to fix the problem.

Possible fixes would be to display the popup (and perhaps with more information, like the list of conflicting timers) but still add the conflicting timer, or to do that, but also mark the new conflicting timer as disabled.

Replication steps

At a timer when no other recordings are due to be made...

Enable debug logging if not already enabled.

Create two short timers on different broadcasters that partially overlap (e.g. two 5-minure timers that overlap by 3 minutes) and set to start in a short time, say in 10 minutes time. Then in MENU>Setup>Tuners>Tuner configuration, set all but one tuner's Configuration mode to "not connected".

Then do a GUI restart to re-read timers.xml. The second of the two timers will write a "[RecordTimer] ignore timer conflict" to the debug log, but will still be scheduled.

When the timers run, the first timer will record normally, but the second one will have a series of "'prepare' failed" and "backoff" messages in its log (and in the debug log) and then eventually will start recording after the first timer completes.

Then re-enable all the disabled tuners and reboot.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Post Reply

Return to “Developers Community”