Navigate DVD Menu Buttons by Number?
#1
longer background on my intent below, short story is that i'd like to get dvd menu navigation by button number working in xbmc so that i can press number+enter on my remote to navigate dvd menus.

the current behavior seems to be full-screen video default of jumping to a specific time in the video when number are pressed (although i'm not sure that currently works right on dvds, didn't play around much with any "normal" dvds to find out).

i seem to have the basics working, but as a disclaimer i haven't worked on xbmc code before and i'm not a c++ developer. i don't know if there are global implications to these changes, a better way to integrate them, etc. i also haven't looked into the xbmc configuration systems on how to make the option configurable.

i would appreciate advice from any xbmc devs on whether this feature is viable for xbmc (was it specifically left out for a reason?), the best approach for integrating it, etc.

in dvdplayer.cpp, i motified "cdvdplayer::onaction". inside the following conditional switch block:

Quote:    if (pstream->isinmenu())
   {
     switch (action.wid)

i added:

Quote:      case remote_0:
     case remote_1:
     case remote_2:
     case remote_3:
     case remote_4:
     case remote_5:
     case remote_6:
     case remote_7:
     case remote_8:
     case remote_9:
       {
          // offset from key codes back to button number
          int button = action.wid - remote_0;
          clog::Debug Log(" %d button press", button);
          pstream->selectbutton(button);
       }
       break;

this overrides the default behavior, but provides no way to access the original behavior. i'm not sure if that's a problem within a dvd menu or not. since cdvdinputstreamnavigator, libnavdvd, etc already implement the selectbutton logic, the change was very simple.

any feedback on making this feature standard in xbmc?

thanks,
jeff

background:

i'm trying to use the fisher price "read with me dvd" product with my xbox. the device is a kid-friendly programmable "remote" that learns codes from a dvd remote then maps them to graphical buttons designed to work with special dvds.

    amazon.com "read with me dvd" product page

the device works by learning dvd remote keys 0-9, enter, fwd, back, etc. the special keys on the device are mapped to number+enter and interact with dvd menus on the special dvds. to my surprise the device does not work correctly with the ms dvd dongle. apparently the dongle doesn't support menu navigation by button number (i'm using the mce dongle+remote haven't tried the dvd-only remote).

since my xbox is my only dvd player and xbmc is open-source i decided i would try to make the product work with xbmc. it will make my kid happy and gave me a great excuse to dabble in xbmc coding too Smile
Reply
#2
that looks like fine.. default behavior doesn't matter matter in this case as seeking isn't possible in menus anyway. will commit in a second

<edit>commited</edit>



Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
thanks!

next challenge, the dvds require forward and back skip to work in a menu. from "dvdinputstreamnavigator.cpp", i can see where this is currently prohibited:

Quote:// we don't allow skipping in menu's cause it will remove menu overlays
void cdvdinputstreamnavigator::onnext()
{
 if (m_dvdnav && !isinmenu())
 {
   dvdnav_next_pg_search(m_dvdnav);
 }
}

i've looked at the processblock and ondvdnavresult logic dealing with dvdnav_nav_packet and dvdnav_hop_packet but haven't digested the details of dvdoverlaycontainer yet.

since my dvd clearly expects skipping to be allowed in menus, i'm assuming that the comment in the code above is referring to some issue with how xbmc is handling menu overlays?

i'm going to keep pursuing this, but thought i'd check and see if any hints from the developers familiar with the current behavior might speed things up...

-jeff
Reply
#4
Sad 
(elupus @ jan. 19 2006,14:00 Wrote:that looks like fine.. default behavior doesn't matter matter in this case as seeking isn't possible in menus anyway. will commit in a second

<edit>commited</edit>
this feature is only implemented under dvd menu/navigation right (and not during playback of the movie/vob)?, so the jumping to a specific time in the video feature can still be implemented there? Huh
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Exclamation 
(jdoering @ jan. 20 2006,09:02 Wrote:since my dvd clearly expects skipping to be allowed in menus, i'm assuming that the comment in the code above is referring to some issue with how xbmc is handling menu overlays?

i'm going to keep pursuing this, but thought i'd check and see if any hints from the developers familiar with the current behavior might speed things up.
i'm not a developer/programmer myself but may i suggest to check out if and how ogle (and their source code) handle it?
for other dvd development resources (such as specs, docs, source code, etc.) check out this dvdplayer-core thread (link)

ps! since you're into dvd-video bases games, i got a bunch that don't work (well) in xbmc, could i snail-mail them to you?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Quote:since my dvd clearly expects skipping to be allowed in menus, i'm assuming that the comment in the code above is referring to some issue with how xbmc is handling menu overlays?
that has been the issue for some time yes. when doing a skip, the dvdplayer would delete all overlays so that the menu overlay dissapeared in most movies. however, that should not be the case anymore, but i don't know this for sure atm.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
gamester, assuming that isinmenu() behaves as implied the new logic for handling remote number presses won't affect seeking during playback. if i have success sorting this problem out, i would be willing to take a peek at other dvd-video games to see if the problems are similiar...

i'll take a look at some of the references (other dvd player source, etc). one thing i'm not clear on is the problem of skipping and losing menu overlays. i've only looked at my particular example disk on this so far... i should try a normal movie, but wouldn't you expect to loose the menu overlay if you skip past the menu? darkie, can you describe the flow where this causes problems?

i'll play with some "real" dvds and see if i can make sense of the issue.
Reply
#8
i tried the skipping in menu's and they work for the most part on retail dvd's, however i did end up in messed up locations on ripped dvd's (ie all black screens from time to time). i assume this is caused by deleted features.

overlays do stay on screen now, so that shouldn't be a problem.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Navigate DVD Menu Buttons by Number?0