[libbluray-devel] Fix for wrong title index used in some BDs

tourettes tourettes tourettesmp at gmail.com
Fri Mar 18 08:18:27 CET 2011


On Thu, Mar 17, 2011 at 5:13 PM, Petri Hintukainen
<phintuka at users.sourceforge.net> wrote:
>
> tourettes wrote:
> > Hi,
> >
> > Some BDs have .mpls file indices that aren't continuos. For example one
> > BD has 00001, 00002, 00003, 00004, 00006 & 00007 .mpls (00005 is missing).
> >
> > Current implementation is using the atoi to convert the filename
> > directly into the title index
>
> No, not to title index but playlist ID. Using that as title index would
> be a bug. Note that title_idx (title index) is index to internal array
> of titles, playlist ID is the number in playlist file name.

I already had some doubt when creating the patch that it would be
broken by design.
It is always better to find to bug in application than library side code.

> > where as the proposed patch is using
> > bd->title_idx. I have tested this patch with approx 20 BDs and it seems
> > to work fine. Now BD_EVENT_PLAYLIST's parameter is providing the correct
> > title index and it can be used to query the currently active title
> > information.
>
> BD_EVENT_PLAYLIST reports current playlist ID, not title index. Also
> PSR_PLAYLIST must contain playlist ID, on-disc applications (HDMV/BD-J
> titles / popup menus) except it.
>
> With BD_EVENT_PLAYLIST you can use bd_get_playlist_info() instead of
> bd_get_title_info(). Those provide the same information. Maybe API
> documentation of those functions could be clarified ?

I think I have completely missed that bd_get_playlist_info() even when
it is next to the
bd_get_title_info() in the header :) Not sure if I can blame the API
documentation, only
more likely myself.

I guess I got mixed up a bit when XINE plugin is using the
bd_get_current_title() in
the BD_EVENT_PLAYLIST to get the current title. I tried the same, but
the results
weren't that good. In following use case the bd_get_current_title()
returns almost on
every BD a wrong title index.

1) start main movie from BD menu
2) go back to BD menu by calling bd_menu_call()
3) start main movie again from BD menu

Cannot test with XINE if it has the same issue since I have no
platform where it would run -
only Windows available for testing.

Should the player applications use bd_get_title_info() instead of the
bd_get_playlist_info()
to make sure that seamless branching BDs are working ok? Getting
correct duration won't
most likely work with the bd_get_playlist_info() since they have
multiple .mpls files per
movie? If yes then bd_get_current_title() might have a bug since it
returns the incorrect title
index when the main movie is started for the 2nd time.

Unfortunately I have no seamless BDs to test with.

> I don't belive BD_EVENT_TITLE_IDX would be very useful, it would be
> generated only when application selects title with bd_select_title(bd,
> title_idx) - already knowing the title_idx.

Cannot HDVM / BD-J change the title? If not then the event would be
indeed quite useless.


More information about the libbluray-devel mailing list