[vlc-commits] bluray: check for java when playing disc with BD-J menus

Petri Hintukainen git at videolan.org
Sun Oct 25 23:03:09 CET 2015


vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sun Oct 25 15:59:13 2015 +0200| [9dcae1d3ea13fa900ee64e5a0eccbdc8a1b8e90f] | committer: Jean-Baptiste Kempf

bluray: check for java when playing disc with BD-J menus

If Java is required but not found, show error message and play without menus.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9dcae1d3ea13fa900ee64e5a0eccbdc8a1b8e90f
---

 modules/access/bluray.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 85c3754..72808fa 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -580,6 +580,18 @@ static int blurayOpen(vlc_object_t *object)
 
     p_sys->b_menu = var_InheritBool(p_demux, "bluray-menu");
 
+    /* Check BD-J capability */
+    if (p_sys->b_menu && disc_info->bdj_detected && !disc_info->bdj_handled) {
+        msg_Err(p_demux, "BD-J menus not supported. Playing without menus. "
+                "BD-J support: %d, JVM found: %d, JVM usable: %d",
+                disc_info->bdj_supported, disc_info->libjvm_detected, disc_info->bdj_handled);
+        dialog_Fatal(p_demux, _("Java required"),
+                     _("This Blu-ray disc needs Java for menus.%s\nDisc is played without menus."),
+                     !disc_info->libjvm_detected ? _(" Java was not found from your system.") : "");
+        p_sys->b_menu = false;
+    }
+
+    /* Get titles and chapters */
     blurayInitTitles(p_demux, disc_info->num_hdmv_titles + disc_info->num_bdj_titles + 1/*Top Menu*/ + 1/*First Play*/);
 
     /*



More information about the vlc-commits mailing list