Commit 8d1398c1 authored by hpi1's avatar 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.
parent 4750d4f5
......@@ -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;
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment