[libbluray-devel] graphics controller: return current page UO mask table
hpi1
git at videolan.org
Wed Jul 2 14:38:30 CEST 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Jul 2 15:04:25 2014 +0300| [63d66e8972b1daf80cb882fc5920f8749154b8c3] | committer: hpi1
graphics controller: return current page UO mask table
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=63d66e8972b1daf80cb882fc5920f8749154b8c3
---
src/libbluray/bdnav/uo_mask_table.h | 9 +++++++++
src/libbluray/bluray.c | 4 ++--
src/libbluray/decoders/graphics_controller.c | 9 +++++++++
src/libbluray/decoders/graphics_controller.h | 5 +++++
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/libbluray/bdnav/uo_mask_table.h b/src/libbluray/bdnav/uo_mask_table.h
index 71792d9..3eb24d9 100644
--- a/src/libbluray/bdnav/uo_mask_table.h
+++ b/src/libbluray/bdnav/uo_mask_table.h
@@ -74,4 +74,13 @@ static inline BD_UO_MASK bd_uo_mask_combine(BD_UO_MASK a, BD_UO_MASK b)
return result.mask;
}
+#define EMPTY_UO_MASK {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0}
+
+static inline BD_UO_MASK bd_empty_uo_mask(void)
+{
+ const BD_UO_MASK empty = EMPTY_UO_MASK;
+ return empty;
+}
+
+
#endif // _BD_UO_MASK_TABLE_H_
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 8b231e3..0585b83 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -490,7 +490,7 @@ static void _update_textst_timer(BLURAY *bd)
{
if (bd->st_textst.clip) {
if (bd->st0.clip_block_pos >= bd->gc_wakeup_pos) {
- GC_NAV_CMDS cmds = {-1, NULL, -1, 0, 0};
+ GC_NAV_CMDS cmds = {-1, NULL, -1, 0, 0, EMPTY_UO_MASK};
gc_run(bd->graphics_controller, GC_CTRL_PG_UPDATE, bd->gc_wakeup_time, &cmds);
@@ -787,7 +787,7 @@ static int _run_gc(BLURAY *bd, gc_ctrl_e msg, uint32_t param)
int result = -1;
if (bd && bd->graphics_controller && bd->hdmv_vm) {
- GC_NAV_CMDS cmds = {-1, NULL, -1, 0, 0};
+ GC_NAV_CMDS cmds = {-1, NULL, -1, 0, 0, EMPTY_UO_MASK};
result = gc_run(bd->graphics_controller, msg, param, &cmds);
diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index 1b98cf2..8625f3a 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -73,6 +73,7 @@ struct graphics_controller_s {
unsigned auto_action_triggered;
BOG_DATA *bog_data;
BOG_DATA *saved_bog_data;
+ BD_UO_MASK page_uo_mask;
/* page effects */
int effect_idx;
@@ -686,6 +687,7 @@ static void _select_page(GRAPHICS_CONTROLLER *gc, uint16_t page_id, int out_effe
_select_button(gc, button_id);
gc->valid_mouse_position = 0;
+ gc->page_uo_mask = bd_empty_uo_mask();
if (out_effects) {
page = _find_page(&gc->igs->ics->interactive_composition, cur_page_id);
@@ -717,6 +719,7 @@ static void _gc_reset(GRAPHICS_CONTROLLER *gc)
gc->popup_visible = 0;
gc->valid_mouse_position = 0;
+ gc->page_uo_mask = bd_empty_uo_mask();
graphics_processor_free(&gc->igp);
graphics_processor_free(&gc->pgp);
@@ -1401,6 +1404,7 @@ static int _render_page(GRAPHICS_CONTROLLER *gc,
s->ics->video_descriptor.video_height);
}
+ gc->page_uo_mask = page->uo_mask_table;
for (ii = 0; ii < page->num_bogs; ii++) {
BD_IG_BOG *bog = &page->bog[ii];
@@ -1898,6 +1902,7 @@ int gc_run(GRAPHICS_CONTROLLER *gc, gc_ctrl_e ctrl, uint32_t param, GC_NAV_CMDS
cmds->nav_cmds = NULL;
cmds->sound_id_ref = -1;
cmds->status = GC_STATUS_NONE;
+ cmds->page_uo_mask = bd_empty_uo_mask();
}
if (!gc) {
@@ -2033,6 +2038,10 @@ int gc_run(GRAPHICS_CONTROLLER *gc, gc_ctrl_e ctrl, uint32_t param, GC_NAV_CMDS
cmds->status |= GC_STATUS_MENU_OPEN;
}
}
+
+ if (gc->ig_open && !gc->out_effects) {
+ cmds->page_uo_mask = gc->page_uo_mask;
+ }
}
bd_mutex_unlock(&gc->mutex);
diff --git a/src/libbluray/decoders/graphics_controller.h b/src/libbluray/decoders/graphics_controller.h
index 563de2c..2a650e4 100644
--- a/src/libbluray/decoders/graphics_controller.h
+++ b/src/libbluray/decoders/graphics_controller.h
@@ -22,6 +22,8 @@
#include "util/attributes.h"
+#include "libbluray/bdnav/uo_mask_table.h"
+
#include <stdint.h>
/*
@@ -85,6 +87,9 @@ typedef struct {
/* */
uint32_t wakeup_time;
+
+ BD_UO_MASK page_uo_mask;
+
} GC_NAV_CMDS;
/*
More information about the libbluray-devel
mailing list