Hello community,

here is the log from the commit of package libbluray for openSUSE:Factory 
checked in at 2020-04-29 20:43:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libbluray (Old)
 and      /work/SRC/openSUSE:Factory/.libbluray.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libbluray"

Wed Apr 29 20:43:13 2020 rev:40 rq:798390 version:1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libbluray/libbluray.changes      2019-08-15 
12:23:34.970633396 +0200
+++ /work/SRC/openSUSE:Factory/.libbluray.new.2738/libbluray.changes    
2020-04-29 20:43:16.003780989 +0200
@@ -1,0 +2,10 @@
+Mon Apr 27 17:35:07 UTC 2020 - Luigi Baldoni <[email protected]>
+
+- Update to version 1.2.0
+  * Add functions to list and read BD-ROM files.
+  * Add support for separate key pressed / typed / released user
+    input events.
+  * Add support for AWT mouse events (BD-J).
+  * Fix build with OpenJDK 12 / 13.
+
+-------------------------------------------------------------------

Old:
----
  libbluray-1.1.2.tar.bz2

New:
----
  libbluray-1.2.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libbluray.spec ++++++
--- /var/tmp/diff_new_pack.qhQSuN/_old  2020-04-29 20:43:16.663782709 +0200
+++ /var/tmp/diff_new_pack.qhQSuN/_new  2020-04-29 20:43:16.667782720 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libbluray
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands
 #
 # All modifications and additions to the file contributed by third parties
@@ -13,19 +13,19 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %define         sover 2
 Name:           libbluray
-Version:        1.1.2
+Version:        1.2.0
 Release:        0
 Summary:        Library to access Blu-Ray disk
-License:        LGPL-2.1+
+License:        LGPL-2.1-or-later
 Group:          Productivity/Multimedia/Other
-Url:            http://www.videolan.org/developers/libbluray.html
-Source0:        
http://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{version}.tar.bz2
+URL:            https://www.videolan.org/developers/libbluray.html
+Source0:        
https://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{version}.tar.bz2
 Source99:       baselibs.conf
 Patch0:         libbluray-pkgconfig.patch
 Patch1:         libbluray-java9.patch
@@ -102,7 +102,7 @@
     --disable-static \
     --enable-bdjava \
     --enable-udf
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install
@@ -115,7 +115,7 @@
 %{_bindir}/bd_info
 
 %files -n libbluray%{sover}
-%doc COPYING
+%license COPYING
 %{_libdir}/libbluray.so.*
 
 %files devel

++++++ libbluray-1.1.2.tar.bz2 -> libbluray-1.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/ChangeLog 
new/libbluray-1.2.0/ChangeLog
--- old/libbluray-1.1.2/ChangeLog       2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/ChangeLog       2020-03-22 16:29:41.000000000 +0100
@@ -1,3 +1,9 @@
+2020-03-22: Version 1.2.0
+- Add functions to list and read BD-ROM files.
+- Add support for separate key pressed / typed / released user input events.
+- Add support for AWT mouse events (BD-J).
+- Fix build with OpenJDK 12 / 13.
+
 2019-06-07: Version 1.1.2
 - Add libxml version to pkg-config Requires.private.
 - Improve support for NetBSD operating system.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/Makefile.am 
new/libbluray-1.2.0/Makefile.am
--- old/libbluray-1.1.2/Makefile.am     2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/Makefile.am     2020-03-22 16:29:41.000000000 +0100
@@ -228,11 +228,15 @@
 
 if USING_BDJAVA_BUILD_JAR
 
+if USING_JAVAC_12
+java_versions = -Djava_version_asm=1.7 -Djava_version_bdj=1.7
+else
 if USING_JAVAC_9
 java_versions = -Djava_version_asm=1.6 -Djava_version_bdj=1.6
 else
 java_versions = -Djava_version_asm=1.5 -Djava_version_bdj=1.4
 endif
+endif
 
 if BDJ_J2SE
 awt_src = java-$(BDJ_TYPE):java-build-support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/Makefile.in 
new/libbluray-1.2.0/Makefile.in
--- old/libbluray-1.1.2/Makefile.in     2019-06-07 20:01:05.000000000 +0200
+++ new/libbluray-1.2.0/Makefile.in     2020-03-22 16:31:30.000000000 +0100
@@ -977,8 +977,9 @@
        src/libbluray/decoders/overlay.h \
        src/util/log_control.h
 
-@USING_BDJAVA_BUILD_JAR_TRUE@@USING_JAVAC_9_FALSE@java_versions = 
-Djava_version_asm=1.5 -Djava_version_bdj=1.4
-@USING_BDJAVA_BUILD_JAR_TRUE@@USING_JAVAC_9_TRUE@java_versions = 
-Djava_version_asm=1.6 -Djava_version_bdj=1.6
+@USING_BDJAVA_BUILD_JAR_TRUE@@USING_JAVAC_12_FALSE@@USING_JAVAC_9_FALSE@java_versions
 = -Djava_version_asm=1.5 -Djava_version_bdj=1.4
+@USING_BDJAVA_BUILD_JAR_TRUE@@USING_JAVAC_12_FALSE@@USING_JAVAC_9_TRUE@java_versions
 = -Djava_version_asm=1.6 -Djava_version_bdj=1.6
+@USING_BDJAVA_BUILD_JAR_TRUE@@USING_JAVAC_12_TRUE@java_versions = 
-Djava_version_asm=1.7 -Djava_version_bdj=1.7
 @BDJ_J2SE_FALSE@@USING_BDJAVA_BUILD_JAR_TRUE@awt_src = java-$(BDJ_TYPE)
 @BDJ_J2SE_TRUE@@USING_BDJAVA_BUILD_JAR_TRUE@awt_src = 
java-$(BDJ_TYPE):java-build-support
 @USING_BDJAVA_BUILD_JAR_TRUE@jardir = $(datadir)/java/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/build-aux/ltmain.sh 
new/libbluray-1.2.0/build-aux/ltmain.sh
--- old/libbluray-1.1.2/build-aux/ltmain.sh     2019-06-07 20:01:00.000000000 
+0200
+++ new/libbluray-1.2.0/build-aux/ltmain.sh     2020-03-22 16:31:25.000000000 
+0100
@@ -31,7 +31,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-10"
+VERSION="2.4.6 Debian-2.4.6-11"
 package_revision=2.4.6
 
 
@@ -2141,7 +2141,7 @@
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname $scriptversion Debian-2.4.6-10
+       version:        $progname $scriptversion Debian-2.4.6-11
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/configure 
new/libbluray-1.2.0/configure
--- old/libbluray-1.1.2/configure       2019-06-07 20:01:04.000000000 +0200
+++ new/libbluray-1.2.0/configure       2020-03-22 16:31:28.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libbluray 1.1.2.
+# Generated by GNU Autoconf 2.69 for libbluray 1.2.0.
 #
 # Report bugs to <http://www.videolan.org/developers/libbluray.html>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libbluray'
 PACKAGE_TARNAME='libbluray'
-PACKAGE_VERSION='1.1.2'
-PACKAGE_STRING='libbluray 1.1.2'
+PACKAGE_VERSION='1.2.0'
+PACKAGE_STRING='libbluray 1.2.0'
 PACKAGE_BUGREPORT='http://www.videolan.org/developers/libbluray.html'
 PACKAGE_URL=''
 
@@ -692,6 +692,8 @@
 BDJ_J2SE_FALSE
 BDJ_J2SE_TRUE
 BDJ_TYPE
+USING_JAVAC_12_FALSE
+USING_JAVAC_12_TRUE
 USING_JAVAC_9_FALSE
 USING_JAVAC_9_TRUE
 USING_BDJAVA_BUILD_JAR_FALSE
@@ -1436,7 +1438,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libbluray 1.1.2 to adapt to many kinds of systems.
+\`configure' configures libbluray 1.2.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1507,7 +1509,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libbluray 1.1.2:";;
+     short | recursive ) echo "Configuration of libbluray 1.2.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1666,7 +1668,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libbluray configure 1.1.2
+libbluray configure 1.2.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2092,7 +2094,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libbluray $as_me 1.1.2, which was
+It was created by libbluray $as_me 1.2.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3027,7 +3029,7 @@
 
 # Define the identity of the package.
  PACKAGE='libbluray'
- VERSION='1.1.2'
+ VERSION='1.2.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3302,6 +3304,7 @@
     ;;
   *darwin*)
     SYS=darwin
+    EXTRA_LIBS="${EXTRA_LIBS} -framework CoreFoundation -framework 
DiskArbitration"
     ;;
   netbsd*)
     SYS=netbsd
@@ -14141,7 +14144,8 @@
 fi
 
                 javac_version=`"$JAVAC" -version 2>&1 | head -n 1`
-        with_java9=`echo "$javac_version" | grep -E -q '^javac\ (9|1[0-9])' && 
echo yes`
+        with_java9=`echo "$javac_version" | grep -E -q '^javac\ (9|1[0-1])' && 
echo yes`
+        with_java12=`echo "$javac_version" | grep -E -q '^javac\ (1[2-9])' && 
echo yes`
 
 fi
 
@@ -14150,6 +14154,9 @@
 else
   java_code_version=1.4
 fi
+    if test "x$with_java12" = "xyes" -a "$BDJ_TYPE" != "j2me"; then :
+  java_code_version=1.7
+fi
 
 fi
 
@@ -14179,6 +14186,14 @@
   USING_JAVAC_9_FALSE=
 fi
 
+ if  test x"$with_java12" = x"yes" ; then
+  USING_JAVAC_12_TRUE=
+  USING_JAVAC_12_FALSE='#'
+else
+  USING_JAVAC_12_TRUE='#'
+  USING_JAVAC_12_FALSE=
+fi
+
 
 if test "$BDJ_TYPE" = "j2me"; then
 
@@ -16148,12 +16163,12 @@
 
 BLURAY_VERSION_MAJOR=1
 
-BLURAY_VERSION_MINOR=1
+BLURAY_VERSION_MINOR=2
 
-BLURAY_VERSION_MICRO=2
+BLURAY_VERSION_MICRO=0
 
 
-LT_VERSION_INFO="3:2:1"
+LT_VERSION_INFO="4:0:2"
 
 
 
@@ -16312,6 +16327,10 @@
   as_fn_error $? "conditional \"USING_JAVAC_9\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USING_JAVAC_12_TRUE}" && test -z "${USING_JAVAC_12_FALSE}"; then
+  as_fn_error $? "conditional \"USING_JAVAC_12\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${BDJ_J2SE_TRUE}" && test -z "${BDJ_J2SE_FALSE}"; then
   as_fn_error $? "conditional \"BDJ_J2SE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16801,7 +16820,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libbluray $as_me 1.1.2, which was
+This file was extended by libbluray $as_me 1.2.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16867,7 +16886,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libbluray config.status 1.1.2
+libbluray config.status 1.2.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/configure.ac 
new/libbluray-1.2.0/configure.ac
--- old/libbluray-1.1.2/configure.ac    2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/configure.ac    2020-03-22 16:29:41.000000000 +0100
@@ -1,7 +1,7 @@
 dnl library version number
 m4_define([bluray_major], 1)
-m4_define([bluray_minor], 1)
-m4_define([bluray_micro], 2)
+m4_define([bluray_minor], 2)
+m4_define([bluray_micro], 0)
 m4_define([bluray_version],[bluray_major.bluray_minor.bluray_micro])
 
 dnl shared library version (.so version)
@@ -12,9 +12,9 @@
 dnl
 dnl Library file name will be libbluray.so.(current-age).age.revision
 dnl
-m4_define([lt_current],  3)
-m4_define([lt_revision], 2)
-m4_define([lt_age],      1)
+m4_define([lt_current],  4)
+m4_define([lt_revision], 0)
+m4_define([lt_age],      2)
 
 dnl initilization
 AC_INIT([libbluray], bluray_version, 
[http://www.videolan.org/developers/libbluray.html])
@@ -46,6 +46,7 @@
     ;;
   *darwin*)
     SYS=darwin
+    EXTRA_LIBS="${EXTRA_LIBS} -framework CoreFoundation -framework 
DiskArbitration"
     ;;
   netbsd*)
     SYS=netbsd
@@ -250,16 +251,19 @@
 
         dnl check for Java 9+
         javac_version=`"$JAVAC" -version 2>&1 | head -n 1`
-        [with_java9=`echo "$javac_version" | grep -E -q '^javac\ (9|1[0-9])' 
&& echo yes`]
+        [with_java9=`echo "$javac_version" | grep -E -q '^javac\ (9|1[0-1])' 
&& echo yes`]
+        [with_java12=`echo "$javac_version" | grep -E -q '^javac\ (1[2-9])' && 
echo yes`]
     ])
 
     AS_IF([test "x$with_java9" = "xyes" -a "$BDJ_TYPE" != "j2me"], 
[java_code_version=1.6], [java_code_version=1.4])
+    AS_IF([test "x$with_java12" = "xyes" -a "$BDJ_TYPE" != "j2me"], 
[java_code_version=1.7])
 ])
 
 AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of 
the java vm."])
 AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
 AM_CONDITIONAL([USING_BDJAVA_BUILD_JAR], [ test $use_bdjava_jar = "yes" ])
 AM_CONDITIONAL([USING_JAVAC_9], [ test x"$with_java9" = x"yes" ])
+AM_CONDITIONAL([USING_JAVAC_12], [ test x"$with_java12" = x"yes" ])
 
 dnl BD-J type
 if test "$BDJ_TYPE" = "j2me"; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/devtools/clpi_dump.c 
new/libbluray-1.2.0/src/devtools/clpi_dump.c
--- old/libbluray-1.1.2/src/devtools/clpi_dump.c        2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/devtools/clpi_dump.c        2020-03-22 
16:29:41.000000000 +0100
@@ -274,7 +274,7 @@
                     pts = ((uint64_t) (coarse->pts_ep & ~0x01) << 19) +
                             ((uint64_t)fine->pts_ep << 9);
                     spn = (coarse->spn_ep & ~0x1FFFF) + fine->spn_ep;
-                    indent_printf(level+4, "PTS %8"PRIu64"/%8"PRIu64" -- SPN 
%u",
+                    indent_printf(level+4, "PTS %8" PRIu64 "/%8" PRIu64 " -- 
SPN %u",
                         pts, pts >> 1, spn);
                 }
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/devtools/hdmv_test.c 
new/libbluray-1.2.0/src/devtools/hdmv_test.c
--- old/libbluray-1.1.2/src/devtools/hdmv_test.c        2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/devtools/hdmv_test.c        2020-03-22 
16:29:41.000000000 +0100
@@ -110,7 +110,7 @@
         _print_event(&ev);
     } while (bytes > 0);
 
-    printf("_read_to_eof(): read %"PRIu64" bytes\n", total);
+    printf("_read_to_eof(): read %" PRIu64 " bytes\n", total);
 }
 
 static void _print_events(BLURAY *bd)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/devtools/mpls_dump.c 
new/libbluray-1.2.0/src/devtools/mpls_dump.c
--- old/libbluray-1.1.2/src/devtools/mpls_dump.c        2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/devtools/mpls_dump.c        2020-03-22 
16:29:41.000000000 +0100
@@ -68,6 +68,11 @@
   {0, NULL}
 };
 
+const VALUE_MAP mark_type_map[] = {
+  {BLURAY_MARK_ENTRY, "Entry (chapter)"},
+  {BLURAY_MARK_LINK,  "Link"},
+  {0, NULL}
+};
 
 static char *
 _mk_path(const char *base, const char *sub)
@@ -251,7 +256,9 @@
 
         plm = &pl->play_mark[ii];
         indent_printf(level, "PlayMark %d", ii);
-        indent_printf(level+1, "Type: %02x", plm->mark_type);
+        indent_printf(level+1, "Type: %s (%02x)",
+                      _lookup_str(mark_type_map, plm->mark_type),
+                      plm->mark_type);
         if (plm->play_item_ref < pl->list_count) {
             pi = &pl->play_item[plm->play_item_ref];
             indent_printf(level+1, "PlayItem: %s", pi->clip[0].clip_id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/examples/bd_info.c 
new/libbluray-1.2.0/src/examples/bd_info.c
--- old/libbluray-1.1.2/src/examples/bd_info.c  2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/examples/bd_info.c  2020-03-22 16:29:41.000000000 
+0100
@@ -52,6 +52,8 @@
     size_t i;
 
     str = (char*)realloc(str, 2*len + 1);
+    if (!str)
+        return "";
     *str = 0;
 
     for (i = 0; i < len; i++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/examples/bdsplice.c 
new/libbluray-1.2.0/src/examples/bdsplice.c
--- old/libbluray-1.1.2/src/examples/bdsplice.c 2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/examples/bdsplice.c 2020-03-22 16:29:41.000000000 
+0100
@@ -225,7 +225,7 @@
         total += wrote;
     }
     if (verbose) {
-        fprintf(stderr, "Wrote %"PRId64" bytes\n", total);
+        fprintf(stderr, "Wrote %" PRId64 " bytes\n", total);
     }
     bd_close(bd);
     fclose(out);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/examples/libbluray_test.c 
new/libbluray-1.2.0/src/examples/libbluray_test.c
--- old/libbluray-1.1.2/src/examples/libbluray_test.c   2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/examples/libbluray_test.c   2020-03-22 
16:29:41.000000000 +0100
@@ -54,7 +54,7 @@
         for (ii = 0; ii < num_titles; ii++) {
             BLURAY_TITLE_INFO* ti;
             ti = bd_get_title_info(bd, ii, 0);
-            printf("index: %d duration: %02"PRIu64":%02"PRIu64":%02"PRIu64" 
chapters: %d\n",
+            printf("index: %d duration: %02" PRIu64 ":%02" PRIu64 ":%02" 
PRIu64 " chapters: %d\n",
                    ii,
                    (ti->duration / 90000) / (3600),
                    ((ti->duration / 90000) % 3600) / 60,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/examples/list_titles.c 
new/libbluray-1.2.0/src/examples/list_titles.c
--- old/libbluray-1.1.2/src/examples/list_titles.c      2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/examples/list_titles.c      2020-03-22 
16:29:41.000000000 +0100
@@ -116,7 +116,7 @@
         BLURAY_TITLE_INFO* ti;
         ti = bd_get_title_info(bd, ii, 0);
         printf(
-       "index: %3d duration: %02"PRIu64":%02"PRIu64":%02"PRIu64" chapters: %3d 
angles: %2u clips: %3u (playlist: %05d.mpls) "
+       "index: %3d duration: %02" PRIu64 ":%02" PRIu64 ":%02" PRIu64 " 
chapters: %3d angles: %2u clips: %3u (playlist: %05d.mpls) "
        "V:%d A:%-2d PG:%-2d IG:%-2d SV:%d SA:%d\n",
               ii + 1,
               (ti->duration / 90000) / (3600),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/file/dir_posix.c 
new/libbluray-1.2.0/src/file/dir_posix.c
--- old/libbluray-1.1.2/src/file/dir_posix.c    2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/file/dir_posix.c    2020-03-22 16:29:41.000000000 
+0100
@@ -94,7 +94,6 @@
 {
     BD_DIR_H *dir = calloc(1, sizeof(BD_DIR_H));
 
-    BD_DEBUG(DBG_DIR, "Opening POSIX dir %s... (%p)\n", dirname, (void*)dir);
     if (!dir) {
         return NULL;
     }
@@ -103,10 +102,11 @@
     dir->read = _dir_read_posix;
 
     if ((dir->internal = opendir(dirname))) {
+        BD_DEBUG(DBG_DIR, "Opened POSIX dir %s (%p)\n", dirname, (void*)dir);
         return dir;
     }
 
-    BD_DEBUG(DBG_DIR, "Error opening dir! (%p)\n", (void*)dir);
+    BD_DEBUG(DBG_DIR, "Error opening dir %s\n", dirname);
 
     X_FREE(dir);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/file/dir_win32.c 
new/libbluray-1.2.0/src/file/dir_win32.c
--- old/libbluray-1.1.2/src/file/dir_win32.c    2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/file/dir_win32.c    2020-03-22 16:29:41.000000000 
+0100
@@ -108,14 +108,13 @@
     BD_DIR_H *dir = calloc(1, sizeof(BD_DIR_H));
     dir_data_t *priv = NULL;
 
-    BD_DEBUG(DBG_DIR, "Opening WIN32 dir %s... (%p)\n", dirname, (void*)dir);
-
     if (!dir) {
         return NULL;
     }
 
     priv = _open_impl(dirname);
     if (priv) {
+        BD_DEBUG(DBG_DIR, "Opened WIN32 dir %s (%p)\n", dirname, (void*)dir);
         dir->close = _dir_close_win32;
         dir->read = _dir_read_win32;
         dir->internal = priv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/file/file_posix.c 
new/libbluray-1.2.0/src/file/file_posix.c
--- old/libbluray-1.1.2/src/file/file_posix.c   2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/file/file_posix.c   2020-03-22 16:29:41.000000000 
+0100
@@ -85,7 +85,7 @@
     ssize_t got, result;
 
     if (size <= 0 || size >= BD_MAX_SSIZE) {
-        BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %"PRId64" 
(%p)\n", size, (void*)file);
+        BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %" PRId64 
" (%p)\n", size, (void*)file);
         return 0;
     }
 
@@ -117,7 +117,7 @@
             }
             return 0;
         }
-        BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size 
%"PRId64" (%p)\n", size, (void*)file);
+        BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %" 
PRId64 " (%p)\n", size, (void*)file);
         return 0;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/file/file_win32.c 
new/libbluray-1.2.0/src/file/file_win32.c
--- old/libbluray-1.1.2/src/file/file_win32.c   2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/file/file_win32.c   2020-03-22 16:29:41.000000000 
+0100
@@ -81,7 +81,7 @@
         return (int64_t)fread(buf, 1, (size_t)size, (FILE *)file->internal);
     }
 
-    BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %"PRId64" 
(%p)\n", size, (void*)file);
+    BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %" PRId64 " 
(%p)\n", size, (void*)file);
     return 0;
 }
 
@@ -99,7 +99,7 @@
         return 0;
     }
 
-    BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %"PRId64" 
(%p)\n", size, (void*)file);
+    BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %" PRId64 " 
(%p)\n", size, (void*)file);
     return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/file/mount_darwin.c 
new/libbluray-1.2.0/src/file/mount_darwin.c
--- old/libbluray-1.1.2/src/file/mount_darwin.c 2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/file/mount_darwin.c 2020-03-22 16:29:41.000000000 
+0100
@@ -29,35 +29,53 @@
 
 #define _DARWIN_C_SOURCE
 #include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/ucred.h>
-#include <sys/mount.h>
 
-char *mount_get_mountpoint(const char *device_path)
+#include <DiskArbitration/DADisk.h>
+
+static char *bsdname_get_mountpoint(const char *device_path)
 {
-    struct stat st;
-    if (stat (device_path, &st) ) {
-        return str_dup(device_path);
-    }
+    char *result = NULL;
 
-    /* If it's a directory, all is good */
-    if (S_ISDIR(st.st_mode)) {
-        return str_dup(device_path);
+    DASessionRef session = DASessionCreate(kCFAllocatorDefault);
+    if (session) {
+        DADiskRef disk = DADiskCreateFromBSDName(kCFAllocatorDefault, session, 
device_path);
+        if (disk) {
+            CFDictionaryRef desc = DADiskCopyDescription(disk);
+            if (desc) {
+                // Get Volume path as CFURL
+                CFURLRef url = CFDictionaryGetValue(desc, 
kDADiskDescriptionVolumePathKey);
+                if (url) {
+                    // Copy Volume path as C char array
+                    char tmp_path[PATH_MAX];
+                    if (CFURLGetFileSystemRepresentation(url, true, 
(UInt8*)tmp_path, sizeof(tmp_path))) {
+                        result = str_dup(tmp_path);
+                    }
+                }
+                CFRelease(desc);
+            }
+            CFRelease(disk);
+        }
+        CFRelease(session);
     }
 
-    struct statfs mbuf[128];
-    int fs_count;
-
-    if ( (fs_count = getfsstat (NULL, 0, MNT_NOWAIT)) != -1 ) {
+    return result;
+}
 
-        getfsstat (mbuf, fs_count * sizeof(mbuf[0]), MNT_NOWAIT);
 
-        for ( int i = 0; i < fs_count; ++i) {
-            if (!strcmp (mbuf[i].f_mntfromname, device_path)) {
-                return str_dup (mbuf[i].f_mntonname);
-            }
+char *mount_get_mountpoint(const char *device_path)
+{
+    struct stat st;
+    if (stat(device_path, &st) == 0) {
+        // If it's a directory, all is good
+        if (S_ISDIR(st.st_mode)) {
+            return str_dup(device_path);
         }
     }
 
-    return str_dup (device_path);
+    char *mountpoint = bsdname_get_mountpoint(device_path);
+    if (mountpoint) {
+        return mountpoint;
+    }
+
+    return str_dup(device_path);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/bdj/bdj.c 
new/libbluray-1.2.0/src/libbluray/bdj/bdj.c
--- old/libbluray-1.1.2/src/libbluray/bdj/bdj.c 2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/libbluray/bdj/bdj.c 2020-03-22 16:29:41.000000000 
+0100
@@ -343,19 +343,23 @@
 static void *_load_jli_macos()
 {
     const char *java_home = NULL;
-    static const char jli_dir[] = "jre/lib/jli";
+    static const char * const jli_dir[]  = {
+        "jre/lib/jli", "lib/jli",
+    };
+    const unsigned num_jli_dir  = sizeof(jli_dir)  / sizeof(jli_dir[0]);
+
     static const char jli_lib[] = "libjli";
     void *handle;
 
     /* JAVA_HOME set, use it */
     java_home = getenv("JAVA_HOME");
     if (java_home) {
-        return _jvm_dlopen(java_home, jli_dir, jli_lib);
+        return _jvm_dlopen_a(java_home, jli_dir, num_jli_dir, jli_lib);
     }
 
     java_home = _java_home_macos();
     if (java_home) {
-        handle = _jvm_dlopen(java_home, jli_dir, jli_lib);
+        handle = _jvm_dlopen_a(java_home, jli_dir, num_jli_dir, jli_lib);
         if (handle) {
             return handle;
         }
@@ -486,7 +490,7 @@
     return 0;
 }
 
-void bdj_storage_cleanup(BDJ_STORAGE *p)
+void bdj_config_cleanup(BDJ_CONFIG *p)
 {
     X_FREE(p->cache_root);
     X_FREE(p->persistent_root);
@@ -587,7 +591,7 @@
     return jar1;
 }
 
-static int _find_libbluray_jar(BDJ_STORAGE *storage)
+static int _find_libbluray_jar(BDJ_CONFIG *storage)
 {
     if (!storage->classpath[0]) {
         storage->classpath[0] = _find_libbluray_jar0();
@@ -607,7 +611,7 @@
     return !!storage->classpath[0];
 }
 
-static const char *_bdj_persistent_root(BDJ_STORAGE *storage)
+static const char *_bdj_persistent_root(BDJ_CONFIG *storage)
 {
     const char *root;
     char       *data_home;
@@ -638,7 +642,7 @@
     return storage->persistent_root;
 }
 
-static const char *_bdj_buda_root(BDJ_STORAGE *storage)
+static const char *_bdj_buda_root(BDJ_CONFIG *storage)
 {
     const char *root;
     char       *cache_home;
@@ -696,7 +700,7 @@
 }
 
 static int _bdj_init(JNIEnv *env, struct bluray *bd, const char *disc_root, 
const char *bdj_disc_id,
-                     BDJ_STORAGE *storage)
+                     BDJ_CONFIG *storage)
 {
     if (!bdj_register_native_methods(env)) {
         BD_DEBUG(DBG_BDJ | DBG_CRIT, "Couldn't register native methods.\n");
@@ -738,7 +742,7 @@
     return 1;
 }
 
-int bdj_jvm_available(BDJ_STORAGE *storage)
+int bdj_jvm_available(BDJ_CONFIG *storage)
 {
     const char *java_home;
     void* jvm_lib = _load_jvm(&java_home);
@@ -964,11 +968,11 @@
 }
 
 BDJAVA* bdj_open(const char *path, struct bluray *bd,
-                 const char *bdj_disc_id, BDJ_STORAGE *storage)
+                 const char *bdj_disc_id, BDJ_CONFIG *cfg)
 {
     BD_DEBUG(DBG_BDJ, "bdj_open()\n");
 
-    if (!_find_libbluray_jar(storage)) {
+    if (!_find_libbluray_jar(cfg)) {
         BD_DEBUG(DBG_BDJ | DBG_CRIT, "BD-J start failed: " BDJ_JARFILE " not 
found.\n");
         return NULL;
     }
@@ -1000,7 +1004,7 @@
 
     JNIEnv* env = NULL;
     JavaVM *jvm = NULL;
-    const char *jar[2] = { storage->classpath[0], storage->classpath[1] };
+    const char *jar[2] = { cfg->classpath[0], cfg->classpath[1] };
     if (!_find_jvm(jvm_lib, &env, &jvm) &&
         !_create_jvm(jvm_lib, java_home, jar, &env, &jvm)) {
 
@@ -1020,7 +1024,7 @@
         BD_DEBUG(DBG_BDJ, "Java version: %d.%d\n", version >> 16, version & 
0xffff);
     }
 
-    if (!_bdj_init(env, bd, path, bdj_disc_id, storage)) {
+    if (!_bdj_init(env, bd, path, bdj_disc_id, cfg)) {
         bdj_close(bdjava);
         return NULL;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/bdj/bdj.h 
new/libbluray-1.2.0/src/libbluray/bdj/bdj.h
--- old/libbluray-1.1.2/src/libbluray/bdj/bdj.h 2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/libbluray/bdj/bdj.h 2020-03-22 16:29:41.000000000 
+0100
@@ -70,14 +70,14 @@
     char *classpath[2];      /* BD-J implementation class path (location of 
libbluray.jar) */
 
     uint8_t no_persistent_storage; /* disable persistent storage (remove files 
at close) */
-} BDJ_STORAGE;
+} BDJ_CONFIG;
 
 typedef struct bdjava_s BDJAVA;
 
 struct bluray;
 
 BD_PRIVATE BDJAVA* bdj_open(const char *path, struct bluray *bd,
-                            const char *bdj_disc_id, BDJ_STORAGE *storage);
+                            const char *bdj_disc_id, BDJ_CONFIG *storage);
 BD_PRIVATE void bdj_close(BDJAVA *bdjava);
 BD_PRIVATE int  bdj_process_event(BDJAVA *bdjava, unsigned ev, unsigned param);
 
@@ -87,8 +87,8 @@
     BDJ_CHECK_NO_JAR = 2,
 };
 
-BD_PRIVATE int  bdj_jvm_available(BDJ_STORAGE *storage);  /* rreturn: 
BDJ_CHECK_* */
+BD_PRIVATE int  bdj_jvm_available(BDJ_CONFIG *storage);  /* rreturn: 
BDJ_CHECK_* */
 
-BD_PRIVATE void bdj_storage_cleanup(BDJ_STORAGE *);
+BD_PRIVATE void bdj_config_cleanup(BDJ_CONFIG *);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/bdj/java/java/awt/BDJHelper.java 
new/libbluray-1.2.0/src/libbluray/bdj/java/java/awt/BDJHelper.java
--- old/libbluray-1.1.2/src/libbluray/bdj/java/java/awt/BDJHelper.java  
2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/bdj/java/java/awt/BDJHelper.java  
2020-03-22 16:29:41.000000000 +0100
@@ -22,6 +22,9 @@
 
 import java.awt.event.InvocationEvent;
 import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+
+import org.videolan.Logger;
 
 public class BDJHelper {
 
@@ -62,20 +65,60 @@
             } catch (InterruptedException e) {
             }
             if (t.isAlive()) {
-                
org.videolan.Logger.getLogger("BDRootWindow").error("stopEventQueue() failed 
for " + t);
+                logger.error("stopEventQueue() failed for " + t);
                 org.videolan.PortingHelper.stopThread(t);
             }
         }
     }
 
+    /*
+     * Mouse events
+     */
+
+    private static int mouseX = 0, mouseY = 0, mouseMask = 0;
+
     public static boolean postMouseEvent(int x, int y) {
-        return false;
+        mouseX = x;
+        mouseY = y;
+        return postMouseEventImpl(MouseEvent.MOUSE_MOVED, MouseEvent.NOBUTTON);
+    }
+
+    public static boolean postMouseEvent(int id) {
+        boolean r;
+
+        if (id == MouseEvent.MOUSE_PRESSED)
+            mouseMask = MouseEvent.BUTTON1_MASK;
+
+        r = postMouseEventImpl(id, MouseEvent.BUTTON1);
+
+        if (id == MouseEvent.MOUSE_RELEASED)
+            mouseMask = 0;
+
+        return r;
     }
 
-    public static boolean postMouseEvent(int button) {
+    private static boolean postMouseEventImpl(int id, int button) {
+        Component focusOwner = 
KeyboardFocusManager.getCurrentKeyboardFocusManager().getGlobalFocusOwner();
+        if (focusOwner != null) {
+            EventQueue eq = BDToolkit.getEventQueue(focusOwner);
+            if (eq != null) {
+                long when = System.currentTimeMillis();
+                try {
+                    eq.postEvent(new MouseEvent(focusOwner, id, when, 
mouseMask, mouseX, mouseY,
+                                                (id == 
MouseEvent.MOUSE_CLICKED) ? 1 : 0, false, button));
+                    return true;
+                } catch (Exception e) {
+                    logger.error("postMouseEvent failed: " + e);
+                }
+            }
+        }
         return false;
     }
 
+    /*
+     * Key events
+     */
+
     public static boolean postKeyEvent(int id, int modifiers, int keyCode) {
         Component focusOwner = 
KeyboardFocusManager.getCurrentKeyboardFocusManager().getGlobalFocusOwner();
         if (focusOwner != null) {
@@ -93,12 +136,14 @@
                     return true;
                 }
             } catch (Exception e) {
-                org.videolan.Logger.getLogger("BDJHelper").error("postKeyEvent 
failed: " + e);
+                logger.error("postKeyEvent failed: " + e);
             }
         } else {
-            org.videolan.Logger.getLogger("BDJHelper").error("*** KEY event 
dropped ***");
+            logger.error("KEY event dropped (no focus owner)");
         }
 
         return false;
     }
+
+    private static final Logger logger = 
Logger.getLogger(BDJHelper.class.getName());
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/bdj/java/org/videolan/Libbluray.java 
new/libbluray-1.2.0/src/libbluray/bdj/java/org/videolan/Libbluray.java
--- old/libbluray-1.1.2/src/libbluray/bdj/java/org/videolan/Libbluray.java      
2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/bdj/java/org/videolan/Libbluray.java      
2020-03-22 16:29:41.000000000 +0100
@@ -23,6 +23,7 @@
 import java.awt.BDFontMetrics;
 import java.awt.BDToolkit;
 import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
 import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
@@ -702,7 +703,7 @@
             break;
 
         case BDJ_EVENT_VK_KEY:
-            switch (param) {
+            switch (param & 0xffff) {
             case  0: key = KeyEvent.VK_0; break;
             case  1: key = KeyEvent.VK_1; break;
             case  2: key = KeyEvent.VK_2; break;
@@ -724,7 +725,16 @@
             case 405: key = HRcEvent.VK_COLORED_KEY_2; break;
             case 406: key = HRcEvent.VK_COLORED_KEY_3; break;
             case 17:
-                result = java.awt.BDJHelper.postMouseEvent(0);
+                result = false;
+                if ((param & 0x80000000) != 0) {
+                    result = 
java.awt.BDJHelper.postMouseEvent(MouseEvent.MOUSE_PRESSED) || result;
+                }
+                if ((param & 0x40000000) != 0) {
+                    result = 
java.awt.BDJHelper.postMouseEvent(MouseEvent.MOUSE_CLICKED) || result;
+                }
+                if ((param & 0x20000000) != 0) {
+                    result = 
java.awt.BDJHelper.postMouseEvent(MouseEvent.MOUSE_RELEASED) || result;
+                }
                 key = -1;
                 break;
             default:
@@ -733,9 +743,16 @@
                 break;
             }
             if (key > 0) {
-                boolean r1 = 
EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_PRESSED, 0, key);
-                boolean r2 = 
EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_TYPED, 0, key);
-                boolean r3 = 
EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_RELEASED, 0, key);
+                boolean r1 = false, r2 = false, r3 = false;
+                if ((param & 0x80000000) != 0) {
+                    r1 = 
EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_PRESSED, 0, key);
+                }
+                if ((param & 0x40000000) != 0) {
+                    r2 = 
EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_TYPED, 0, key);
+                }
+                if ((param & 0x20000000) != 0) {
+                    r3 = 
EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_RELEASED, 0, key);
+                }
                 result = r1 || r2 || r3;
             }
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/bdj/java/org/videolan/media/content/control/GainControlImpl.java
 
new/libbluray-1.2.0/src/libbluray/bdj/java/org/videolan/media/content/control/GainControlImpl.java
--- 
old/libbluray-1.1.2/src/libbluray/bdj/java/org/videolan/media/content/control/GainControlImpl.java
  2019-06-07 20:00:28.000000000 +0200
+++ 
new/libbluray-1.2.0/src/libbluray/bdj/java/org/videolan/media/content/control/GainControlImpl.java
  2020-03-22 16:29:41.000000000 +0100
@@ -43,7 +43,7 @@
     }
 
     public float setDB(float gain) {
-        this.level = Math.max(1.0f, Math.min(0.0f, (float)Math.pow(10.0f, gain 
/ 10.0f)));
+        this.level = Math.max(0.0f, Math.min(1.0f, (float)Math.pow(10.0f, gain 
/ 10.0f)));
         this.gain = gain;
         setGain(this.mute, this.level);
         return this.gain;
@@ -54,7 +54,7 @@
     }
 
     public float setLevel(float level) {
-        this.level = Math.max(1.0f, Math.min(0.0f, level));
+        this.level = Math.max(0.0f, Math.min(1.0f, level));
         this.gain = 10.0f * (float)(Math.log(this.level) / Math.log(10.0f));
 
         setGain(this.mute, this.level);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/bdj/java/org/videolan/media/content/control/PanningControlImpl.java
 
new/libbluray-1.2.0/src/libbluray/bdj/java/org/videolan/media/content/control/PanningControlImpl.java
--- 
old/libbluray-1.1.2/src/libbluray/bdj/java/org/videolan/media/content/control/PanningControlImpl.java
       2019-06-07 20:00:28.000000000 +0200
+++ 
new/libbluray-1.2.0/src/libbluray/bdj/java/org/videolan/media/content/control/PanningControlImpl.java
       2020-03-22 16:29:41.000000000 +0100
@@ -77,7 +77,7 @@
     private float clip(float val) {
         if (val != val) /* NaN */
             return 0.0f;
-        return Math.min(-1.0f, Math.max(1.0f, val));
+        return Math.max(-1.0f, Math.min(1.0f, val));
     }
 
     private BDHandler player;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/bdj/native/org_videolan_Libbluray.c 
new/libbluray-1.2.0/src/libbluray/bdj/native/org_videolan_Libbluray.c
--- old/libbluray-1.1.2/src/libbluray/bdj/native/org_videolan_Libbluray.c       
2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/bdj/native/org_videolan_Libbluray.c       
2020-03-22 16:29:41.000000000 +0100
@@ -278,7 +278,7 @@
         path = (*env)->GetStringUTFChars(env, vpPath, NULL);
     }
 
-    BD_DEBUG(DBG_JNI|DBG_CRIT, "setVirtualPackageN(%s,%d)\n", path, 
(int)psr_init_backup);
+    BD_DEBUG(DBG_JNI|DBG_CRIT, "setVirtualPackageN(%s,%d)\n", path ? path : 
"<null>", (int)psr_init_backup);
 
     result = bd_set_virtual_package(bd, path, (int)psr_init_backup);
 
@@ -293,7 +293,7 @@
         jclass cls, jlong np, jint playitem, jint playmark, jlong tick) {
     BLURAY* bd = (BLURAY*)(intptr_t)np;
 
-    BD_DEBUG(DBG_JNI, "seekN(tick=%"PRId64", mark=%d, playitem=%d)\n", 
(int64_t)tick, (int)playmark, (int)playitem);
+    BD_DEBUG(DBG_JNI, "seekN(tick=%" PRId64 ", mark=%d, playitem=%d)\n", 
(int64_t)tick, (int)playmark, (int)playitem);
 
     return bd_bdj_seek(bd, playitem, playmark, tick);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/bluray-version.h 
new/libbluray-1.2.0/src/libbluray/bluray-version.h
--- old/libbluray-1.1.2/src/libbluray/bluray-version.h  2019-06-07 
20:02:18.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/bluray-version.h  2020-03-22 
16:32:02.000000000 +0100
@@ -26,10 +26,10 @@
      ((micro) *     1))
 
 #define BLURAY_VERSION_MAJOR 1
-#define BLURAY_VERSION_MINOR 1
-#define BLURAY_VERSION_MICRO 2
+#define BLURAY_VERSION_MINOR 2
+#define BLURAY_VERSION_MICRO 0
 
-#define BLURAY_VERSION_STRING "1.1.2"
+#define BLURAY_VERSION_STRING "1.2.0"
 
 #define BLURAY_VERSION \
     BLURAY_VERSION_CODE(BLURAY_VERSION_MAJOR, BLURAY_VERSION_MINOR, 
BLURAY_VERSION_MICRO)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/bluray.c 
new/libbluray-1.2.0/src/libbluray/bluray.c
--- old/libbluray-1.1.2/src/libbluray/bluray.c  2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/libbluray/bluray.c  2020-03-22 16:29:41.000000000 
+0100
@@ -150,7 +150,7 @@
 
     /* BD-J */
     BDJAVA         *bdjava;
-    BDJ_STORAGE     bdjstorage;
+    BDJ_CONFIG      bdj_config;
     uint8_t         bdj_wait_start;  /* BD-J has selected playlist (prefetch) 
but not yet started playback */
 
     /* HDMV graphics */
@@ -688,7 +688,7 @@
     const size_t len = 6144;
 
     if (st->fp) {
-        BD_DEBUG(DBG_STREAM, "Reading unit at %"PRIu64"...\n", 
st->clip_block_pos);
+        BD_DEBUG(DBG_STREAM, "Reading unit at %" PRIu64 "...\n", 
st->clip_block_pos);
 
         if (len + st->clip_block_pos <= st->clip_size) {
             size_t read_len;
@@ -697,14 +697,14 @@
                 int error;
 
                 if (read_len != len) {
-                    BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %d bytes at 
%"PRIu64" ; requested %d !\n", (int)read_len, st->clip_block_pos, (int)len);
+                    BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %d bytes at %" 
PRIu64 " ; requested %d !\n", (int)read_len, st->clip_block_pos, (int)len);
                     return _skip_unit(bd, st);
                 }
                 st->clip_block_pos += len;
 
                 if ((error = _validate_unit(bd, st, buf)) <= 0) {
                     /* skip broken unit */
-                    BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Skipping broken unit at 
%"PRId64"\n", st->clip_block_pos - len);
+                    BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Skipping broken unit at 
%" PRId64 "\n", st->clip_block_pos - len);
                     st->clip_pos += len;
                     return error;
                 }
@@ -727,7 +727,7 @@
 #endif
             }
 
-            BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read unit at %"PRIu64" failed 
!\n", st->clip_block_pos);
+            BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read unit at %" PRIu64 " failed 
!\n", st->clip_block_pos);
 
             return _skip_unit(bd, st);
         }
@@ -775,7 +775,7 @@
     st.clip = p->clip;
 
     if (st.clip_size > PRELOAD_SIZE_LIMIT) {
-        BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): too large clip 
(%"PRId64")\n", st.clip_size);
+        BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): too large clip (%" 
PRId64 ")\n", st.clip_size);
         return 0;
     }
 
@@ -802,7 +802,7 @@
 
     for (; buf < end; buf += 6144) {
         if (_read_block(bd, &st, buf) <= 0) {
-            BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): error loading %s 
at %"PRIu64"\n",
+            BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): error loading %s 
at %" PRIu64 "\n",
                   st.clip->name, (uint64_t)(buf - p->buf));
             _close_m2ts(&st);
             _close_preload(p);
@@ -812,7 +812,7 @@
 
     /* */
 
-    BD_DEBUG(DBG_BLURAY, "_preload_m2ts(): loaded %"PRIu64" bytes from %s\n",
+    BD_DEBUG(DBG_BLURAY, "_preload_m2ts(): loaded %" PRIu64 " bytes from %s\n",
           st.clip_size, st.clip->name);
 
     _close_m2ts(&st);
@@ -914,7 +914,7 @@
         if (!bd->disc || bd->disc_info.bdj_detected) {
 
             /* Check if jvm + jar can be loaded ? */
-            switch (bdj_jvm_available(&bd->bdjstorage)) {
+            switch (bdj_jvm_available(&bd->bdj_config)) {
                 case BDJ_CHECK_OK:
                     bd->disc_info.bdj_handled = 1;
                     /* fall thru */
@@ -1368,7 +1368,7 @@
 {
     if (bd->bdjava == NULL) {
         const char *root = disc_root(bd->disc);
-        bd->bdjava = bdj_open(root, bd, bd->disc_info.bdj_disc_id, 
&bd->bdjstorage);
+        bd->bdjava = bdj_open(root, bd, bd->disc_info.bdj_disc_id, 
&bd->bdj_config);
         if (!bd->bdjava) {
             return 0;
         }
@@ -1432,7 +1432,7 @@
     env = getenv("LIBBLURAY_PERSISTENT_STORAGE");
     if (env) {
         int v = (!strcmp(env, "yes")) ? 1 : (!strcmp(env, "no")) ? 0 : 
atoi(env);
-        bd->bdjstorage.no_persistent_storage = !v;
+        bd->bdj_config.no_persistent_storage = !v;
     }
 
     BD_DEBUG(DBG_BLURAY, "BLURAY initialized!\n");
@@ -1543,7 +1543,7 @@
 
     event_queue_destroy(&bd->event_queue);
     array_free((void**)&bd->titles);
-    bdj_storage_cleanup(&bd->bdjstorage);
+    bdj_config_cleanup(&bd->bdj_config);
 
     disc_close(&bd->disc);
 
@@ -1581,7 +1581,7 @@
 {
     while (bd->next_mark >= 0 && bd->s_pos > bd->next_mark_pos) {
 
-        BD_DEBUG(DBG_BLURAY, "PlayMark %d reached (%"PRIu64")\n", 
bd->next_mark, bd->next_mark_pos);
+        BD_DEBUG(DBG_BLURAY, "PlayMark %d reached (%" PRIu64 ")\n", 
bd->next_mark, bd->next_mark_pos);
 
         _queue_event(bd, BD_EVENT_PLAYMARK, bd->next_mark);
         _bdj_event(bd, BDJ_EVENT_MARK, bd->next_mark);
@@ -1634,7 +1634,7 @@
             _init_textst_timer(bd);
         }
 
-        BD_DEBUG(DBG_BLURAY, "Seek to %"PRIu64"\n", bd->s_pos);
+        BD_DEBUG(DBG_BLURAY, "Seek to %" PRIu64 "\n", bd->s_pos);
     }
 }
 
@@ -1657,7 +1657,7 @@
     NAV_CLIP *clip;
 
     if (tick >> 33) {
-        BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_seek_time(%"PRIu64") failed: 
invalid timestamp\n", tick);
+        BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_seek_time(%" PRIu64 ") failed: 
invalid timestamp\n", tick);
         return bd->s_pos;
     }
 
@@ -2068,7 +2068,7 @@
         return 0;
     }
 
-    BD_DEBUG(DBG_STREAM, "Reading [%d bytes] at %"PRIu64"...\n", len, 
bd->s_pos);
+    BD_DEBUG(DBG_STREAM, "Reading [%d bytes] at %" PRIu64 "...\n", len, 
bd->s_pos);
 
     r = _bd_read(bd, buf, len);
 
@@ -2851,7 +2851,7 @@
             BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Can't disable persistent storage 
during playback\n");
             return 0;
         }
-        bd->bdjstorage.no_persistent_storage = !value;
+        bd->bdj_config.no_persistent_storage = !value;
         return 1;
     }
 
@@ -2880,18 +2880,18 @@
 
         case BLURAY_PLAYER_CACHE_ROOT:
             bd_mutex_lock(&bd->mutex);
-            X_FREE(bd->bdjstorage.cache_root);
-            bd->bdjstorage.cache_root = str_dup(s);
+            X_FREE(bd->bdj_config.cache_root);
+            bd->bdj_config.cache_root = str_dup(s);
             bd_mutex_unlock(&bd->mutex);
-            BD_DEBUG(DBG_BDJ, "Cache root dir set to %s\n", 
bd->bdjstorage.cache_root);
+            BD_DEBUG(DBG_BDJ, "Cache root dir set to %s\n", 
bd->bdj_config.cache_root);
             return 1;
 
         case BLURAY_PLAYER_PERSISTENT_ROOT:
             bd_mutex_lock(&bd->mutex);
-            X_FREE(bd->bdjstorage.persistent_root);
-            bd->bdjstorage.persistent_root = str_dup(s);
+            X_FREE(bd->bdj_config.persistent_root);
+            bd->bdj_config.persistent_root = str_dup(s);
             bd_mutex_unlock(&bd->mutex);
-            BD_DEBUG(DBG_BDJ, "Persistent root dir set to %s\n", 
bd->bdjstorage.persistent_root);
+            BD_DEBUG(DBG_BDJ, "Persistent root dir set to %s\n", 
bd->bdj_config.persistent_root);
             return 1;
 
         default:
@@ -3654,12 +3654,21 @@
     return result;
 }
 
+#define BD_VK_FLAGS_MASK (BD_VK_KEY_PRESSED | BD_VK_KEY_TYPED | 
BD_VK_KEY_RELEASED)
+#define BD_VK_KEY(k)     ((k) & ~(BD_VK_FLAGS_MASK))
+#define BD_VK_FLAGS(k)   ((k) & BD_VK_FLAGS_MASK)
+/* HDMV: key is triggered when pressed down */
+#define BD_KEY_TYPED(k)  (!((k) & (BD_VK_KEY_TYPED | BD_VK_KEY_RELEASED)))
+
 int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)
 {
     int result = -1;
 
-    if (key == BD_VK_ROOT_MENU) {
-        return bd_menu_call(bd, pts);
+    if (BD_VK_KEY(key) == BD_VK_ROOT_MENU) {
+        if (BD_KEY_TYPED(key)) {
+            return bd_menu_call(bd, pts);
+        }
+        return 0;
     }
 
     bd_mutex_lock(&bd->mutex);
@@ -3667,8 +3676,17 @@
     _set_scr(bd, pts);
 
     if (bd->title_type == title_hdmv) {
-        result = _run_gc(bd, GC_CTRL_VK_KEY, key);
+        if (BD_KEY_TYPED(key)) {
+            result = _run_gc(bd, GC_CTRL_VK_KEY, BD_VK_KEY(key));
+        } else {
+            result = 0;
+        }
+
     } else if (bd->title_type == title_bdj) {
+        if (!BD_VK_FLAGS(key)) {
+            /* No flags --> single key press event */
+            key |= BD_VK_KEY_PRESSED | BD_VK_KEY_TYPED | BD_VK_KEY_RELEASED;
+        }
         result = _bdj_event(bd, BDJ_EVENT_VK_KEY, key);
     }
 
@@ -3755,8 +3773,8 @@
         return 0;
     }
 
-    BD_DEBUG(DBG_BLURAY, "bd_read_file(): read %"PRId64" bytes from 
%s"DIR_SEP"%s\n",
-             *size, dir, file);
+    BD_DEBUG(DBG_BLURAY, "bd_read_file(): read %" PRId64 " bytes from %s" 
DIR_SEP "%s\n",
+             *size, dir ? dir : "", file);
     return 1;
 }
 
@@ -3765,6 +3783,21 @@
     return _bd_read_file(bd, NULL, path, data, size);
 }
 
+struct bd_dir_s *bd_open_dir(BLURAY *bd, const char *dir)
+{
+    if (!bd || dir == NULL) {
+        return NULL;
+    }
+    return disc_open_dir(bd->disc, dir);
+}
+
+struct bd_file_s *bd_open_file_dec(BLURAY *bd, const char *path)
+{
+    if (!bd || path == NULL) {
+        return NULL;
+    }
+    return disc_open_path_dec(bd->disc, path);
+}
 
 /*
  * Metadata
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/bluray.h 
new/libbluray-1.2.0/src/libbluray/bluray.h
--- old/libbluray-1.1.2/src/libbluray/bluray.h  2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/libbluray/bluray.h  2020-03-22 16:29:41.000000000 
+0100
@@ -1013,9 +1013,14 @@
  *  Pass user input to graphics controller or BD-J.
  *  Keys are defined in libbluray/keys.h.
  *
+ *  Two user input models are supported:
+ *    - Single event when a key is typed once.
+ *    - Separate events when key is pressed and released.
+ *      VD_VK_KEY_PRESSED, BD_VK_TYPED and BD_VK_KEY_RELEASED are or'd with 
the key.
+ *
  * @param bd  BLURAY object
  * @param pts current playback position (1/90000s) or -1
- * @param key input key
+ * @param key input key (@see keys.h)
  * @return <0 on error, 0 on success, >0 if selection/activation changed
  */
 int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key);
@@ -1094,6 +1099,26 @@
  */
 int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size);
 
+/**
+ *
+ *  Open a file/dir from BluRay Virtual File System.
+ *
+ *  encrypted streams are decrypted, and because of how
+ *  decryption works, it can only seek to (N*6144) bytes,
+ *  and read 6144 bytes at a time.
+ *  DO NOT mix any play functionalities with these functions.
+ *  It might cause broken stream. In general, accessing
+ *  mutiple file on disk at the same time is a bad idea.
+ *  Caller must close with file_close()/dir_close().
+ *
+ * @param bd  BLURAY object
+ * @param dir  target directory (relative to disc root)
+ * @param path  path to the file (relative to disc root)
+ * @return BD_DIR_H * or BD_FILE_H *, NULL if failed
+ */
+struct bd_dir_s *bd_open_dir(BLURAY *, const char *dir);
+struct bd_file_s *bd_open_file_dec(BLURAY *, const char *path);
+
 
 #ifdef __cplusplus
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/decoders/graphics_controller.c 
new/libbluray-1.2.0/src/libbluray/decoders/graphics_controller.c
--- old/libbluray-1.1.2/src/libbluray/decoders/graphics_controller.c    
2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/decoders/graphics_controller.c    
2020-03-22 16:29:41.000000000 +0100
@@ -1027,7 +1027,7 @@
 
         /* next dialog too far in future ? */
         if (now < 1 || dialog[ii].start_pts >= now + 90000) {
-            GC_TRACE("_render_textst(): next event #%d in %"PRId64" seconds 
(pts %"PRId64")\n",
+            GC_TRACE("_render_textst(): next event #%d in %" PRId64 " seconds 
(pts %" PRId64 ")\n",
                      ii, (dialog[ii].start_pts - now)/90000, 
dialog[ii].start_pts);
             if (cmds) {
                 cmds->wakeup_time = (uint32_t)(dialog[ii].start_pts / 2);
@@ -1052,7 +1052,7 @@
             continue;
         }
 
-        GC_TRACE("_render_textst(): rendering dialog #%d (pts %"PRId64", diff 
%"PRId64"\n",
+        GC_TRACE("_render_textst(): rendering dialog #%d (pts %" PRId64 ", 
diff %" PRId64 "\n",
                  ii, dialog[ii].start_pts, dialog[ii].start_pts - now);
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-1.1.2/src/libbluray/decoders/graphics_processor.c 
new/libbluray-1.2.0/src/libbluray/decoders/graphics_processor.c
--- old/libbluray-1.1.2/src/libbluray/decoders/graphics_processor.c     
2019-06-07 20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/decoders/graphics_processor.c     
2020-03-22 16:29:41.000000000 +0100
@@ -542,7 +542,7 @@
             /* filter out values that seem to be incorrect (if stc is not 
updated) */
             int64_t diff = (*p)->dts - stc;
             if (diff < MAX_STC_DTS_DIFF) {
-                GP_TRACE("Segment dts > stc (%"PRId64" > %"PRId64" ; diff 
%"PRId64")\n",
+                GP_TRACE("Segment dts > stc (%" PRId64 " > %" PRId64 " ; diff 
%" PRId64 ")\n",
                          (*p)->dts, stc, diff);
                 return 0;
             }
@@ -562,7 +562,7 @@
 
         /* decode segment */
 
-        GP_TRACE("Decoding segment, dts %010"PRId64" pts %010"PRId64" len 
%d\n",
+        GP_TRACE("Decoding segment, dts %010" PRId64 " pts %010" PRId64 " len 
%d\n",
                  (*p)->dts, (*p)->pts, (*p)->len);
 
         _decode_segment(*s, *p);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/decoders/m2ts_filter.c 
new/libbluray-1.2.0/src/libbluray/decoders/m2ts_filter.c
--- old/libbluray-1.1.2/src/libbluray/decoders/m2ts_filter.c    2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/decoders/m2ts_filter.c    2020-03-22 
16:29:41.000000000 +0100
@@ -220,13 +220,13 @@
 
         int64_t pts = _es_timestamp(buf + 4 + payload_offset, 188 - 
payload_offset);
         if (pts >= p->in_pts && (p->out_pts < 0 || pts <= p->out_pts)) {
-            M2TS_TRACE("Pid 0x%04x pts %"PRId64" passed IN timestamp %"PRId64" 
(pts %"PRId64")\n",
+            M2TS_TRACE("Pid 0x%04x pts %" PRId64 " passed IN timestamp %" 
PRId64 " (pts %" PRId64 ")\n",
                        pid, pts, p->in_pts, pts);
             _remove_pid(p->wipe_pid, pid);
             _add_pid(p->pass_pid, pid);
 
         } else {
-            M2TS_TRACE("Pid 0x%04x pts %"PRId64" outside of clip 
(%"PRId64"-%"PRId64" -> keep wiping out\n",
+            M2TS_TRACE("Pid 0x%04x pts %" PRId64 " outside of clip (%" PRId64 
"-%" PRId64 " -> keep wiping out\n",
                        pid, pts, p->in_pts, p->out_pts);
         }
     }
@@ -246,7 +246,7 @@
                 if (pts > p->out_pts ||
                     IS_HDMV_PID_PG(pid) ||
                     IS_HDMV_PID_IG(pid)) {
-                M2TS_TRACE("Pid 0x%04x passed OUT timestamp %"PRId64" (pts 
%"PRId64") -> start wiping\n", pid, p->out_pts, pts);
+                M2TS_TRACE("Pid 0x%04x passed OUT timestamp %" PRId64 " (pts 
%" PRId64 ") -> start wiping\n", pid, p->out_pts, pts);
                 _remove_pid(p->pass_pid, pid);
                 _add_pid(p->wipe_pid, pid);
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/disc/disc.c 
new/libbluray-1.2.0/src/libbluray/disc/disc.c
--- old/libbluray-1.1.2/src/libbluray/disc/disc.c       2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/disc/disc.c       2020-03-22 
16:29:41.000000000 +0100
@@ -579,6 +579,26 @@
     return 0;
 }
 
+BD_FILE_H *disc_open_path_dec(BD_DISC *p, const char *rel_path)
+{
+    size_t size = strlen(rel_path);
+    const char *suf = (size > 5) ? rel_path + (size - 5) : rel_path;
+
+    /* check if it's a stream */
+    if (strncmp(rel_path, "BDMV" DIR_SEP "STREAM", 11)) { // not equal
+        return disc_open_path(p, rel_path);
+    } else if (!strcmp(suf, ".m2ts")) { // equal
+        return disc_open_stream(p, suf - 5);
+    } else if (!strcmp(suf+1, ".MTS")) { // equal
+        return disc_open_stream(p, suf - 4);
+    } else if (!strcmp(suf, ".ssif")) { // equal
+        BD_DEBUG(DBG_FILE | DBG_CRIT, "error opening file %s, ssif is not yet 
supported.\n", rel_path);
+    } else {
+        BD_DEBUG(DBG_FILE | DBG_CRIT, "error opening file %s\n", rel_path);
+    }
+    return NULL;
+}
+
 /*
  * persistent properties storage
  */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/disc/disc.h 
new/libbluray-1.2.0/src/libbluray/disc/disc.h
--- old/libbluray-1.1.2/src/libbluray/disc/disc.h       2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/disc/disc.h       2020-03-22 
16:29:41.000000000 +0100
@@ -80,8 +80,12 @@
 /* Update virtual package */
 BD_PRIVATE void disc_update(BD_DISC *disc, const char *overlay_root);
 
+/* Cache file directly from BD-ROM */
 BD_PRIVATE int  disc_cache_bdrom_file(BD_DISC *p, const char *rel_path, const 
char *cache_path);
 
+/* Open decrypted file */
+BD_PRIVATE struct bd_file_s *disc_open_path_dec(BD_DISC *p, const char 
*rel_path);
+
 /* open BD-ROM directory (relative to disc root) */
 BD_PRIVATE struct bd_dir_s  *disc_open_bdrom_dir(BD_DISC *disc, const char 
*path);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/disc/properties.c 
new/libbluray-1.2.0/src/libbluray/disc/properties.c
--- old/libbluray-1.1.2/src/libbluray/disc/properties.c 2019-06-07 
20:00:28.000000000 +0200
+++ new/libbluray-1.2.0/src/libbluray/disc/properties.c 2020-03-22 
16:29:41.000000000 +0100
@@ -85,7 +85,7 @@
     return 0;
 
  unlink:
-    BD_DEBUG(DBG_FILE | DBG_CRIT, "Removing invalid properties file %s 
(%"PRId64" bytes)\n", file, size);
+    BD_DEBUG(DBG_FILE | DBG_CRIT, "Removing invalid properties file %s (%" 
PRId64 " bytes)\n", file, size);
 
     X_FREE(*data);
     if (fp) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/libbluray/keys.h 
new/libbluray-1.2.0/src/libbluray/keys.h
--- old/libbluray-1.1.2/src/libbluray/keys.h    2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/libbluray/keys.h    2020-03-22 16:29:41.000000000 
+0100
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2010  hpi1
+ * Copyright (C) 2010-2019  Petri Hintukainen <[email protected]>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -61,4 +61,13 @@
 
 } bd_vk_key_e;
 
+/*
+ * Application may optionally provide KEY_PRESSED, KEY_TYPED and KEY_RELEASED 
events.
+ * These masks are OR'd with the key code when calling bd_user_input().
+ */
+
+#define BD_VK_KEY_PRESSED   0x80000000   /* Key was pressed down */
+#define BD_VK_KEY_TYPED     0x40000000   /* Key was typed */
+#define BD_VK_KEY_RELEASED  0x20000000   /* Key was released */
+
 #endif // _BD_KEYS_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-1.1.2/src/util/mutex.c 
new/libbluray-1.2.0/src/util/mutex.c
--- old/libbluray-1.1.2/src/util/mutex.c        2019-06-07 20:00:28.000000000 
+0200
+++ new/libbluray-1.2.0/src/util/mutex.c        2020-03-22 16:29:41.000000000 
+0100
@@ -68,18 +68,16 @@
 
 #elif defined(HAVE_PTHREAD_H)
 
-typedef struct {
-    int             lock_count;
-    pthread_t       owner;
-    pthread_mutex_t mutex;
-} MUTEX_IMPL;
+typedef pthread_mutex_t MUTEX_IMPL;
 
 static int _mutex_init(MUTEX_IMPL *p)
 {
-    p->owner      = (pthread_t)-1;
-    p->lock_count = 0;
+    pthread_mutexattr_t attr;
 
-    if (pthread_mutex_init(&p->mutex, NULL)) {
+    pthread_mutexattr_init(&attr);
+    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+
+    if (pthread_mutex_init(p, &attr)) {
         BD_DEBUG(DBG_BLURAY|DBG_CRIT, "pthread_mutex_init() failed !\n");
         return -1;
     }
@@ -89,40 +87,17 @@
 
 static int _mutex_lock(MUTEX_IMPL *p)
 {
-    if (pthread_equal(p->owner, pthread_self())) {
-        /* recursive lock */
-        p->lock_count++;
-        return 0;
-    }
-
-    if (pthread_mutex_lock(&p->mutex)) {
+    if (pthread_mutex_lock(p)) {
         BD_DEBUG(DBG_BLURAY|DBG_CRIT, "pthread_mutex_lock() failed !\n");
         return -1;
     }
 
-    p->owner      = pthread_self();
-    p->lock_count = 1;
-
     return 0;
 }
 
 static int _mutex_unlock(MUTEX_IMPL *p)
 {
-    if (!pthread_equal(p->owner, pthread_self())) {
-        BD_DEBUG(DBG_BLURAY|DBG_CRIT, "bd_mutex_unlock(): not owner !\n");
-        return -1;
-    }
-
-    p->lock_count--;
-    if (p->lock_count > 0) {
-        return 0;
-    }
-
-    /* unlock */
-
-    p->owner = (pthread_t)-1;
-
-    if (pthread_mutex_unlock(&p->mutex)) {
+    if (pthread_mutex_unlock(p)) {
         BD_DEBUG(DBG_BLURAY|DBG_CRIT, "pthread_mutex_unlock() failed !\n");
         return -1;
     }
@@ -132,10 +107,7 @@
 
 static int _mutex_destroy(MUTEX_IMPL *p)
 {
-    _mutex_lock(p);
-    _mutex_unlock(p);
-
-    if (pthread_mutex_destroy(&p->mutex)) {
+    if (pthread_mutex_destroy(p)) {
         BD_DEBUG(DBG_BLURAY|DBG_CRIT, "pthread_mutex_destroy() failed !\n");
         return -1;
     }
@@ -193,4 +165,3 @@
     X_FREE(p->impl);
     return 0;
 }
-


Reply via email to