[libbluray-devel] BD-J: get player profile from PSR

hpi1 git at videolan.org
Fri May 13 09:33:36 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon May  9 10:55:36 2016 +0300| [f416b1a5efd51d7f6e4789a20010d7699cdb5ad8] | committer: hpi1

BD-J: get player profile from PSR

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=f416b1a5efd51d7f6e4789a20010d7699cdb5ad8
---

 src/libbluray/bdj/java/org/videolan/Libbluray.java |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index e640575..80b275d 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -159,16 +159,28 @@ public class Libbluray {
 
         System.setProperty("dvb.returnchannel.timeout", "30");
 
+        /* get profile from PSR */
+        int psr31 = readPSR(PSR_PROFILE_VERSION);
+        int profile = psr31 >> 16;
+        boolean p11 = (profile & 0x01) != 0;
+        boolean p2  = (profile & 0x02) != 0;
+        boolean p5  = (profile & 0x10) != 0;
+
         System.setProperty("bluray.profile.1", "YES");
         System.setProperty("bluray.p1.version.major", "1");
-        System.setProperty("bluray.p1.version.minor", "1");
+        System.setProperty("bluray.p1.version.minor", p11 ? "1" : "0");
         System.setProperty("bluray.p1.version.micro", "0");
 
-        System.setProperty("bluray.profile.2", "YES");
+        System.setProperty("bluray.profile.2", p2 ? "YES" : "NO");
         System.setProperty("bluray.p2.version.major", "1");
         System.setProperty("bluray.p2.version.minor", "0");
         System.setProperty("bluray.p2.version.micro", "0");
 
+        System.setProperty("bluray.profile.5", p5 ? "YES" : "NO");
+        System.setProperty("bluray.p5.version.major", "1");
+        System.setProperty("bluray.p5.version.minor", "0");
+        System.setProperty("bluray.p5.version.micro", "0");
+
         System.setProperty("bluray.disc.avplayback.readcapability", "NO");
 
         System.setProperty("bluray.video.fullscreenSD", "YES");



More information about the libbluray-devel mailing list