[libbluray-devel] Cosmetics (group methods)

hpi1 git at videolan.org
Fri Mar 27 12:49:06 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Mar 27 13:11:34 2015 +0200| [c48cbbe443da6b52249d745ee46dc510da49830f] | committer: hpi1

Cosmetics (group methods)

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

 src/libbluray/bdj/java/org/videolan/Libbluray.java |  113 ++++++++++++--------
 1 file changed, 67 insertions(+), 46 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index 25a28f9..1dfc485 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -230,8 +230,25 @@ public class Libbluray {
         titleInfos = null;
     }
 
-    public static byte[] getAacsData(int type) {
-        return getAacsDataN(nativePointer, type);
+    /*
+     * Package private
+     */
+
+    /* called by BDJLoader to select HDMV title */
+    protected static boolean selectHdmvTitle(int title) {
+        return selectTitleN(nativePointer, title) == 1 ? true : false;
+    }
+
+    protected static boolean cacheBdRomFile(String path, String cachePath) {
+        return cacheBdRomFileN(nativePointer, path, cachePath) == 0;
+    }
+
+    protected static void setUOMask(boolean menuCallMask, boolean titleSearchMask) {
+        setUOMaskN(nativePointer, menuCallMask, titleSearchMask);
+    }
+
+    protected static int setVirtualPackage(String vpPath, boolean initBackupRegs) {
+        return setVirtualPackageN(nativePointer, vpPath, initBackupRegs);
     }
 
     /*
@@ -265,15 +282,51 @@ public class Libbluray {
         return titleInfos[titleNum];
     }
 
+    /* used by org/bluray/ti/PlayListImpl */
+    public static int getCurrentTitle() {
+        return readPSR(PSR_TITLE_NUMBER);
+    }
+
+
     /*
-     *
+     * Disc data
      */
 
+    public static byte[] getAacsData(int type) {
+        return getAacsDataN(nativePointer, type);
+    }
 
     public static PlaylistInfo getPlaylistInfo(int playlist) {
         return getPlaylistInfoN(nativePointer, playlist);
     }
 
+    public static Bdjo getBdjo(String name) {
+        return getBdjoN(nativePointer, name + ".bdjo");
+    }
+
+    public static String[] listBdFiles(String path, boolean onlyBdRom) {
+        return listBdFilesN(nativePointer, path, onlyBdRom);
+    }
+
+    /*
+     * Playback control
+     */
+
+    public static boolean selectPlaylist(int playlist, int playitem, int playmark, long time) {
+        if (playlist < 0)
+            throw new IllegalArgumentException("Playlist cannot be negative");
+
+        return selectPlaylistN(nativePointer, playlist, playitem, playmark, time) == 1 ? true : false;
+    }
+
+    public static boolean selectPlaylist(int playlist) {
+        return selectPlaylist(playlist, -1, -1, -1);
+    }
+
+    public static void stopPlaylist() {
+        selectPlaylistN(nativePointer, -1, -1, -1, -1);
+    }
+
     public static long seekTime(long tick) {
         return seekN(nativePointer, -1, -1, tick);
     }
@@ -298,26 +351,6 @@ public class Libbluray {
         return result;
     }
 
-    public static boolean selectPlaylist(int playlist, int playitem, int playmark, long time) {
-        if (playlist < 0)
-            throw new IllegalArgumentException("Playlist cannot be negative");
-
-        return selectPlaylistN(nativePointer, playlist, playitem, playmark, time) == 1 ? true : false;
-    }
-
-    public static boolean selectPlaylist(int playlist) {
-        return selectPlaylist(playlist, -1, -1, -1);
-    }
-
-    public static void stopPlaylist() {
-        selectPlaylistN(nativePointer, -1, -1, -1, -1);
-    }
-
-    /* called by BDJLoader to select HDMV title */
-    protected static boolean selectHdmvTitle(int title) {
-        return selectTitleN(nativePointer, title) == 1 ? true : false;
-    }
-
     public static boolean selectAngle(int angle) {
         if (angle < 1)
             throw new IllegalArgumentException("Angle cannot be negative");
@@ -325,10 +358,6 @@ public class Libbluray {
         return selectAngleN(nativePointer, angle) == 1 ? true : false;
     }
 
-    public static int getCurrentTitle() {
-        return readPSR(PSR_TITLE_NUMBER);
-    }
-
     public static int getCurrentAngle() {
         return readPSR(PSR_ANGLE_NUMBER);
     }
@@ -348,6 +377,10 @@ public class Libbluray {
         return selectRateN(nativePointer, rate, start ? 1 : 2) == 1 ? true : false;
     }
 
+    /*
+     * Register access
+     */
+
     public static void writeGPR(int num, int value) {
         int ret = writeGPRN(nativePointer, num, value);
 
@@ -380,17 +413,9 @@ public class Libbluray {
         return readPSRN(nativePointer, num);
     }
 
-    public static Bdjo getBdjo(String name) {
-        return getBdjoN(nativePointer, name + ".bdjo");
-    }
-
-    protected static boolean cacheBdRomFile(String path, String cachePath) {
-        return cacheBdRomFileN(nativePointer, path, cachePath) == 0;
-    }
-
-    public static String[] listBdFiles(String path, boolean onlyBdRom) {
-        return listBdFilesN(nativePointer, path, onlyBdRom);
-    }
+    /*
+     * Graphics
+     */
 
     public static void updateGraphic(int width, int height, int[] rgbArray) {
         updateGraphicN(nativePointer, width, height, rgbArray,
@@ -403,6 +428,10 @@ public class Libbluray {
                        x0, y0, x1, y1);
     }
 
+    /*
+     * Events from native side
+     */
+
     private static boolean startTitle(int titleNumber) {
 
         TitleContext titleContext = null;
@@ -526,14 +555,6 @@ public class Libbluray {
         return result;
     }
 
-    protected static void setUOMask(boolean menuCallMask, boolean titleSearchMask) {
-        setUOMaskN(nativePointer, menuCallMask, titleSearchMask);
-    }
-
-    protected static int setVirtualPackage(String vpPath, boolean initBackupRegs) {
-        return setVirtualPackageN(nativePointer, vpPath, initBackupRegs);
-    }
-
     private static final int BDJ_EVENT_CHAPTER                  = 1;
     private static final int BDJ_EVENT_PLAYITEM                 = 2;
     private static final int BDJ_EVENT_ANGLE                    = 3;



More information about the libbluray-devel mailing list