libbluray | branch: master | hpi1 <[email protected]> | Wed May 4 14:27:29 2011 +0300| [8d1398c1a6c86aebb78a1dafd319f5fa6f3df4b4] | committer: hpi1
Combine current playlist and clip UO mask tables to BD_STREAM. Allow menu call and title search UOs only when permitted in stream UO mask table. > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=8d1398c1a6c86aebb78a1dafd319f5fa6f3df4b4 --- src/libbluray/bdnav/uo_mask_table.h | 2 +- src/libbluray/bluray.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/src/libbluray/bdnav/uo_mask_table.h b/src/libbluray/bdnav/uo_mask_table.h index 2b642ae..b5dceef 100644 --- a/src/libbluray/bdnav/uo_mask_table.h +++ b/src/libbluray/bdnav/uo_mask_table.h @@ -67,7 +67,7 @@ static inline BD_UO_MASK bd_uo_mask_combine(BD_UO_MASK a, BD_UO_MASK b) unsigned i; for (i = 0; i < sizeof(BD_UO_MASK); i++) { - po[i] = pa[i] & pb[i]; + po[i] = pa[i] | pb[i]; } return o; diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c index 6363137..81d8335 100644 --- a/src/libbluray/bluray.c +++ b/src/libbluray/bluray.c @@ -78,6 +78,8 @@ typedef struct { /* current aligned unit */ uint16_t int_buf_off; + BD_UO_MASK uo_mask; + } BD_STREAM; typedef struct { @@ -295,6 +297,9 @@ static void _close_m2ts(BD_STREAM *st) file_close(st->fp); st->fp = NULL; } + + /* reset UO mask */ + memset(&st->uo_mask, 0, sizeof(st->uo_mask)); } static int _open_m2ts(BLURAY *bd, BD_STREAM *st) @@ -328,6 +333,10 @@ static int _open_m2ts(BLURAY *bd, BD_STREAM *st) } if (st == &bd->st0) { + MPLS_PL *pl = st->clip->title->pl; + st->uo_mask = bd_uo_mask_combine(pl->app_info.uo_mask, + pl->play_item[st->clip->ref].uo_mask); + _update_clip_psrs(bd, st->clip); } @@ -1912,6 +1921,11 @@ int bd_play_title(BLURAY *bd, unsigned title) return 0; } + if (bd->st0.uo_mask.title_search) { + BD_DEBUG(DBG_BLURAY|DBG_CRIT, "title search masked by stream\n"); + return 0; + } + if (bd->title_type == title_hdmv) { if (hdmv_vm_get_uo_mask(bd->hdmv_vm) & HDMV_TITLE_SEARCH_MASK) { BD_DEBUG(DBG_BLURAY|DBG_CRIT, "title search masked by movie object\n"); @@ -1933,6 +1947,11 @@ int bd_menu_call(BLURAY *bd, int64_t pts) return 0; } + if (bd->st0.uo_mask.menu_call) { + BD_DEBUG(DBG_BLURAY|DBG_CRIT, "menu call masked by stream\n"); + return 0; + } + if (bd->title_type == title_hdmv) { if (hdmv_vm_get_uo_mask(bd->hdmv_vm) & HDMV_MENU_CALL_MASK) { BD_DEBUG(DBG_BLURAY|DBG_CRIT, "menu call masked by movie object\n"); _______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
