[libbluray-devel] Issue With HDVM Suspend / Resume Handling
tourettes
tourettesmp at gmail.com
Mon Mar 28 22:01:49 CEST 2011
Hi,
I think I have found an issue with the way how HDVM suspend and resume
are handled. We will end up in lost events on the library user side at
least in
the following use case:
1) BD is started in navigation mode
2) Main movie is selected in the main menu
3) User goes back into the main menu (with bd_menu_call())
4) User starts again the main movie from main menu
Here's what happens in the bluray.c & register.c
* Menu is entered for the 2nd time (with bd_menu_call() from the main movie)
- registers gets saved
- bd->title_idx will point to the menu related index
* Start main movie 2nd time -> restore state -> register restoring sets
correct playlist ID
- bd->title_idx will point to the menu related title
- an event about playlist change is generated (at this point
application queries the
bd->title_idx, which results wrong title index)
* run_hdvm() triggers bd_select_playlist()
- bd->title_idx will get correct title index (main movie)
- an event about the playlist change won't get triggered since
registers are already up to date
How to fix that?
- Restore bd->title_idx (and other content as well?) when registers
are restored
- Remove "if (p->psr[reg] == val)" check in bd_psr_setting_write()
and leave it up to libbrary
user to filter out the possible duplicate events
- Poll on client side for possible bd->title_idx changes
None of the fixes seem good ones (at least the polling one is really bad).
More information about the libbluray-devel
mailing list