[mythtv-commits] mythtv commits

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Fri Feb 27 15:40:03 EST 2004

Changes committed by gigem on Fri Feb 27 20:38:03 2004

Modified Files:
   in mythtv/libs/libmyth:
   in mythtv/libs/libmythtv:
        guidegrid.cpp progfind.cpp progfind.h proglist.cpp proglist.h 
        programinfo.cpp programinfo.h remoteutil.cpp remoteutil.h 
        scheduledrecording.cpp videosource.h 
   in mythtv/programs/mythbackend:
        autoexpire.cpp main.cpp mainserver.cpp mainserver.h 
        scheduler.cpp scheduler.h 
   in mythtv/programs/mythfrontend:
        globalsettings.cpp programrecpriority.cpp viewscheduled.cpp 
Log Message:
The major part of the scheduler overhaul.  The following is from an
email describing the high-level changes.

Scheduling is always done using recording priorities.  All programs
are scanned one at a time, starting with the highest priority, and are
scheduled in the best available time/card slot remaining.  Some
heuristics are done to break ties in priority.  See comp_priority for
the details since most of the magic occurs in how the programs are

There is a cofiguration option to allow the scheduler to move a higher
priority program to another time/card slot if it would allow a lower
priority program to be scheduled when it otherwise wouldn't be.  The
option can be set on the TV Settings/Recording Priorities/General
setup screen.  It is off by default.

To help make it easier when conflicts need to be resolved manually, a
program can be quickly given a recording priority boost by setting a
record override for it to do record.  This will be replaced with a
better, more flexible solution when record overrides are enhanced

Card inputs can be given a preference value which is added to the
recording priority of programs.  This can be used to make the
scheduler favor some inputs over others.  The input preferences can be
set on the Card Input screen in the setup program.

The scheduler considers channels with the same callsign to be the same
channel.  For example, if a program is originally scheduled on chanid
1003 but chanids 1003, 2003 and 2123 all have the same callsign of
KVBC, the scheduler will try to use the best time/card slot from any
of the 3 channels.  If a channel does not have a callsign, the
scheduler will consider it unique.

There is a known bug concerning the callsign matching and record
overrides when used on systems with multiple video sources.  The
problem is the override only applies to the chanid.  This will be
fixed soon.

The Program Guide, Program Lister and Program Finder automatically
merge channels with the same channum and callsign when displaying
them.  They also show the correct status for the program no matter
what the channum is.

The scheduler partially supports card inputs that can be shared, such
as those on DVB cards.

Programs which can't be scheduled because of higher priority programs
are marked as Conflicting and are highlighted in the appropriate
places to draw attention to them.

Programs which will be recorded at another time are marked as either
Earlier Showing or Later Showing.  Later Showing means a program could
not be scheduled earlier because of higher priority programs or was
moved to allow a lower priority program to be scheduled.  Programs
marked as Later Showing are always shown on the View Scheduled screen
in case they need manual adjusting.

If a program is marked as Conflicting or Later Showing, the programs
that will be recorded instead are listed on the Overrides screen for
that program.

If a program has a record override set, either do or don't record, it
can be cleared on the Overrides screen for that program.  This makes
it easy to try What Ifs when resolving conflicts manually.

The scheduler sends a SCHEDULE_CHANGE event when it changes the status
of any pending recording so the front ends get notified immediately.

These changes temporarily break mythweb due to some RecStatusType

In order to keep the new scheduler logic as clear as possible, I
haven't done much to optimize the algorithms yet.  I know what to do
but will wait until later to do it.


More information about the mythtv-commits mailing list