[mythtv] Jumping 10 minutes in a DVD

Michael T. Dean mtdean at thirdcontact.com
Tue Oct 5 05:04:42 UTC 2010

  On 10/04/2010 11:03 PM, Jim Stichnoth wrote:
> If I want to jump forward 10 minutes in a recording, there are
> JUMPFFWD and CHANNELDOWN keybindings that allow this.  However, if I'm
> watching a DVD or an ISO or some other video that contains chapters,
> both of these keybindings jump forward one chapter, and there is no
> way to jump forward by ctx->jumptime minutes.  It seems reasonable for
> one of these keybindings to ignore chapters and unconditionally jump
> 10 minutes.  Was there a reason for the current behavior, or would a
> patch be taken seriously?  (I suppose the patch would need to
> introduce a new keybinding to avoid messing with people who like the
> current behavior.)

These are the issues of the keybindings overloading that happens in the 
code--i.e. where we hard-code one or more unrelated actions 
(JUMPFFWD/CHANNELDOWN) to be used for some alternate purpose 
(NEXTCHAPTER) in some situation or some sub(DVD)-context(playback).  
TTBOMK, most (if not all) of these were introduced to allow the users of 
the 5-button remotes to still use MythTV, even with their 
(*cough*inappropriate) choice of remote.***

My plan is to eventually unroll all these overloads and ensure each 
separate action in MythTV is given a separate, descriptive keybindings 
action.  Unfortunately, I haven't figured out the details of how to do 
it elegantly.  It will probably involve some combination of sub-contexts 
(that inherit from parent contexts) and the ability to assign 
keybindings to keybindings (rather than just keys to keybindings--to 
reuse key list definitions from other contexts).  (And, because of the 
complexity this will introduce, usability will also be reliant on my 
plan to add keybindings "themes"/pre-sets.)  A more-concrete plan (or 
complete solution, with patch :), would be greatly appreciated.  :)

In the interim, whether you can change JUMPFFWD or CHANNELDOWN's 
overloading in DVD playback is between you and the 5-button mouse 
users.  :)  (Just remember to account for the MythTV factor when 
calculating the force required to overcome inertia/friction.)

However, a new keybinding that's just a "how do you want to handle 
JUMPFFWD"/JUMPFFWD-always-does-10-min-jump-even-in-DVD "setting" 
wouldn't be my desired approach.  I think JUMPFFWD should always be 
JUMPFFWD (in TV or DVD or ... playback) and there should be a 
NEXTCHAPTER binding.  To make that useful, we need a way to allow a user 
to use the same key list for JUMPFFWD and NEXTCHAPTER, but such that we 
do the right thing in the right "sub-context" (i.e. in DVD playback, we 
prefer the NEXTCHAPTER functionality so that we skip chapters if both 
actions use the same key list).

And, that way, since recordings and non-DVD videos may eventually 
support chapters, that would allow users who want a NEXTCHAPTER and 
JUMPFFWD for all of those videos to use a different key list for the 2 
actions.  Or, by mapping only JUMPFFWD or only NEXTCHAPTER, they get 
only the 10-min jump or the skip chapter functionality, respectively.  
So, we want all actions to be separately defined in keybindings and the 
code, and we don't want new keybindings that present "overloaded" actions.

Basically, if we hard-code one action to mean multiple functions (in 
different situations), the user can't decide.  If each function gets its 
own action, users can decide.  However, we don't want a key bindings 
explosion caused by "combined"/overloaded actions to account for every 
combination of functions--we need the keybindings code to handle 
user-defined overloads (and get all those overloads out of the code).

So, in my ideal keybindings world:
JUMPFFWD is an action that jumps playgroup.jump min forward
CHANNELDOWN is an action that changes channel to the 
one-lower-than-current channel
NEXTCHAPTER is an action that jumps to the next chapter
and they only do the above, and there are no keybindings that do 
something different from what they claim to do, and there are no 
"mix-in" keybindings the do different/unrelated things in different 

(Sorry, I know that's a long reply, and probably not very clear, but 
it's the best I can do at 1:00 am.)


***OK, a few may have been introduced by Yeechang Lee, who actually 
"studied" the key bindings we had and the overrides we had--in the sense 
of taking the time to set up his keybindings very carefully and 
efficiently--and realized that some were less than ideal, so he 
submitted patches to improve them, but within the confines of the 
existing framework, which relied on overloading.

More information about the mythtv-dev mailing list