Permalink
Browse files

Refactor timing/sleep handling in the scheduler.

The first main change is to use HandleRecordiing() and HandleTuning()
to set the sleep time.  The previous code used mostly duplicate code
in CalcTimeToNextHandleRecordingEvent().  That meant there were two
places that needed to be checked/kept in sync when analyzing/fixing
timing issues.

The next main change is to sleep as long as possible.  The previous
code would never sleep for longer than 60 seconds, even if it had
nothing to do.

The last main change is to be more persistent in tyring to apply long
preroll when the tuner is initially busy.  The previous code didn't
specifically try to do this and it was hit and miss whether or not
preroll was used in these situations.

The rest is various stylistic changes.

Fixes #11108
  • Loading branch information...
gigem committed Jun 4, 2013
1 parent f455e49 commit a2eb931221b0d1fac76da884e779e1120b8a2b81
Showing with 151 additions and 185 deletions.
  1. +146 −176 mythtv/programs/mythbackend/scheduler.cpp
  2. +5 −9 mythtv/programs/mythbackend/scheduler.h
Oops, something went wrong.

0 comments on commit a2eb931

Please sign in to comment.