[libbluray-devel] Properly open menu overlay. Signal overlay size to application.
hpi1
git at videolan.org
Sun Dec 11 15:25:48 CET 2011
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Dec 11 16:21:55 2011 +0200| [906377fefe7d7c184101da5fcbf9db299f98cfeb] | committer: hpi1
Properly open menu overlay. Signal overlay size to application.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=906377fefe7d7c184101da5fcbf9db299f98cfeb
---
src/libbluray/decoders/graphics_controller.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index a68a742..f07d5f3 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -58,8 +58,10 @@ struct graphics_controller_s {
void (*overlay_proc)(void *, const struct bd_overlay_s * const);
/* state */
+ unsigned ig_open;
unsigned ig_drawn;
unsigned ig_dirty;
+ unsigned pg_open;
unsigned pg_drawn;
unsigned pg_dirty;
unsigned popup_visible;
@@ -372,6 +374,12 @@ static void _open_osd(GRAPHICS_CONTROLLER *gc, int plane,
};
gc->overlay_proc(gc->overlay_proc_handle, &ov);
+
+ if (plane == BD_OVERLAY_IG) {
+ gc->ig_open = 1;
+ } else {
+ gc->pg_open = 1;
+ }
}
}
@@ -386,6 +394,12 @@ static void _close_osd(GRAPHICS_CONTROLLER *gc, int plane)
gc->overlay_proc(gc->overlay_proc_handle, &ov);
}
+
+ if (plane == BD_OVERLAY_IG) {
+ gc->ig_open = 0;
+ } else {
+ gc->pg_open = 0;
+ }
}
static void _flush_osd(GRAPHICS_CONTROLLER *gc, int plane, int64_t pts)
@@ -753,6 +767,13 @@ static void _render_page(GRAPHICS_CONTROLLER *gc,
GC_TRACE("rendering page #%d using palette #%d. page has %d bogs\n",
page->id, page->palette_id_ref, page->num_bogs);
+ if (!gc->ig_open) {
+ _open_osd(gc, BD_OVERLAY_IG,
+ s->ics->video_descriptor.video_width,
+ s->ics->video_descriptor.video_height);
+ }
+
+
for (ii = 0; ii < page->num_bogs; ii++) {
BD_IG_BOG *bog = &page->bog[ii];
unsigned valid_id = gc->bog_data[ii].enabled_button;
More information about the libbluray-devel
mailing list