[mythtv] Improving playback groups
stichnot at gmail.com
Tue Feb 9 03:42:13 UTC 2010
It would be nice if many more settings could be overridden by a
Playback Group, such as fill mode, captions, playback profile, aspect
ratio, OSD properties, audio options, etc. For example, all of my
children's recordings should play without captions and should exit
playback at the end without prompting (in contrast to recordings for
grownups). Some subset of these should play with an Adjust Fill mode
of Full. Certain programs on certain channels should use an Adjust
Fill mode of Half.
Let's say, just hypothetically :) , that I wanted to tackle this. It
could be a somewhat large and invasive set of changes, so I would want
to be sure that I have the right approach and haven't overlooked
anything important. Here are some ideas.
1. I would organize the playback group settings hierarchically with
single inheritance. Each playback group inherits from a parent
playback group. The root (Default) playback group inherits from the
global or host-specific settings. Playback groups themselves are
global, i.e. shared across frontends, except to the extent that they
inherit from host-specific settings.
2. Each setting in a playback group is either a specific value or
inherits from its parent.
3. In the Settings UI, each setting would have an additional checkbox
to say whether it has a specific value or inherits from its parent.
The label for this checkbox would include the parent's current value
so you know what you're likely to inherit. If the checkbox is set to
Inherit, the override setting disappears or is grayed out.
4. The DB gets a new table, playgroupsettings, which is similar to the
existing settings table, except that there is a playgroupname column
instead of a hostname column, and there is a boolean column indicating
Inherit versus Override. To define the inheritance tree structure,
playgroupsettings has a row for each playback group where
value='playgroupparent'. The existing playgroup table gets deprecated
or removed, and its values are migrated into playgroupsettings.
5. Suppose playback group A is the parent of B, and B is the parent of
C. If B is deleted, C's parent becomes A. If B is renamed, C's
parent value is updated to B's new name. Consistency checks ensure
that parents exist and don't lead to a cycle.
6. Mythvideo playback would use the root (Default) playback group.
When mythvideo becomes unified with recordings, videos could also have
non-Default playback groups.
7. A lot of this work would be in the Settings UI. I counted about 75
host-specific settings that would be suitable for playback groups,
plus the 5 existing playback group settings. Are there plans to
overhaul the settings UI, like converting it to MythUI? If not, a lot
of the existing code should be reusable, but at a high level, it would
probably be a ~10 page dialog to fully configure a playback group.
8. Some more work in the playback code to make sure the playback group
name is available wherever corresponding entries from the settings
table are currently needed.
9. I would also use this to solve the problem of painstakingly
configuring a new frontend. Put all the common settings in the
Default playback group, and allow the Default playback group to
inherit only the host-specific settings.
What do people think? Is this a reasonable approach? Would there be
any real interest in putting something like this into 0.24? If not, I
would probably just implement it locally for the handful of settings I
care about and skip the entire Settings UI portion.
More information about the mythtv-dev